output/Filtered: move try/catch from IteratePause() to caller
This commit is contained in:
parent
4ca2c33181
commit
c0775d328c
|
@ -196,13 +196,7 @@ FilteredAudioOutput::BeginPause() noexcept
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
FilteredAudioOutput::IteratePause() noexcept
|
FilteredAudioOutput::IteratePause()
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
return output->Pause();
|
return output->Pause();
|
||||||
} catch (...) {
|
|
||||||
FormatError(std::current_exception(), "Failed to pause %s",
|
|
||||||
GetLogName());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ public:
|
||||||
void Cancel() noexcept;
|
void Cancel() noexcept;
|
||||||
|
|
||||||
void BeginPause() noexcept;
|
void BeginPause() noexcept;
|
||||||
bool IteratePause() noexcept;
|
bool IteratePause();
|
||||||
|
|
||||||
void EndPause() noexcept{
|
void EndPause() noexcept{
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,10 +338,14 @@ AudioOutputControl::InternalPause(std::unique_lock<Mutex> &lock) noexcept
|
||||||
if (!WaitForDelay(lock))
|
if (!WaitForDelay(lock))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
bool success;
|
bool success = false;
|
||||||
{
|
try {
|
||||||
const ScopeUnlock unlock(mutex);
|
const ScopeUnlock unlock(mutex);
|
||||||
success = output->IteratePause();
|
success = output->IteratePause();
|
||||||
|
} catch (...) {
|
||||||
|
FormatError(std::current_exception(),
|
||||||
|
"Failed to pause %s",
|
||||||
|
GetLogName());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|
Loading…
Reference in New Issue