summaryrefslogtreecommitdiff
path: root/src/audio_core/stream.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-09-27 17:05:03 -0400
committerGravatar GitHub2018-09-27 17:05:03 -0400
commitfc2419e441dbd2270460c8fe7a92e515c0789fa5 (patch)
treeb424962d98ee97013c5c67ef8913c4a2aaf9e0c2 /src/audio_core/stream.h
parentMerge pull request #1389 from PhiBabin/valgrind (diff)
parentstream: Preserve enum class type in GetState() (diff)
downloadyuzu-fc2419e441dbd2270460c8fe7a92e515c0789fa5.tar.gz
yuzu-fc2419e441dbd2270460c8fe7a92e515c0789fa5.tar.xz
yuzu-fc2419e441dbd2270460c8fe7a92e515c0789fa5.zip
Merge pull request #1394 from lioncash/stream
stream: Preserve enum class type in GetState()
Diffstat (limited to 'src/audio_core/stream.h')
-rw-r--r--src/audio_core/stream.h14
1 files changed, 7 insertions, 7 deletions
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:
33 Multi51Channel16, 33 Multi51Channel16,
34 }; 34 };
35 35
36 /// Current state of the stream
37 enum class State {
38 Stopped,
39 Playing,
40 };
41
36 /// Callback function type, used to change guest state on a buffer being released 42 /// Callback function type, used to change guest state on a buffer being released
37 using ReleaseCallback = std::function<void()>; 43 using ReleaseCallback = std::function<void()>;
38 44
@@ -73,15 +79,9 @@ public:
73 u32 GetNumChannels() const; 79 u32 GetNumChannels() const;
74 80
75 /// Get the state 81 /// Get the state
76 u32 GetState() const; 82 State GetState() const;
77 83
78private: 84private:
79 /// Current state of the stream
80 enum class State {
81 Stopped,
82 Playing,
83 };
84
85 /// Plays the next queued buffer in the audio stream, starting playback if necessary 85 /// Plays the next queued buffer in the audio stream, starting playback if necessary
86 void PlayNextBuffer(); 86 void PlayNextBuffer();
87 87