Fix pause for OSX output plugin (delay one second)

This commit is contained in:
Christian Kröner 2018-06-02 19:02:37 +02:00
parent 66a1e8b737
commit 58590b71d1
1 changed files with 4 additions and 0 deletions

View File

@ -867,6 +867,10 @@ 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()
? std::chrono::steady_clock::duration::zero()
: std::chrono::milliseconds(MPD_OSX_BUFFER_TIME_MS / 4);