Commit 82954d1d authored by Max Kellermann's avatar Max Kellermann

player/Thread: eliminate ClearAndReplacePipe()

Since commit e81b0896, this is the same code as in ReplacePipe().
parent 5a02324c
...@@ -169,12 +169,6 @@ private: ...@@ -169,12 +169,6 @@ private:
xfade_state = CrossFadeState::UNKNOWN; xfade_state = CrossFadeState::UNKNOWN;
} }
void ClearAndReplacePipe(MusicPipe *_pipe) noexcept {
ResetCrossFade();
delete pipe;
pipe = _pipe;
}
void ReplacePipe(MusicPipe *_pipe) noexcept { void ReplacePipe(MusicPipe *_pipe) noexcept {
ResetCrossFade(); ResetCrossFade();
delete pipe; delete pipe;
...@@ -596,7 +590,7 @@ Player::SeekDecoder() noexcept ...@@ -596,7 +590,7 @@ Player::SeekDecoder() noexcept
if (!IsDecoderAtCurrentSong()) { if (!IsDecoderAtCurrentSong()) {
/* the decoder is already decoding the "next" song, /* the decoder is already decoding the "next" song,
but it is the same song file; exchange the pipe */ but it is the same song file; exchange the pipe */
ClearAndReplacePipe(dc.pipe); ReplacePipe(dc.pipe);
} }
pc.next_song.reset(); pc.next_song.reset();
......
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