Commit 614df963 authored by Max Kellermann's avatar Max Kellermann

output/Thread: move Enable() call out of Open()

parent 669d7a6f
...@@ -99,9 +99,6 @@ AudioOutput::Open(AudioFormat audio_format, const MusicPipe &pipe) ...@@ -99,9 +99,6 @@ AudioOutput::Open(AudioFormat audio_format, const MusicPipe &pipe)
{ {
assert(audio_format.IsValid()); assert(audio_format.IsValid());
/* enable the device (just in case the last enable has failed) */
Enable();
AudioFormat f; AudioFormat f;
try { try {
...@@ -218,6 +215,9 @@ AudioOutputControl::InternalOpen(const AudioFormat audio_format, ...@@ -218,6 +215,9 @@ AudioOutputControl::InternalOpen(const AudioFormat audio_format,
skip_delay = true; skip_delay = true;
try { try {
/* enable the device (just in case the last enable has failed) */
output->Enable();
output->Open(audio_format, pipe); output->Open(audio_format, pipe);
} catch (const std::runtime_error &e) { } catch (const std::runtime_error &e) {
LogError(e); LogError(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment