output/Internal: move the "pause" flag to struct AudioOutputControl

This commit is contained in:
Max Kellermann
2017-05-23 00:00:00 +02:00
parent dd29e6e475
commit 1fa1790da5
4 changed files with 13 additions and 15 deletions

View File

@@ -385,12 +385,8 @@ AudioOutputControl::InternalPlay() noexcept
inline void
AudioOutput::BeginPause() noexcept
{
{
const ScopeUnlock unlock(mutex);
ao_plugin_cancel(*this);
}
pause = true;
const ScopeUnlock unlock(mutex);
ao_plugin_cancel(*this);
}
inline bool
@@ -417,6 +413,8 @@ inline void
AudioOutputControl::InternalPause() noexcept
{
output->BeginPause();
pause = true;
CommandFinished();
do {
@@ -427,6 +425,7 @@ AudioOutputControl::InternalPause() noexcept
break;
} while (command == Command::NONE);
pause = false;
output->EndPause();
skip_delay = true;