From b862d5d8d851724e53f0da122ccfc1af1fb1c9bd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 16 Sep 2022 09:52:32 -0400 Subject: audio_device: Mark GetDeviceVolume as const This doesn't modify instance state. --- src/audio_core/renderer/audio_device.cpp | 2 +- src/audio_core/renderer/audio_device.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/audio_core') diff --git a/src/audio_core/renderer/audio_device.cpp b/src/audio_core/renderer/audio_device.cpp index d5886e55e..b2d34e45a 100644 --- a/src/audio_core/renderer/audio_device.cpp +++ b/src/audio_core/renderer/audio_device.cpp @@ -45,7 +45,7 @@ void AudioDevice::SetDeviceVolumes(const f32 volume) { output_sink.SetDeviceVolume(volume); } -f32 AudioDevice::GetDeviceVolume([[maybe_unused]] std::string_view name) { +f32 AudioDevice::GetDeviceVolume([[maybe_unused]] std::string_view name) const { return output_sink.GetDeviceVolume(); } diff --git a/src/audio_core/renderer/audio_device.h b/src/audio_core/renderer/audio_device.h index 1f449f261..16522ad2f 100644 --- a/src/audio_core/renderer/audio_device.h +++ b/src/audio_core/renderer/audio_device.h @@ -73,7 +73,7 @@ public: * @param name - Name of the device to check. Unused. * @return Volume of the device. */ - f32 GetDeviceVolume(std::string_view name); + f32 GetDeviceVolume(std::string_view name) const; private: /// Backend output sink for the device -- cgit v1.2.3