From f253d2ee7568b61ce2fab962f7328a50e2da6adf Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 27 Aug 2024 21:17:53 +1000 Subject: Timeout when writing output samples throughout the audio pipeline This allows the audio pipeline to remain responsive even when the drain buffer has completely filled. This in turn means that you now see the track info in the 'now playing' screen change if the current track changes whilst you are paused. Since I was fucking around a lot in the audio processor anyway, I also added mono->stereo expansion so that playing mono tracks on Bluetooth no longer destroys your ears. --- src/tangara/audio/audio_decoder.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tangara/audio/audio_decoder.hpp') diff --git a/src/tangara/audio/audio_decoder.hpp b/src/tangara/audio/audio_decoder.hpp index 64561d9d..9f20ec59 100644 --- a/src/tangara/audio/audio_decoder.hpp +++ b/src/tangara/audio/audio_decoder.hpp @@ -15,6 +15,7 @@ #include "audio/processor.hpp" #include "codec.hpp" #include "database/track.hpp" +#include "sample.hpp" #include "types.hpp" namespace audio { @@ -55,6 +56,7 @@ class Decoder { std::shared_ptr track_; std::span codec_buffer_; + std::span leftover_samples_; }; } // namespace audio -- cgit v1.2.3