diff options
author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2019-06-19 10:29:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 10:29:42 -0400 |
commit | 5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb (patch) | |
tree | 59fbc197a941e8a363cef85a3f75b2293c3c3bff /src/audio_core/stream.h | |
parent | c7b5c245e1e6c8ec27e26cd767a34eeb8531580b (diff) | |
parent | 6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1 (diff) |
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.h | 7 |
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: /// Returns a vector of recently released buffers specified by tag std::vector<Buffer::Tag> GetTagsAndReleaseBuffers(std::size_t max_count); + void SetVolume(float volume); + + float GetVolume() const { + return game_volume; + } + /// Returns true if the stream is currently playing bool IsPlaying() const { return state == State::Playing; @@ -94,6 +100,7 @@ private: u32 sample_rate; ///< Sample rate of the stream Format format; ///< Format of the stream + float game_volume = 1.0f; ///< The volume the game currently has set ReleaseCallback release_callback; ///< Buffer release callback for the stream State state{State::Stopped}; ///< Playback state of the stream Core::Timing::EventType* release_event{}; ///< Core timing release event for the stream |