audio_render_manager: Mark several functions as const
This commit is contained in:
parent
7a5d235d94
commit
36c77761cf
|
@ -25,8 +25,8 @@ SystemManager& Manager::GetSystemManager() {
|
||||||
return *system_manager;
|
return *system_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Manager::GetWorkBufferSize(const AudioRendererParameterInternal& params, u64& out_count)
|
Result Manager::GetWorkBufferSize(const AudioRendererParameterInternal& params,
|
||||||
-> Result {
|
u64& out_count) const {
|
||||||
if (!CheckValidRevision(params.revision)) {
|
if (!CheckValidRevision(params.revision)) {
|
||||||
return Service::Audio::ERR_INVALID_REVISION;
|
return Service::Audio::ERR_INVALID_REVISION;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ void Manager::ReleaseSessionId(const s32 session_id) {
|
||||||
session_ids[--session_count] = session_id;
|
session_ids[--session_count] = session_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 Manager::GetSessionCount() {
|
u32 Manager::GetSessionCount() const {
|
||||||
std::scoped_lock l{session_lock};
|
std::scoped_lock l{session_lock};
|
||||||
return session_count;
|
return session_count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
* @param out_count - Output size of the required workbuffer.
|
* @param out_count - Output size of the required workbuffer.
|
||||||
* @return Result code.
|
* @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.
|
* Get a new session id.
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
*
|
*
|
||||||
* @return The number of active sessions.
|
* @return The number of active sessions.
|
||||||
*/
|
*/
|
||||||
u32 GetSessionCount();
|
u32 GetSessionCount() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a renderer system to the manager.
|
* Add a renderer system to the manager.
|
||||||
|
@ -94,7 +94,7 @@ private:
|
||||||
/// Number of active renderers
|
/// Number of active renderers
|
||||||
u32 session_count{};
|
u32 session_count{};
|
||||||
/// Lock for interacting with the sessions
|
/// 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
|
/// Regularly generates commands from the registered systems for the AudioRenderer
|
||||||
std::unique_ptr<SystemManager> system_manager{};
|
std::unique_ptr<SystemManager> system_manager{};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue