output/Thread: move Enable() call out of Open()
This commit is contained in:
@@ -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,
|
|||||||
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);
|
||||||
|
Reference in New Issue
Block a user