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.
This commit is contained in:
Max Kellermann 2018-09-23 15:00:47 +02:00
parent 1191025bbf
commit 2f3845ef51
1 changed files with 1 additions and 2 deletions

View File

@ -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)
{
}