Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
256f40d4
Commit
256f40d4
authored
Dec 29, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Multiple: obtain detailed error information in Open()
parent
ef9acc54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
MultipleOutputs.cxx
src/output/MultipleOutputs.cxx
+9
-1
No files found.
src/output/MultipleOutputs.cxx
View file @
256f40d4
...
@@ -228,12 +228,16 @@ MultipleOutputs::Open(const AudioFormat audio_format,
...
@@ -228,12 +228,16 @@ MultipleOutputs::Open(const AudioFormat audio_format,
EnableDisable
();
EnableDisable
();
Update
();
Update
();
std
::
exception_ptr
first_error
;
for
(
auto
ao
:
outputs
)
{
for
(
auto
ao
:
outputs
)
{
if
(
ao
->
enabled
)
if
(
ao
->
enabled
)
enabled
=
true
;
enabled
=
true
;
if
(
ao
->
open
)
if
(
ao
->
open
)
ret
=
true
;
ret
=
true
;
else
if
(
ao
->
last_error
&&
!
first_error
)
first_error
=
ao
->
last_error
;
}
}
if
(
!
enabled
)
{
if
(
!
enabled
)
{
...
@@ -243,7 +247,11 @@ MultipleOutputs::Open(const AudioFormat audio_format,
...
@@ -243,7 +247,11 @@ MultipleOutputs::Open(const AudioFormat audio_format,
}
else
if
(
!
ret
)
{
}
else
if
(
!
ret
)
{
/* close all devices if there was an error */
/* close all devices if there was an error */
Close
();
Close
();
/* TODO: obtain real error */
if
(
first_error
)
/* we have details, so throw that */
std
::
rethrow_exception
(
first_error
);
else
throw
std
::
runtime_error
(
"Failed to open audio output"
);
throw
std
::
runtime_error
(
"Failed to open audio output"
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment