Commit 2f3845ef authored by Max Kellermann's avatar Max Kellermann

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.
parent 1191025b
......@@ -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)
{
}
......
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