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