summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-09-16 15:55:14 +0200
committerLioncash <mathew1800@gmail.com>2022-09-16 15:55:17 +0200
commitb2c2138af7c0ed5e6c254c9c62e19a30e80b3b42 (patch)
treefe23edd95c436169c80cdb7455e4b8bb76e55ae9 /src/audio_core
parentaudio_device: Mark GetDeviceVolume as const (diff)
downloadyuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.tar
yuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.tar.gz
yuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.tar.bz2
yuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.tar.lz
yuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.tar.xz
yuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.tar.zst
yuzu-b2c2138af7c0ed5e6c254c9c62e19a30e80b3b42.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/renderer/behavior/behavior_info.cpp4
-rw-r--r--src/audio_core/renderer/behavior/behavior_info.h4
-rw-r--r--src/audio_core/renderer/behavior/info_updater.cpp2
-rw-r--r--src/audio_core/renderer/behavior/info_updater.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/audio_core/renderer/behavior/behavior_info.cpp b/src/audio_core/renderer/behavior/behavior_info.cpp
index 92140aaea..3d2a91312 100644
--- a/src/audio_core/renderer/behavior/behavior_info.cpp
+++ b/src/audio_core/renderer/behavior/behavior_info.cpp
@@ -34,7 +34,7 @@ void BehaviorInfo::ClearError() {
error_count = 0;
}
-void BehaviorInfo::AppendError(ErrorInfo& error) {
+void BehaviorInfo::AppendError(const ErrorInfo& error) {
LOG_ERROR(Service_Audio, "Error during RequestUpdate, reporting code {:04X} address {:08X}",
error.error_code.raw, error.address);
if (error_count < MaxErrors) {
@@ -42,7 +42,7 @@ void BehaviorInfo::AppendError(ErrorInfo& error) {
}
}
-void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) {
+void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) const {
out_count = std::min(error_count, MaxErrors);
for (size_t i = 0; i < MaxErrors; i++) {
diff --git a/src/audio_core/renderer/behavior/behavior_info.h b/src/audio_core/renderer/behavior/behavior_info.h
index 7333c297f..15c948344 100644
--- a/src/audio_core/renderer/behavior/behavior_info.h
+++ b/src/audio_core/renderer/behavior/behavior_info.h
@@ -94,7 +94,7 @@ public:
*
* @param error - The new error.
*/
- void AppendError(ErrorInfo& error);
+ void AppendError(const ErrorInfo& error);
/**
* Copy errors to the given output container.
@@ -102,7 +102,7 @@ public:
* @param out_errors - Output container to receive the errors.
* @param out_count - The number of errors written.
*/
- void CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count);
+ void CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) const;
/**
* Update the behaviour flags.
diff --git a/src/audio_core/renderer/behavior/info_updater.cpp b/src/audio_core/renderer/behavior/info_updater.cpp
index 06a37e1a6..c0a307b89 100644
--- a/src/audio_core/renderer/behavior/info_updater.cpp
+++ b/src/audio_core/renderer/behavior/info_updater.cpp
@@ -485,7 +485,7 @@ Result InfoUpdater::UpdateBehaviorInfo(BehaviorInfo& behaviour_) {
return ResultSuccess;
}
-Result InfoUpdater::UpdateErrorInfo(BehaviorInfo& behaviour_) {
+Result InfoUpdater::UpdateErrorInfo(const BehaviorInfo& behaviour_) {
auto out_params{reinterpret_cast<BehaviorInfo::OutStatus*>(output)};
behaviour_.CopyErrorInfo(out_params->errors, out_params->error_count);
diff --git a/src/audio_core/renderer/behavior/info_updater.h b/src/audio_core/renderer/behavior/info_updater.h
index f0b445d9c..c817d8d8d 100644
--- a/src/audio_core/renderer/behavior/info_updater.h
+++ b/src/audio_core/renderer/behavior/info_updater.h
@@ -130,7 +130,7 @@ public:
* @param behaviour - Behaviour to update.
* @return Result code.
*/
- Result UpdateErrorInfo(BehaviorInfo& behaviour);
+ Result UpdateErrorInfo(const BehaviorInfo& behaviour);
/**
* Update splitter.