summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-09-16 15:50:32 +0200
committerLioncash <mathew1800@gmail.com>2022-09-16 15:50:32 +0200
commit36c77761cfeeab1afbc6a41bc868eeb4e9079c65 (patch)
treed100e0dcd6c14c734eebdb0a6eb65af5fb9abb1f /src
parentaudio_in: Mark several functions as const (diff)
downloadyuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar
yuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar.gz
yuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar.bz2
yuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar.lz
yuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar.xz
yuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.tar.zst
yuzu-36c77761cfeeab1afbc6a41bc868eeb4e9079c65.zip
Diffstat (limited to 'src')
-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{};
};