output/Thread: move code to InternalDisable()
This commit is contained in:
parent
ae713cb099
commit
d600b937f1
@ -360,6 +360,11 @@ public:
|
||||
void LockAllowPlay() noexcept;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Runs inside the OutputThread. Handles exceptions.
|
||||
*/
|
||||
void InternalDisable() noexcept;
|
||||
|
||||
/**
|
||||
* Runs inside the OutputThread. Handles exceptions.
|
||||
*/
|
||||
|
@ -203,6 +203,12 @@ AudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
|
||||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
AudioOutputControl::InternalDisable() noexcept
|
||||
{
|
||||
output->Disable();
|
||||
}
|
||||
|
||||
inline void
|
||||
AudioOutputControl::InternalOpen(const AudioFormat audio_format,
|
||||
const MusicPipe &pipe) noexcept
|
||||
@ -467,7 +473,7 @@ AudioOutputControl::Task()
|
||||
break;
|
||||
|
||||
case Command::DISABLE:
|
||||
output->Disable();
|
||||
InternalDisable();
|
||||
CommandFinished();
|
||||
break;
|
||||
|
||||
@ -520,7 +526,7 @@ AudioOutputControl::Task()
|
||||
continue;
|
||||
|
||||
case Command::KILL:
|
||||
output->Disable();
|
||||
InternalDisable();
|
||||
output->source.Cancel();
|
||||
CommandFinished();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user