output/Internal: merge REOPEN and OPEN
This commit is contained in:
parent
2775d747ac
commit
2bf91a0487
@ -48,13 +48,12 @@ struct AudioOutput {
|
||||
NONE,
|
||||
ENABLE,
|
||||
DISABLE,
|
||||
OPEN,
|
||||
|
||||
/**
|
||||
* This command is invoked when the input audio format
|
||||
* changes.
|
||||
* Open the output, or reopen it if it is already
|
||||
* open, adjusting for input #AudioFormat changes.
|
||||
*/
|
||||
REOPEN,
|
||||
OPEN,
|
||||
|
||||
CLOSE,
|
||||
PAUSE,
|
||||
|
@ -138,9 +138,7 @@ AudioOutput::Open(const AudioFormat audio_format, const MusicPipe &mp)
|
||||
if (!thread.IsDefined())
|
||||
StartThread();
|
||||
|
||||
CommandWait(open
|
||||
? Command::REOPEN
|
||||
: Command::OPEN);
|
||||
CommandWait(Command::OPEN);
|
||||
const bool open2 = open;
|
||||
|
||||
if (open2 && mixer != nullptr) {
|
||||
|
@ -590,12 +590,10 @@ AudioOutput::Task()
|
||||
break;
|
||||
|
||||
case Command::OPEN:
|
||||
Open();
|
||||
CommandFinished();
|
||||
break;
|
||||
|
||||
case Command::REOPEN:
|
||||
Reopen();
|
||||
if (open)
|
||||
Reopen();
|
||||
else
|
||||
Open();
|
||||
CommandFinished();
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user