From 2be905b2e23f15a0c78c89601c7624d4a10241f5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 23 Jun 2018 18:04:09 +0200 Subject: MusicPipe: eliminate the unused MusicBuffer reference This requires re-adding the reference to struct DecoderControl, which was removed recently by commit 9f14e7a98d8be5cc4b916456df0124b65ece8ae4 --- src/player/Outputs.hxx | 6 +----- src/player/Thread.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src/player') 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(*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 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 -- cgit v1.2.3