Update OSXOutputPlugin.cxx

1 sec for pause is too long. we wait for the same amount of time as when ring buffer is not available for writing.
This commit is contained in:
Yue Wang 2018-07-13 16:14:59 -07:00 committed by GitHub
parent 9e0fa8e9ec
commit 6d2a30b860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -892,11 +892,7 @@ OSXOutput::Play(const void *chunk, size_t size)
std::chrono::steady_clock::duration
OSXOutput::Delay() const noexcept
{
// Idle if paused
if(pause)
return std::chrono::seconds(1);
return ring_buffer->write_available()
return ring_buffer->write_available() && !pause
? std::chrono::steady_clock::duration::zero()
: std::chrono::milliseconds(MPD_OSX_BUFFER_TIME_MS / 4);
}