decoder/Control: inline WaitForDecoder()

This commit is contained in:
Max Kellermann 2019-08-20 19:33:15 +02:00
parent af4ffa91fd
commit 04e2d08417
2 changed files with 3 additions and 7 deletions

View File

@ -40,12 +40,6 @@ DecoderControl::~DecoderControl() noexcept
ClearError(); ClearError();
} }
void
DecoderControl::WaitForDecoder(std::unique_lock<Mutex> &lock) noexcept
{
client_cond.wait(lock);
}
void void
DecoderControl::SetReady(const AudioFormat audio_format, DecoderControl::SetReady(const AudioFormat audio_format,
bool _seekable, SignedSongTime _duration) noexcept bool _seekable, SignedSongTime _duration) noexcept

View File

@ -215,7 +215,9 @@ public:
* *
* Caller must hold the lock. * Caller must hold the lock.
*/ */
void WaitForDecoder(std::unique_lock<Mutex> &lock) noexcept; void WaitForDecoder(std::unique_lock<Mutex> &lock) noexcept {
client_cond.wait(lock);
}
bool IsIdle() const noexcept { bool IsIdle() const noexcept {
return state == DecoderState::STOP || return state == DecoderState::STOP ||