summaryrefslogtreecommitdiff
path: root/src/audio_core/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/renderer')
-rw-r--r--src/audio_core/renderer/adsp/adsp.cpp2
-rw-r--r--src/audio_core/renderer/adsp/adsp.h2
-rw-r--r--src/audio_core/renderer/adsp/audio_renderer.cpp2
-rw-r--r--src/audio_core/renderer/adsp/audio_renderer.h2
-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
-rw-r--r--src/audio_core/renderer/effect/i3dl2.h4
-rw-r--r--src/audio_core/renderer/effect/reverb.h4
-rw-r--r--src/audio_core/renderer/nodes/node_states.h4
11 files changed, 16 insertions, 16 deletions
diff --git a/src/audio_core/renderer/adsp/adsp.cpp b/src/audio_core/renderer/adsp/adsp.cpp
index e05a22d86..a28395663 100644
--- a/src/audio_core/renderer/adsp/adsp.cpp
+++ b/src/audio_core/renderer/adsp/adsp.cpp
@@ -50,7 +50,7 @@ u32 ADSP::GetRemainCommandCount(const u32 session_id) const {
50 return render_mailbox.GetRemainCommandCount(session_id); 50 return render_mailbox.GetRemainCommandCount(session_id);
51} 51}
52 52
53void ADSP::SendCommandBuffer(const u32 session_id, CommandBuffer& command_buffer) { 53void ADSP::SendCommandBuffer(const u32 session_id, const CommandBuffer& command_buffer) {
54 render_mailbox.SetCommandBuffer(session_id, command_buffer); 54 render_mailbox.SetCommandBuffer(session_id, command_buffer);
55} 55}
56 56
diff --git a/src/audio_core/renderer/adsp/adsp.h b/src/audio_core/renderer/adsp/adsp.h
index 523184dc2..f7a2f25e4 100644
--- a/src/audio_core/renderer/adsp/adsp.h
+++ b/src/audio_core/renderer/adsp/adsp.h
@@ -131,7 +131,7 @@ public:
131 * @param session_id - The session id to check (0 or 1). 131 * @param session_id - The session id to check (0 or 1).
132 * @param command_buffer - The command buffer to process. 132 * @param command_buffer - The command buffer to process.
133 */ 133 */
134 void SendCommandBuffer(u32 session_id, CommandBuffer& command_buffer); 134 void SendCommandBuffer(u32 session_id, const CommandBuffer& command_buffer);
135 135
136 /** 136 /**
137 * Clear the command buffers (does not clear the time taken or the remaining command count) 137 * Clear the command buffers (does not clear the time taken or the remaining command count)
diff --git a/src/audio_core/renderer/adsp/audio_renderer.cpp b/src/audio_core/renderer/adsp/audio_renderer.cpp
index bcd889ecb..bafe4822a 100644
--- a/src/audio_core/renderer/adsp/audio_renderer.cpp
+++ b/src/audio_core/renderer/adsp/audio_renderer.cpp
@@ -51,7 +51,7 @@ CommandBuffer& AudioRenderer_Mailbox::GetCommandBuffer(const s32 session_id) {
51 return command_buffers[session_id]; 51 return command_buffers[session_id];
52} 52}
53 53
54void AudioRenderer_Mailbox::SetCommandBuffer(const u32 session_id, CommandBuffer& buffer) { 54void AudioRenderer_Mailbox::SetCommandBuffer(const u32 session_id, const CommandBuffer& buffer) {
55 command_buffers[session_id] = buffer; 55 command_buffers[session_id] = buffer;
56} 56}
57 57
diff --git a/src/audio_core/renderer/adsp/audio_renderer.h b/src/audio_core/renderer/adsp/audio_renderer.h
index 49f66f21c..02e923c84 100644
--- a/src/audio_core/renderer/adsp/audio_renderer.h
+++ b/src/audio_core/renderer/adsp/audio_renderer.h
@@ -91,7 +91,7 @@ public:
91 * @param session_id - The session id to get (0 or 1). 91 * @param session_id - The session id to get (0 or 1).
92 * @param buffer - The command buffer to set. 92 * @param buffer - The command buffer to set.
93 */ 93 */
94 void SetCommandBuffer(u32 session_id, CommandBuffer& buffer); 94 void SetCommandBuffer(u32 session_id, const CommandBuffer& buffer);
95 95
96 /** 96 /**
97 * Get the total render time taken for the last command lists sent. 97 * Get the total render time taken for the last command lists sent.
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() {
34 error_count = 0; 34 error_count = 0;
35} 35}
36 36
37void BehaviorInfo::AppendError(ErrorInfo& error) { 37void BehaviorInfo::AppendError(const ErrorInfo& error) {
38 LOG_ERROR(Service_Audio, "Error during RequestUpdate, reporting code {:04X} address {:08X}", 38 LOG_ERROR(Service_Audio, "Error during RequestUpdate, reporting code {:04X} address {:08X}",
39 error.error_code.raw, error.address); 39 error.error_code.raw, error.address);
40 if (error_count < MaxErrors) { 40 if (error_count < MaxErrors) {
@@ -42,7 +42,7 @@ void BehaviorInfo::AppendError(ErrorInfo& error) {
42 } 42 }
43} 43}
44 44
45void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) { 45void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) const {
46 out_count = std::min(error_count, MaxErrors); 46 out_count = std::min(error_count, MaxErrors);
47 47
48 for (size_t i = 0; i < MaxErrors; i++) { 48 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:
94 * 94 *
95 * @param error - The new error. 95 * @param error - The new error.
96 */ 96 */
97 void AppendError(ErrorInfo& error); 97 void AppendError(const ErrorInfo& error);
98 98
99 /** 99 /**
100 * Copy errors to the given output container. 100 * Copy errors to the given output container.
@@ -102,7 +102,7 @@ public:
102 * @param out_errors - Output container to receive the errors. 102 * @param out_errors - Output container to receive the errors.
103 * @param out_count - The number of errors written. 103 * @param out_count - The number of errors written.
104 */ 104 */
105 void CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count); 105 void CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) const;
106 106
107 /** 107 /**
108 * Update the behaviour flags. 108 * 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_) {
485 return ResultSuccess; 485 return ResultSuccess;
486} 486}
487 487
488Result InfoUpdater::UpdateErrorInfo(BehaviorInfo& behaviour_) { 488Result InfoUpdater::UpdateErrorInfo(const BehaviorInfo& behaviour_) {
489 auto out_params{reinterpret_cast<BehaviorInfo::OutStatus*>(output)}; 489 auto out_params{reinterpret_cast<BehaviorInfo::OutStatus*>(output)};
490 behaviour_.CopyErrorInfo(out_params->errors, out_params->error_count); 490 behaviour_.CopyErrorInfo(out_params->errors, out_params->error_count);
491 491
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:
130 * @param behaviour - Behaviour to update. 130 * @param behaviour - Behaviour to update.
131 * @return Result code. 131 * @return Result code.
132 */ 132 */
133 Result UpdateErrorInfo(BehaviorInfo& behaviour); 133 Result UpdateErrorInfo(const BehaviorInfo& behaviour);
134 134
135 /** 135 /**
136 * Update splitter. 136 * Update splitter.
diff --git a/src/audio_core/renderer/effect/i3dl2.h b/src/audio_core/renderer/effect/i3dl2.h
index 7a088a627..1ebbc5c4c 100644
--- a/src/audio_core/renderer/effect/i3dl2.h
+++ b/src/audio_core/renderer/effect/i3dl2.h
@@ -99,7 +99,7 @@ public:
99 return out_sample; 99 return out_sample;
100 } 100 }
101 101
102 Common::FixedPoint<50, 14> Read() { 102 Common::FixedPoint<50, 14> Read() const {
103 return *output; 103 return *output;
104 } 104 }
105 105
@@ -110,7 +110,7 @@ public:
110 } 110 }
111 } 111 }
112 112
113 Common::FixedPoint<50, 14> TapOut(const s32 index) { 113 Common::FixedPoint<50, 14> TapOut(const s32 index) const {
114 auto out{input - (index + 1)}; 114 auto out{input - (index + 1)};
115 if (out < buffer.data()) { 115 if (out < buffer.data()) {
116 out += max_delay + 1; 116 out += max_delay + 1;
diff --git a/src/audio_core/renderer/effect/reverb.h b/src/audio_core/renderer/effect/reverb.h
index b4df9f6ef..a72475c3c 100644
--- a/src/audio_core/renderer/effect/reverb.h
+++ b/src/audio_core/renderer/effect/reverb.h
@@ -95,7 +95,7 @@ public:
95 return out_sample; 95 return out_sample;
96 } 96 }
97 97
98 Common::FixedPoint<50, 14> Read() { 98 Common::FixedPoint<50, 14> Read() const {
99 return *output; 99 return *output;
100 } 100 }
101 101
@@ -106,7 +106,7 @@ public:
106 } 106 }
107 } 107 }
108 108
109 Common::FixedPoint<50, 14> TapOut(const s32 index) { 109 Common::FixedPoint<50, 14> TapOut(const s32 index) const {
110 auto out{input - (index + 1)}; 110 auto out{input - (index + 1)};
111 if (out < buffer.data()) { 111 if (out < buffer.data()) {
112 out += sample_count; 112 out += sample_count;
diff --git a/src/audio_core/renderer/nodes/node_states.h b/src/audio_core/renderer/nodes/node_states.h
index c0fced56f..94b1d1254 100644
--- a/src/audio_core/renderer/nodes/node_states.h
+++ b/src/audio_core/renderer/nodes/node_states.h
@@ -56,7 +56,7 @@ class NodeStates {
56 * 56 *
57 * @return The current stack position. 57 * @return The current stack position.
58 */ 58 */
59 u32 Count() { 59 u32 Count() const {
60 return pos; 60 return pos;
61 } 61 }
62 62
@@ -83,7 +83,7 @@ class NodeStates {
83 * 83 *
84 * @return The node on the top of the stack. 84 * @return The node on the top of the stack.
85 */ 85 */
86 u32 top() { 86 u32 top() const {
87 return stack[pos - 1]; 87 return stack[pos - 1];
88 } 88 }
89 89