aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLioncash <[email protected]>2022-09-16 09:50:32 -0400
committerLioncash <[email protected]>2022-09-16 09:50:32 -0400
commit36c77761cfeeab1afbc6a41bc868eeb4e9079c65 (patch)
treed100e0dcd6c14c734eebdb0a6eb65af5fb9abb1f
parent7a5d235d944bb3837abb0be649303a5c15ea36f5 (diff)
downloadyuzu-mainline-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar.gz
yuzu-mainline-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.zip
audio_render_manager: Mark several functions as const
-rw-r--r--src/audio_core/audio_render_manager.cpp6
-rw-r--r--src/audio_core/audio_render_manager.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/audio_core/audio_render_manager.cpp b/src/audio_core/audio_render_manager.cpp
index 7a846835b..7aba2b423 100644
--- a/src/audio_core/audio_render_manager.cpp
+++ b/src/audio_core/audio_render_manager.cpp
@@ -25,8 +25,8 @@ SystemManager& Manager::GetSystemManager() {
return *system_manager;
}
-auto Manager::GetWorkBufferSize(const AudioRendererParameterInternal& params, u64& out_count)
- -> Result {
+Result Manager::GetWorkBufferSize(const AudioRendererParameterInternal& params,
+ u64& out_count) const {
if (!CheckValidRevision(params.revision)) {
return Service::Audio::ERR_INVALID_REVISION;
}
@@ -54,7 +54,7 @@ void Manager::ReleaseSessionId(const s32 session_id) {
session_ids[--session_count] = session_id;
}
-u32 Manager::GetSessionCount() {
+u32 Manager::GetSessionCount() const {
std::scoped_lock l{session_lock};
return session_count;
}
diff --git a/src/audio_core/audio_render_manager.h b/src/audio_core/audio_render_manager.h
index 7119e1b99..bf4837190 100644
--- a/src/audio_core/audio_render_manager.h
+++ b/src/audio_core/audio_render_manager.h
@@ -46,7 +46,7 @@ public:
* @param out_count - Output size of the required workbuffer.
* @return Result code.
*/
- Result GetWorkBufferSize(const AudioRendererParameterInternal& params, u64& out_count);
+ Result GetWorkBufferSize(const AudioRendererParameterInternal& params, u64& out_count) const;
/**
* Get a new session id.
@@ -60,7 +60,7 @@ public:
*
* @return The number of active sessions.
*/
- u32 GetSessionCount();
+ u32 GetSessionCount() const;
/**
* Add a renderer system to the manager.
@@ -94,7 +94,7 @@ private:
/// Number of active renderers
u32 session_count{};
/// Lock for interacting with the sessions
- std::mutex session_lock{};
+ mutable std::mutex session_lock{};
/// Regularly generates commands from the registered systems for the AudioRenderer
std::unique_ptr<SystemManager> system_manager{};
};