From c2d396526b57a0325fa43fd0a3fe39870c018645 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 7 Aug 2021 21:27:49 +0100 Subject: [PATCH] AudioCommon: fix "Error stopping stream" when emulation is paused --- Source/Core/AudioCommon/OpenSLESStream.h | 2 +- Source/Core/AudioCommon/PulseAudioStream.h | 2 +- Source/Core/AudioCommon/SoundStream.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/AudioCommon/OpenSLESStream.h b/Source/Core/AudioCommon/OpenSLESStream.h index 97c2070a7b..588d6a97d3 100644 --- a/Source/Core/AudioCommon/OpenSLESStream.h +++ b/Source/Core/AudioCommon/OpenSLESStream.h @@ -14,7 +14,7 @@ class OpenSLESStream final : public SoundStream public: ~OpenSLESStream() override; bool Init() override; - bool SetRunning(bool running) override { return running; } + bool SetRunning(bool running) override { return true; } void SetVolume(int volume) override; static bool isValid() { return true; } diff --git a/Source/Core/AudioCommon/PulseAudioStream.h b/Source/Core/AudioCommon/PulseAudioStream.h index ef0852cfb4..ad3519e21d 100644 --- a/Source/Core/AudioCommon/PulseAudioStream.h +++ b/Source/Core/AudioCommon/PulseAudioStream.h @@ -20,7 +20,7 @@ public: ~PulseAudio() override; bool Init() override; - bool SetRunning(bool running) override { return running; } + bool SetRunning(bool running) override { return true; } static bool isValid() { return true; } void StateCallback(pa_context* c); void WriteCallback(pa_stream* s, size_t length); diff --git a/Source/Core/AudioCommon/SoundStream.h b/Source/Core/AudioCommon/SoundStream.h index 771c606245..1b3300ae97 100644 --- a/Source/Core/AudioCommon/SoundStream.h +++ b/Source/Core/AudioCommon/SoundStream.h @@ -22,5 +22,6 @@ public: virtual void SetVolume(int) {} virtual void SoundLoop() {} virtual void Update() {} + // Returns true if successful. virtual bool SetRunning(bool running) { return false; } };