diff options
author | Max Kellermann <max@musicpd.org> | 2018-06-23 18:04:09 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-06-23 18:36:24 +0200 |
commit | 2be905b2e23f15a0c78c89601c7624d4a10241f5 (patch) | |
tree | 45d8ac1585937d3e20d7ae66268688e3115d5214 /src/player | |
parent | 076be809c2bd3e8cca73de70e35bd16ab3257475 (diff) |
MusicPipe: eliminate the unused MusicBuffer reference
This requires re-adding the reference to struct DecoderControl, which
was removed recently by commit
9f14e7a98d8be5cc4b916456df0124b65ece8ae4
Diffstat (limited to 'src/player')
-rw-r--r-- | src/player/Outputs.hxx | 6 | ||||
-rw-r--r-- | src/player/Thread.cxx | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/player/Outputs.hxx b/src/player/Outputs.hxx index 71e5e43d8..54e340931 100644 --- a/src/player/Outputs.hxx +++ b/src/player/Outputs.hxx @@ -26,7 +26,6 @@ struct AudioFormat; struct MusicChunk; -class MusicBuffer; /** * An interface for the player thread to control all outputs. This @@ -50,11 +49,8 @@ public: * Throws on error. * * @param audio_format the preferred audio format - * @param buffer the #MusicBuffer where consumed #MusicChunk - * objects should be returned */ - virtual void Open(const AudioFormat audio_format, - MusicBuffer &buffer) = 0; + virtual void Open(const AudioFormat audio_format) = 0; /** * Closes all audio outputs. diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index e841ea673..c19fe1504 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -343,7 +343,7 @@ Player::StartDecoder(MusicPipe &_pipe) noexcept dc.Start(std::make_unique<DetachedSong>(*pc.next_song), start_time, pc.next_song->GetEndTime(), - _pipe); + buffer, _pipe); } void @@ -445,7 +445,7 @@ Player::OpenOutput() noexcept try { const ScopeUnlock unlock(pc.mutex); - pc.outputs.Open(play_audio_format, buffer); + pc.outputs.Open(play_audio_format); } catch (...) { LogError(std::current_exception()); @@ -661,7 +661,7 @@ Player::ProcessCommand() noexcept pc.CommandFinished(); if (dc.IsIdle()) - StartDecoder(*new MusicPipe(buffer)); + StartDecoder(*new MusicPipe()); break; @@ -932,7 +932,7 @@ Player::SongBorder() noexcept inline void Player::Run() noexcept { - pipe = new MusicPipe(buffer); + pipe = new MusicPipe(); const std::lock_guard<Mutex> lock(pc.mutex); @@ -979,7 +979,7 @@ Player::Run() noexcept assert(dc.pipe == nullptr || dc.pipe == pipe); - StartDecoder(*new MusicPipe(buffer)); + StartDecoder(*new MusicPipe()); } if (/* no cross-fading if MPD is going to pause at the |