From d1f3c121a04fdc1e4d8840ef6a5bbb65212ed7a7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 16 Sep 2022 09:38:17 -0400 Subject: audio_out: Mark several functions as const These don't affect class state, so we can mark them as such. --- src/audio_core/out/audio_out_system.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/audio_core/out/audio_out_system.cpp') diff --git a/src/audio_core/out/audio_out_system.cpp b/src/audio_core/out/audio_out_system.cpp index ae605f65b..8b907590a 100644 --- a/src/audio_core/out/audio_out_system.cpp +++ b/src/audio_core/out/audio_out_system.cpp @@ -27,11 +27,12 @@ void System::Finalize() { buffer_event->GetWritableEvent().Signal(); } -std::string_view System::GetDefaultOutputDeviceName() { +std::string_view System::GetDefaultOutputDeviceName() const { return "DeviceOut"; } -Result System::IsConfigValid(std::string_view device_name, const AudioOutParameter& in_params) { +Result System::IsConfigValid(std::string_view device_name, + const AudioOutParameter& in_params) const { if ((device_name.size() > 0) && (device_name != GetDefaultOutputDeviceName())) { return Service::Audio::ERR_INVALID_DEVICE_NAME; } @@ -200,11 +201,11 @@ void System::SetVolume(const f32 volume_) { session->SetVolume(volume_); } -bool System::ContainsAudioBuffer(const u64 tag) { +bool System::ContainsAudioBuffer(const u64 tag) const { return buffers.ContainsBuffer(tag); } -u32 System::GetBufferCount() { +u32 System::GetBufferCount() const { return buffers.GetAppendedRegisteredCount(); } -- cgit v1.2.3