player/thread: wait for the first chunk in CheckCrossFade()
This fixes MixRamp problems which occur because CheckCrossFade() is called before the decoder has parsed MixRamp tags after DecoderClient::Ready(). Closes https://github.com/MusicPlayerDaemon/MPD/issues/2084
This commit is contained in:
parent
a693052f2c
commit
f030b22bec
1
NEWS
1
NEWS
|
@ -42,6 +42,7 @@ ver 0.24 (not yet released)
|
||||||
- opus: implement bitrate calculation
|
- opus: implement bitrate calculation
|
||||||
- sidplay: require libsidplayfp (drop support for the original sidplay)
|
- sidplay: require libsidplayfp (drop support for the original sidplay)
|
||||||
- wavpack: require libwavpack version 5
|
- wavpack: require libwavpack version 5
|
||||||
|
- fix MixRamp bug
|
||||||
* resampler
|
* resampler
|
||||||
- soxr: require libsoxr 0.1.2 or later
|
- soxr: require libsoxr 0.1.2 or later
|
||||||
* player
|
* player
|
||||||
|
|
|
@ -857,9 +857,12 @@ Player::CheckCrossFade() noexcept
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsDecoderAtNextSong() || dc.IsStarting())
|
if (!IsDecoderAtNextSong() || dc.IsStarting() || dc.pipe->IsEmpty())
|
||||||
/* we need information about the next song before we
|
/* we need information about the next song before we
|
||||||
can decide */
|
can decide */
|
||||||
|
/* the "pipe.empty" check is here so we wait for all
|
||||||
|
(ReplayGain/MixRamp) metadata to appear, which some
|
||||||
|
decoders parse only after reporting readiness */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pc.cross_fade.CanCrossFade(pc.total_time, dc.total_time,
|
if (!pc.cross_fade.CanCrossFade(pc.total_time, dc.total_time,
|
||||||
|
|
Loading…
Reference in New Issue