AudioCommon: fix "Error stopping stream" when emulation is paused

This commit is contained in:
Tillmann Karras 2021-08-07 21:27:49 +01:00
parent a4e5d233be
commit c2d396526b
3 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class OpenSLESStream final : public SoundStream
public: public:
~OpenSLESStream() override; ~OpenSLESStream() override;
bool Init() override; bool Init() override;
bool SetRunning(bool running) override { return running; } bool SetRunning(bool running) override { return true; }
void SetVolume(int volume) override; void SetVolume(int volume) override;
static bool isValid() { return true; } static bool isValid() { return true; }

View File

@ -20,7 +20,7 @@ public:
~PulseAudio() override; ~PulseAudio() override;
bool Init() override; bool Init() override;
bool SetRunning(bool running) override { return running; } bool SetRunning(bool running) override { return true; }
static bool isValid() { return true; } static bool isValid() { return true; }
void StateCallback(pa_context* c); void StateCallback(pa_context* c);
void WriteCallback(pa_stream* s, size_t length); void WriteCallback(pa_stream* s, size_t length);

View File

@ -22,5 +22,6 @@ public:
virtual void SetVolume(int) {} virtual void SetVolume(int) {}
virtual void SoundLoop() {} virtual void SoundLoop() {}
virtual void Update() {} virtual void Update() {}
// Returns true if successful.
virtual bool SetRunning(bool running) { return false; } virtual bool SetRunning(bool running) { return false; }
}; };