Commit d600b937 authored by Max Kellermann's avatar Max Kellermann

output/Thread: move code to InternalDisable()

parent ae713cb0
......@@ -363,6 +363,11 @@ private:
/**
* Runs inside the OutputThread. Handles exceptions.
*/
void InternalDisable() noexcept;
/**
* Runs inside the OutputThread. Handles exceptions.
*/
void InternalOpen(AudioFormat audio_format,
const MusicPipe &pipe) noexcept;
......
......@@ -204,6 +204,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;
......
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