summaryrefslogtreecommitdiff
path: root/src/audio_core/stream.h
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-06-19 10:29:42 -0400
committerGravatar GitHub2019-06-19 10:29:42 -0400
commit5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb (patch)
tree59fbc197a941e8a363cef85a3f75b2293c3c3bff /src/audio_core/stream.h
parentMerge pull request #2562 from ReinUsesLisp/split-cbuf-upload (diff)
parentAddressed issues (diff)
downloadyuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.gz
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.xz
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.zip
Merge pull request #2584 from ogniK5377/cadence
Impl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & Partial impl of GetAccumulatedSuspendedTickChangedEvent
Diffstat (limited to 'src/audio_core/stream.h')
-rw-r--r--src/audio_core/stream.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h
index 05071243b..8106cea43 100644
--- a/src/audio_core/stream.h
+++ b/src/audio_core/stream.h
@@ -61,6 +61,12 @@ public:
61 /// Returns a vector of recently released buffers specified by tag 61 /// Returns a vector of recently released buffers specified by tag
62 std::vector<Buffer::Tag> GetTagsAndReleaseBuffers(std::size_t max_count); 62 std::vector<Buffer::Tag> GetTagsAndReleaseBuffers(std::size_t max_count);
63 63
64 void SetVolume(float volume);
65
66 float GetVolume() const {
67 return game_volume;
68 }
69
64 /// Returns true if the stream is currently playing 70 /// Returns true if the stream is currently playing
65 bool IsPlaying() const { 71 bool IsPlaying() const {
66 return state == State::Playing; 72 return state == State::Playing;
@@ -94,6 +100,7 @@ private:
94 100
95 u32 sample_rate; ///< Sample rate of the stream 101 u32 sample_rate; ///< Sample rate of the stream
96 Format format; ///< Format of the stream 102 Format format; ///< Format of the stream
103 float game_volume = 1.0f; ///< The volume the game currently has set
97 ReleaseCallback release_callback; ///< Buffer release callback for the stream 104 ReleaseCallback release_callback; ///< Buffer release callback for the stream
98 State state{State::Stopped}; ///< Playback state of the stream 105 State state{State::Stopped}; ///< Playback state of the stream
99 Core::Timing::EventType* release_event{}; ///< Core timing release event for the stream 106 Core::Timing::EventType* release_event{}; ///< Core timing release event for the stream