From 2f6a6113118a6d23bc88b7c3e3d1bfee28c11f63 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 23 Sep 2018 20:01:02 -0400 Subject: stream: Preserve enum class type in GetState() Preserves the meaning/type-safetiness of the stream state instead of making it an opaque u32. This makes it usable for other things outside of the service HLE context. --- src/audio_core/stream.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/audio_core/stream.h') diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h index 43eca74e1..aebfeb51d 100644 --- a/src/audio_core/stream.h +++ b/src/audio_core/stream.h @@ -33,6 +33,12 @@ public: Multi51Channel16, }; + /// Current state of the stream + enum class State { + Stopped, + Playing, + }; + /// Callback function type, used to change guest state on a buffer being released using ReleaseCallback = std::function; @@ -73,15 +79,9 @@ public: u32 GetNumChannels() const; /// Get the state - u32 GetState() const; + State GetState() const; private: - /// Current state of the stream - enum class State { - Stopped, - Playing, - }; - /// Plays the next queued buffer in the audio stream, starting playback if necessary void PlayNextBuffer(); -- cgit v1.2.3