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.
This commit is contained in:
Lioncash 2018-09-23 20:01:02 -04:00
parent 9f3fc067bf
commit 2f6a611311
5 changed files with 12 additions and 12 deletions

View file

@ -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<void()>;
@ -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();