From 6d2a30b860ce2a720d99fadb3729ff1cd93e69f8 Mon Sep 17 00:00:00 2001 From: Yue Wang Date: Fri, 13 Jul 2018 16:14:59 -0700 Subject: [PATCH] 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. --- src/output/plugins/OSXOutputPlugin.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 53d518d2b..f5f41781e 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -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); }