diff options
author | Max Kellermann <max@duempel.org> | 2015-10-27 22:05:41 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-10-27 22:05:41 +0100 |
commit | f5d21c9cdbc16096086301387a7c37489788c0ad (patch) | |
tree | f414d99fad5a92c4e493bb7f47e99e01b212cd9e /src | |
parent | 6ce13646da5ef5d78c438f22d7546ef2b30e02bd (diff) | |
download | mpd-f5d21c9cdbc16096086301387a7c37489788c0ad.tar.gz mpd-f5d21c9cdbc16096086301387a7c37489788c0ad.tar.xz mpd-f5d21c9cdbc16096086301387a7c37489788c0ad.zip |
player/Thread: add method ResetCrossFade()
Diffstat (limited to 'src')
-rw-r--r-- | src/player/Thread.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index 8261923c8..81248c826 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -162,6 +162,14 @@ public: elapsed_time(SongTime::zero()) {} private: + /** + * Reset cross-fading to the initial state. A check to + * re-enable it at an appropriate time will be scheduled. + */ + void ResetCrossFade() { + xfade_state = CrossFadeState::UNKNOWN; + } + void ClearAndDeletePipe() { pipe->Clear(buffer); delete pipe; @@ -591,7 +599,7 @@ Player::SeekDecoder() player_command_finished(pc); - xfade_state = CrossFadeState::UNKNOWN; + ResetCrossFade(); /* re-fill the buffer after seeking */ buffering = true; @@ -897,7 +905,7 @@ Player::PlayNextChunk() inline bool Player::SongBorder() { - xfade_state = CrossFadeState::UNKNOWN; + ResetCrossFade(); FormatDefault(player_domain, "played \"%s\"", song->GetURI()); |