From 530fe24768357d4151ac6c6aca4a0e122ef8260a Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 26 Mar 2023 20:21:04 +0100 Subject: audio_core: No longer stall when sink queue is full Now the audout and audren update rates are tied to the sink status stalling is no longer necessary. --- src/audio_core/sink/sink_stream.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/audio_core/sink/sink_stream.h') diff --git a/src/audio_core/sink/sink_stream.h b/src/audio_core/sink/sink_stream.h index 9806e6d98..23e289c7b 100644 --- a/src/audio_core/sink/sink_stream.h +++ b/src/audio_core/sink/sink_stream.h @@ -55,9 +55,7 @@ struct SinkBuffer { class SinkStream { public: explicit SinkStream(Core::System& system_, StreamType type_) : system{system_}, type{type_} {} - virtual ~SinkStream() { - Unstall(); - } + virtual ~SinkStream() {} /** * Finalize the sink stream. @@ -202,16 +200,6 @@ public: */ void ProcessAudioOutAndRender(std::span output_buffer, std::size_t num_frames); - /** - * Stall core processes if the audio thread falls too far behind. - */ - void Stall(); - - /** - * Unstall core processes. - */ - void Unstall(); - /** * Get the total number of samples expected to have been played by this stream. * @@ -266,8 +254,6 @@ private: /// Signalled when ring buffer entries are consumed std::condition_variable release_cv; std::mutex release_mutex; - std::mutex stall_guard; - std::unique_lock stalled_lock; }; using SinkStreamPtr = std::unique_ptr; -- cgit v1.2.3