player/Thread: add method ResetCrossFade()
This commit is contained in:
parent
6ce13646da
commit
f5d21c9cdb
@ -162,6 +162,14 @@ public:
|
|||||||
elapsed_time(SongTime::zero()) {}
|
elapsed_time(SongTime::zero()) {}
|
||||||
|
|
||||||
private:
|
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() {
|
void ClearAndDeletePipe() {
|
||||||
pipe->Clear(buffer);
|
pipe->Clear(buffer);
|
||||||
delete pipe;
|
delete pipe;
|
||||||
@ -591,7 +599,7 @@ Player::SeekDecoder()
|
|||||||
|
|
||||||
player_command_finished(pc);
|
player_command_finished(pc);
|
||||||
|
|
||||||
xfade_state = CrossFadeState::UNKNOWN;
|
ResetCrossFade();
|
||||||
|
|
||||||
/* re-fill the buffer after seeking */
|
/* re-fill the buffer after seeking */
|
||||||
buffering = true;
|
buffering = true;
|
||||||
@ -897,7 +905,7 @@ Player::PlayNextChunk()
|
|||||||
inline bool
|
inline bool
|
||||||
Player::SongBorder()
|
Player::SongBorder()
|
||||||
{
|
{
|
||||||
xfade_state = CrossFadeState::UNKNOWN;
|
ResetCrossFade();
|
||||||
|
|
||||||
FormatDefault(player_domain, "played \"%s\"", song->GetURI());
|
FormatDefault(player_domain, "played \"%s\"", song->GetURI());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user