summaryrefslogtreecommitdiff
path: root/src/player
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-09-23 15:00:47 +0200
committerMax Kellermann <max@musicpd.org>2018-09-23 15:00:47 +0200
commit2f3845ef51019070bf42a01fd140666fc3bc3609 (patch)
tree1258f86397933f511e6b8b8f0e7305e3cb33643d /src/player
parent1191025bbfa59f8e3e66110a2b2843bcd11d19fd (diff)
player/Thread: remove `buffered_before_play` from `decoder_wakeup_threshold` formula
Simplify the formula, and I guess this makes the formula more reliable. Imagine somebody configured `buffered_before_play` larger than 25%; then the decoder would be woken up all the time. This doesn't seem logical. On the other hand, it's easy to understand that the decoder should be woken up below 75% buffer fill.
Diffstat (limited to 'src/player')
-rw-r--r--src/player/Thread.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index 5b00d2a57..13477fe0a 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -185,8 +185,7 @@ public:
Player(PlayerControl &_pc, DecoderControl &_dc,
MusicBuffer &_buffer) noexcept
:pc(_pc), dc(_dc), buffer(_buffer),
- decoder_wakeup_threshold((pc.buffered_before_play +
- buffer.GetSize() * 3) / 4)
+ decoder_wakeup_threshold(buffer.GetSize() * 3 / 4)
{
}