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)
{
assert(audio_format.IsValid());
/* enable the device (just in case the last enable has failed) */
Enable();
AudioFormat f;
try {
......@@ -218,6 +215,9 @@ AudioOutputControl::InternalOpen(const AudioFormat audio_format,
skip_delay = true;
try {
/* enable the device (just in case the last enable has failed) */
output->Enable();
output->Open(audio_format, pipe);
} catch (const std::runtime_error &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