Unverified Commit 6d2a30b8 authored by Yue Wang's avatar Yue Wang Committed by GitHub

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.
parent 9e0fa8e9
...@@ -892,11 +892,7 @@ OSXOutput::Play(const void *chunk, size_t size) ...@@ -892,11 +892,7 @@ OSXOutput::Play(const void *chunk, size_t size)
std::chrono::steady_clock::duration std::chrono::steady_clock::duration
OSXOutput::Delay() const noexcept OSXOutput::Delay() const noexcept
{ {
// Idle if paused return ring_buffer->write_available() && !pause
if(pause)
return std::chrono::seconds(1);
return ring_buffer->write_available()
? std::chrono::steady_clock::duration::zero() ? std::chrono::steady_clock::duration::zero()
: std::chrono::milliseconds(MPD_OSX_BUFFER_TIME_MS / 4); : std::chrono::milliseconds(MPD_OSX_BUFFER_TIME_MS / 4);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment