summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/audio_core/audio_core.h2
-rw-r--r--src/audio_core/audio_event.h4
-rw-r--r--src/audio_core/audio_in_manager.h5
-rw-r--r--src/audio_core/audio_manager.h2
-rw-r--r--src/audio_core/audio_render_manager.h6
-rw-r--r--src/audio_core/device/audio_buffers.h4
-rw-r--r--src/audio_core/device/device_session.h3
-rw-r--r--src/audio_core/in/audio_in_system.h2
-rw-r--r--src/audio_core/out/audio_out_system.h2
-rw-r--r--src/audio_core/renderer/adsp/adsp.h2
-rw-r--r--src/audio_core/renderer/adsp/audio_renderer.h6
-rw-r--r--src/audio_core/renderer/adsp/command_list_processor.h13
-rw-r--r--src/audio_core/renderer/command/command_buffer.h12
-rw-r--r--src/audio_core/renderer/command/command_generator.h46
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp.cpp18
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp.h8
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp_grouped.h4
-rw-r--r--src/audio_core/renderer/effect/effect_context.h14
-rw-r--r--src/audio_core/renderer/effect/effect_info_base.h4
-rw-r--r--src/audio_core/renderer/memory/address_info.h5
-rw-r--r--src/audio_core/renderer/nodes/node_states.h4
-rw-r--r--src/audio_core/renderer/performance/performance_manager.h8
-rw-r--r--src/audio_core/renderer/upsampler/upsampler_manager.h2
-rw-r--r--src/audio_core/renderer/voice/voice_info.h26
-rw-r--r--src/audio_core/sink/cubeb_sink.h5
-rw-r--r--src/audio_core/sink/sdl2_sink.h5
-rw-r--r--src/audio_core/sink/sink.h3
-rw-r--r--src/audio_core/sink/sink_stream.h2
28 files changed, 105 insertions, 112 deletions
diff --git a/src/audio_core/audio_core.h b/src/audio_core/audio_core.h
index ac9afefaa..e48fdc323 100644
--- a/src/audio_core/audio_core.h
+++ b/src/audio_core/audio_core.h
@@ -17,7 +17,7 @@ namespace AudioCore {
17 17
18class AudioManager; 18class AudioManager;
19/** 19/**
20 * Main audio class, sotred inside the core, and holding the audio manager, all sinks, and the ADSP. 20 * Main audio class, stored inside the core, and holding the audio manager, all sinks, and the ADSP.
21 */ 21 */
22class AudioCore { 22class AudioCore {
23public: 23public:
diff --git a/src/audio_core/audio_event.h b/src/audio_core/audio_event.h
index 82dd32dca..012d2ed70 100644
--- a/src/audio_core/audio_event.h
+++ b/src/audio_core/audio_event.h
@@ -14,7 +14,7 @@ namespace AudioCore {
14 * Responsible for the input/output events, set by the stream backend when buffers are consumed, and 14 * Responsible for the input/output events, set by the stream backend when buffers are consumed, and
15 * waited on by the audio manager. These callbacks signal the game's events to keep the audio buffer 15 * waited on by the audio manager. These callbacks signal the game's events to keep the audio buffer
16 * recycling going. 16 * recycling going.
17 * In a real Switch this is not a seprate class, and exists entirely within the audio manager. 17 * In a real Switch this is not a separate class, and exists entirely within the audio manager.
18 * On the Switch it's implemented more simply through a MultiWaitEventHolder, where it can 18 * On the Switch it's implemented more simply through a MultiWaitEventHolder, where it can
19 * wait on multiple events at once, and the events are not needed by the backend. 19 * wait on multiple events at once, and the events are not needed by the backend.
20 */ 20 */
@@ -81,7 +81,7 @@ public:
81 void ClearEvents(); 81 void ClearEvents();
82 82
83private: 83private:
84 /// Lock, used bythe audio manager 84 /// Lock, used by the audio manager
85 std::mutex event_lock; 85 std::mutex event_lock;
86 /// Array of events, one per system type (see Type), last event is used to terminate 86 /// Array of events, one per system type (see Type), last event is used to terminate
87 std::array<std::atomic<bool>, 4> events_signalled; 87 std::array<std::atomic<bool>, 4> events_signalled;
diff --git a/src/audio_core/audio_in_manager.h b/src/audio_core/audio_in_manager.h
index 75b73a0b6..8a519df99 100644
--- a/src/audio_core/audio_in_manager.h
+++ b/src/audio_core/audio_in_manager.h
@@ -59,9 +59,10 @@ public:
59 /** 59 /**
60 * Get a list of audio in device names. 60 * Get a list of audio in device names.
61 * 61 *
62 * @oaram names - Output container to write names to. 62 * @param names - Output container to write names to.
63 * @param max_count - Maximum numebr of deivce names to write. Unused 63 * @param max_count - Maximum number of device names to write. Unused
64 * @param filter - Should the list be filtered? Unused. 64 * @param filter - Should the list be filtered? Unused.
65 *
65 * @return Number of names written. 66 * @return Number of names written.
66 */ 67 */
67 u32 GetDeviceNames(std::vector<AudioRenderer::AudioDevice::AudioDeviceName>& names, 68 u32 GetDeviceNames(std::vector<AudioRenderer::AudioDevice::AudioDeviceName>& names,
diff --git a/src/audio_core/audio_manager.h b/src/audio_core/audio_manager.h
index 70316e9cb..8cbd95e22 100644
--- a/src/audio_core/audio_manager.h
+++ b/src/audio_core/audio_manager.h
@@ -76,7 +76,7 @@ public:
76 76
77private: 77private:
78 /** 78 /**
79 * Main thread, waiting on a manager signal and calling the registered fucntion. 79 * Main thread, waiting on a manager signal and calling the registered function.
80 */ 80 */
81 void ThreadFunc(); 81 void ThreadFunc();
82 82
diff --git a/src/audio_core/audio_render_manager.h b/src/audio_core/audio_render_manager.h
index 6a508ec56..7119e1b99 100644
--- a/src/audio_core/audio_render_manager.h
+++ b/src/audio_core/audio_render_manager.h
@@ -64,10 +64,10 @@ public:
64 64
65 /** 65 /**
66 * Add a renderer system to the manager. 66 * Add a renderer system to the manager.
67 * The system will be reguarly called to generate commands for the AudioRenderer. 67 * The system will be regularly called to generate commands for the AudioRenderer.
68 * 68 *
69 * @param system - The system to add. 69 * @param system - The system to add.
70 * @return True if the system was sucessfully added, otherwise false. 70 * @return True if the system was successfully added, otherwise false.
71 */ 71 */
72 bool AddSystem(System& system); 72 bool AddSystem(System& system);
73 73
@@ -75,7 +75,7 @@ public:
75 * Remove a renderer system from the manager. 75 * Remove a renderer system from the manager.
76 * 76 *
77 * @param system - The system to remove. 77 * @param system - The system to remove.
78 * @return True if the system was sucessfully removed, otherwise false. 78 * @return True if the system was successfully removed, otherwise false.
79 */ 79 */
80 bool RemoveSystem(System& system); 80 bool RemoveSystem(System& system);
81 81
diff --git a/src/audio_core/device/audio_buffers.h b/src/audio_core/device/audio_buffers.h
index 57c78d439..3ecbbb63f 100644
--- a/src/audio_core/device/audio_buffers.h
+++ b/src/audio_core/device/audio_buffers.h
@@ -88,7 +88,9 @@ public:
88 /** 88 /**
89 * Release all registered buffers. 89 * Release all registered buffers.
90 * 90 *
91 * @param timestamp - The released timestamp for this buffer. 91 * @param core_timing - The CoreTiming instance
92 * @param session - The device session
93 *
92 * @return Is the buffer was released. 94 * @return Is the buffer was released.
93 */ 95 */
94 bool ReleaseBuffers(Core::Timing::CoreTiming& core_timing, DeviceSession& session) { 96 bool ReleaseBuffers(Core::Timing::CoreTiming& core_timing, DeviceSession& session) {
diff --git a/src/audio_core/device/device_session.h b/src/audio_core/device/device_session.h
index 3414e2c06..53b649c61 100644
--- a/src/audio_core/device/device_session.h
+++ b/src/audio_core/device/device_session.h
@@ -74,7 +74,8 @@ public:
74 /** 74 /**
75 * Check if the buffer for the given tag has been consumed by the backend. 75 * Check if the buffer for the given tag has been consumed by the backend.
76 * 76 *
77 * @param tag - Unqiue tag of the buffer to check. 77 * @param buffer - the buffer to check.
78 *
78 * @return true if the buffer has been consumed, otherwise false. 79 * @return true if the buffer has been consumed, otherwise false.
79 */ 80 */
80 bool IsBufferConsumed(AudioBuffer& buffer) const; 81 bool IsBufferConsumed(AudioBuffer& buffer) const;
diff --git a/src/audio_core/in/audio_in_system.h b/src/audio_core/in/audio_in_system.h
index 165e35d83..9ddc8daae 100644
--- a/src/audio_core/in/audio_in_system.h
+++ b/src/audio_core/in/audio_in_system.h
@@ -208,7 +208,7 @@ public:
208 /** 208 /**
209 * Set this system's current volume. 209 * Set this system's current volume.
210 * 210 *
211 * @param The new volume. 211 * @param volume The new volume.
212 */ 212 */
213 void SetVolume(f32 volume); 213 void SetVolume(f32 volume);
214 214
diff --git a/src/audio_core/out/audio_out_system.h b/src/audio_core/out/audio_out_system.h
index 4ca2f3417..205ead861 100644
--- a/src/audio_core/out/audio_out_system.h
+++ b/src/audio_core/out/audio_out_system.h
@@ -199,7 +199,7 @@ public:
199 /** 199 /**
200 * Set this system's current volume. 200 * Set this system's current volume.
201 * 201 *
202 * @param The new volume. 202 * @param volume The new volume.
203 */ 203 */
204 void SetVolume(f32 volume); 204 void SetVolume(f32 volume);
205 205
diff --git a/src/audio_core/renderer/adsp/adsp.h b/src/audio_core/renderer/adsp/adsp.h
index 4dfcef4a5..523184dc2 100644
--- a/src/audio_core/renderer/adsp/adsp.h
+++ b/src/audio_core/renderer/adsp/adsp.h
@@ -63,8 +63,6 @@ public:
63 63
64 /** 64 /**
65 * Stop the ADSP. 65 * Stop the ADSP.
66 *
67 * @return True if started or already running, otherwise false.
68 */ 66 */
69 void Stop(); 67 void Stop();
70 68
diff --git a/src/audio_core/renderer/adsp/audio_renderer.h b/src/audio_core/renderer/adsp/audio_renderer.h
index b6ced9d2b..49f66f21c 100644
--- a/src/audio_core/renderer/adsp/audio_renderer.h
+++ b/src/audio_core/renderer/adsp/audio_renderer.h
@@ -52,7 +52,7 @@ public:
52 /** 52 /**
53 * Send a message from the host to the AudioRenderer. 53 * Send a message from the host to the AudioRenderer.
54 * 54 *
55 * @param message_ - The message to send to the AudioRenderer. 55 * @param message - The message to send to the AudioRenderer.
56 */ 56 */
57 void HostSendMessage(RenderMessage message); 57 void HostSendMessage(RenderMessage message);
58 58
@@ -66,7 +66,7 @@ public:
66 /** 66 /**
67 * Send a message from the AudioRenderer to the host. 67 * Send a message from the AudioRenderer to the host.
68 * 68 *
69 * @param message_ - The message to send to the host. 69 * @param message - The message to send to the host.
70 */ 70 */
71 void ADSPSendMessage(RenderMessage message); 71 void ADSPSendMessage(RenderMessage message);
72 72
@@ -163,7 +163,7 @@ public:
163 /** 163 /**
164 * Start the AudioRenderer. 164 * Start the AudioRenderer.
165 * 165 *
166 * @param The mailbox to use for this session. 166 * @param mailbox The mailbox to use for this session.
167 */ 167 */
168 void Start(AudioRenderer_Mailbox* mailbox); 168 void Start(AudioRenderer_Mailbox* mailbox);
169 169
diff --git a/src/audio_core/renderer/adsp/command_list_processor.h b/src/audio_core/renderer/adsp/command_list_processor.h
index 3f99173e3..d78269e1d 100644
--- a/src/audio_core/renderer/adsp/command_list_processor.h
+++ b/src/audio_core/renderer/adsp/command_list_processor.h
@@ -33,10 +33,10 @@ public:
33 /** 33 /**
34 * Initialize the processor. 34 * Initialize the processor.
35 * 35 *
36 * @param system_ - The core system. 36 * @param system - The core system.
37 * @param buffer - The command buffer to process. 37 * @param buffer - The command buffer to process.
38 * @param size - The size of the buffer. 38 * @param size - The size of the buffer.
39 * @param stream_ - The stream to be used for sending the samples. 39 * @param stream - The stream to be used for sending the samples.
40 */ 40 */
41 void Initialize(Core::System& system, CpuAddr buffer, u64 size, Sink::SinkStream* stream); 41 void Initialize(Core::System& system, CpuAddr buffer, u64 size, Sink::SinkStream* stream);
42 42
@@ -72,7 +72,8 @@ public:
72 /** 72 /**
73 * Process the command list. 73 * Process the command list.
74 * 74 *
75 * @param index - Index of the current command list. 75 * @param session_id - Session ID for the commands being processed.
76 *
76 * @return The time taken to process. 77 * @return The time taken to process.
77 */ 78 */
78 u64 Process(u32 session_id); 79 u64 Process(u32 session_id);
@@ -89,7 +90,7 @@ public:
89 u8* commands{}; 90 u8* commands{};
90 /// The command buffer size 91 /// The command buffer size
91 u64 commands_buffer_size{}; 92 u64 commands_buffer_size{};
92 /// The maximum processing time alloted 93 /// The maximum processing time allotted
93 u64 max_process_time{}; 94 u64 max_process_time{};
94 /// The number of commands in the buffer 95 /// The number of commands in the buffer
95 u32 command_count{}; 96 u32 command_count{};
diff --git a/src/audio_core/renderer/command/command_buffer.h b/src/audio_core/renderer/command/command_buffer.h
index 496b0e50a..162170846 100644
--- a/src/audio_core/renderer/command/command_buffer.h
+++ b/src/audio_core/renderer/command/command_buffer.h
@@ -191,6 +191,7 @@ public:
191 * @param volume - Current mix volume used for calculating the ramp. 191 * @param volume - Current mix volume used for calculating the ramp.
192 * @param prev_volume - Previous mix volume, used for calculating the ramp, 192 * @param prev_volume - Previous mix volume, used for calculating the ramp,
193 * also applied to the input. 193 * also applied to the input.
194 * @param prev_samples - Previous sample buffer. Used for depopping.
194 * @param precision - Number of decimal bits for fixed point operations. 195 * @param precision - Number of decimal bits for fixed point operations.
195 */ 196 */
196 void GenerateMixRampCommand(s32 node_id, s16 buffer_count, s16 input_index, s16 output_index, 197 void GenerateMixRampCommand(s32 node_id, s16 buffer_count, s16 input_index, s16 output_index,
@@ -208,6 +209,7 @@ public:
208 * @param volumes - Current mix volumes used for calculating the ramp. 209 * @param volumes - Current mix volumes used for calculating the ramp.
209 * @param prev_volumes - Previous mix volumes, used for calculating the ramp, 210 * @param prev_volumes - Previous mix volumes, used for calculating the ramp,
210 * also applied to the input. 211 * also applied to the input.
212 * @param prev_samples - Previous sample buffer. Used for depopping.
211 * @param precision - Number of decimal bits for fixed point operations. 213 * @param precision - Number of decimal bits for fixed point operations.
212 */ 214 */
213 void GenerateMixRampGroupedCommand(s32 node_id, s16 buffer_count, s16 input_index, 215 void GenerateMixRampGroupedCommand(s32 node_id, s16 buffer_count, s16 input_index,
@@ -297,11 +299,11 @@ public:
297 /** 299 /**
298 * Generate a device sink command, adding it to the command list. 300 * Generate a device sink command, adding it to the command list.
299 * 301 *
300 * @param node_id - Node id of the voice this command is generated for. 302 * @param node_id - Node id of the voice this command is generated for.
301 * @param buffer_offset - Base mix buffer offset to use. 303 * @param buffer_offset - Base mix buffer offset to use.
302 * @param sink_info - The sink_info to generate this command from. 304 * @param sink_info - The sink_info to generate this command from.
303 * @session_id - System session id this command is generated from. 305 * @param session_id - System session id this command is generated from.
304 * @samples_buffer - The buffer to be sent to the sink if upsampling is not used. 306 * @param samples_buffer - The buffer to be sent to the sink if upsampling is not used.
305 */ 307 */
306 void GenerateDeviceSinkCommand(s32 node_id, s16 buffer_offset, SinkInfoBase& sink_info, 308 void GenerateDeviceSinkCommand(s32 node_id, s16 buffer_offset, SinkInfoBase& sink_info,
307 u32 session_id, std::span<s32> samples_buffer); 309 u32 session_id, std::span<s32> samples_buffer);
diff --git a/src/audio_core/renderer/command/command_generator.h b/src/audio_core/renderer/command/command_generator.h
index d80d9b0d8..b3cd7b408 100644
--- a/src/audio_core/renderer/command/command_generator.h
+++ b/src/audio_core/renderer/command/command_generator.h
@@ -197,9 +197,9 @@ public:
197 /** 197 /**
198 * Generate an I3DL2 reverb effect command. 198 * Generate an I3DL2 reverb effect command.
199 * 199 *
200 * @param buffer_offset - Base mix buffer offset to use. 200 * @param buffer_offset - Base mix buffer offset to use.
201 * @param effect_info_base - I3DL2Reverb effect info. 201 * @param effect_info - I3DL2Reverb effect info.
202 * @param node_id - Node id of the mix this command is generated for. 202 * @param node_id - Node id of the mix this command is generated for.
203 */ 203 */
204 void GenerateI3dl2ReverbEffectCommand(s16 buffer_offset, EffectInfoBase& effect_info, 204 void GenerateI3dl2ReverbEffectCommand(s16 buffer_offset, EffectInfoBase& effect_info,
205 s32 node_id); 205 s32 node_id);
@@ -207,18 +207,18 @@ public:
207 /** 207 /**
208 * Generate an aux effect command. 208 * Generate an aux effect command.
209 * 209 *
210 * @param buffer_offset - Base mix buffer offset to use. 210 * @param buffer_offset - Base mix buffer offset to use.
211 * @param effect_info_base - Aux effect info. 211 * @param effect_info - Aux effect info.
212 * @param node_id - Node id of the mix this command is generated for. 212 * @param node_id - Node id of the mix this command is generated for.
213 */ 213 */
214 void GenerateAuxCommand(s16 buffer_offset, EffectInfoBase& effect_info, s32 node_id); 214 void GenerateAuxCommand(s16 buffer_offset, EffectInfoBase& effect_info, s32 node_id);
215 215
216 /** 216 /**
217 * Generate a biquad filter effect command. 217 * Generate a biquad filter effect command.
218 * 218 *
219 * @param buffer_offset - Base mix buffer offset to use. 219 * @param buffer_offset - Base mix buffer offset to use.
220 * @param effect_info_base - Aux effect info. 220 * @param effect_info - Aux effect info.
221 * @param node_id - Node id of the mix this command is generated for. 221 * @param node_id - Node id of the mix this command is generated for.
222 */ 222 */
223 void GenerateBiquadFilterEffectCommand(s16 buffer_offset, EffectInfoBase& effect_info, 223 void GenerateBiquadFilterEffectCommand(s16 buffer_offset, EffectInfoBase& effect_info,
224 s32 node_id); 224 s32 node_id);
@@ -226,10 +226,10 @@ public:
226 /** 226 /**
227 * Generate a light limiter effect command. 227 * Generate a light limiter effect command.
228 * 228 *
229 * @param buffer_offset - Base mix buffer offset to use. 229 * @param buffer_offset - Base mix buffer offset to use.
230 * @param effect_info_base - Limiter effect info. 230 * @param effect_info - Limiter effect info.
231 * @param node_id - Node id of the mix this command is generated for. 231 * @param node_id - Node id of the mix this command is generated for.
232 * @param effect_index - Index for the statistics state. 232 * @param effect_index - Index for the statistics state.
233 */ 233 */
234 void GenerateLightLimiterEffectCommand(s16 buffer_offset, EffectInfoBase& effect_info, 234 void GenerateLightLimiterEffectCommand(s16 buffer_offset, EffectInfoBase& effect_info,
235 s32 node_id, u32 effect_index); 235 s32 node_id, u32 effect_index);
@@ -238,21 +238,20 @@ public:
238 * Generate a capture effect command. 238 * Generate a capture effect command.
239 * Writes a mix buffer back to game memory. 239 * Writes a mix buffer back to game memory.
240 * 240 *
241 * @param buffer_offset - Base mix buffer offset to use. 241 * @param buffer_offset - Base mix buffer offset to use.
242 * @param effect_info_base - Capture effect info. 242 * @param effect_info - Capture effect info.
243 * @param node_id - Node id of the mix this command is generated for. 243 * @param node_id - Node id of the mix this command is generated for.
244 */ 244 */
245 void GenerateCaptureCommand(s16 buffer_offset, EffectInfoBase& effect_info, s32 node_id); 245 void GenerateCaptureCommand(s16 buffer_offset, EffectInfoBase& effect_info, s32 node_id);
246 246
247 /** 247 /**
248 * Generate a compressor effect command. 248 * Generate a compressor effect command.
249 * 249 *
250 * @param buffer_offset - Base mix buffer offset to use. 250 * @param buffer_offset - Base mix buffer offset to use.
251 * @param effect_info_base - Compressor effect info. 251 * @param effect_info - Compressor effect info.
252 * @param node_id - Node id of the mix this command is generated for. 252 * @param node_id - Node id of the mix this command is generated for.
253 */ 253 */
254 void GenerateCompressorCommand(const s16 buffer_offset, EffectInfoBase& effect_info, 254 void GenerateCompressorCommand(s16 buffer_offset, EffectInfoBase& effect_info, s32 node_id);
255 const s32 node_id);
256 255
257 /** 256 /**
258 * Generate all effect commands for a mix. 257 * Generate all effect commands for a mix.
@@ -318,8 +317,9 @@ public:
318 * Generate a performance command. 317 * Generate a performance command.
319 * Used to report performance metrics of the AudioRenderer back to the game. 318 * Used to report performance metrics of the AudioRenderer back to the game.
320 * 319 *
321 * @param buffer_offset - Base mix buffer offset to use. 320 * @param node_id - Node ID of the mix this command is generated for
322 * @param sink_info - Sink info to generate the commands from. 321 * @param state - Output state of the generated performance command
322 * @param entry_addresses - Addresses to be written
323 */ 323 */
324 void GeneratePerformanceCommand(s32 node_id, PerformanceState state, 324 void GeneratePerformanceCommand(s32 node_id, PerformanceState state,
325 const PerformanceEntryAddresses& entry_addresses); 325 const PerformanceEntryAddresses& entry_addresses);
diff --git a/src/audio_core/renderer/command/mix/mix_ramp.cpp b/src/audio_core/renderer/command/mix/mix_ramp.cpp
index ffdafa1c8..d67123cd8 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp.cpp
+++ b/src/audio_core/renderer/command/mix/mix_ramp.cpp
@@ -7,17 +7,7 @@
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::AudioRenderer {
10/** 10
11 * Mix input mix buffer into output mix buffer, with volume applied to the input.
12 *
13 * @tparam Q - Number of bits for fixed point operations.
14 * @param output - Output mix buffer.
15 * @param input - Input mix buffer.
16 * @param volume - Volume applied to the input.
17 * @param ramp - Ramp applied to volume every sample.
18 * @param sample_count - Number of samples to process.
19 * @return The final gained input sample, used for depopping.
20 */
21template <size_t Q> 11template <size_t Q>
22s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 volume_, 12s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 volume_,
23 const f32 ramp_, const u32 sample_count) { 13 const f32 ramp_, const u32 sample_count) {
@@ -40,10 +30,8 @@ s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 vo
40 return sample.to_int(); 30 return sample.to_int();
41} 31}
42 32
43template s32 ApplyMixRamp<15>(std::span<s32>, std::span<const s32>, const f32, const f32, 33template s32 ApplyMixRamp<15>(std::span<s32>, std::span<const s32>, f32, f32, u32);
44 const u32); 34template s32 ApplyMixRamp<23>(std::span<s32>, std::span<const s32>, f32, f32, u32);
45template s32 ApplyMixRamp<23>(std::span<s32>, std::span<const s32>, const f32, const f32,
46 const u32);
47 35
48void MixRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::string& string) { 36void MixRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::string& string) {
49 const auto ramp{(volume - prev_volume) / static_cast<f32>(processor.sample_count)}; 37 const auto ramp{(volume - prev_volume) / static_cast<f32>(processor.sample_count)};
diff --git a/src/audio_core/renderer/command/mix/mix_ramp.h b/src/audio_core/renderer/command/mix/mix_ramp.h
index 770f57e80..52f74a273 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp.h
+++ b/src/audio_core/renderer/command/mix/mix_ramp.h
@@ -61,13 +61,13 @@ struct MixRampCommand : ICommand {
61 * @tparam Q - Number of bits for fixed point operations. 61 * @tparam Q - Number of bits for fixed point operations.
62 * @param output - Output mix buffer. 62 * @param output - Output mix buffer.
63 * @param input - Input mix buffer. 63 * @param input - Input mix buffer.
64 * @param volume - Volume applied to the input. 64 * @param volume_ - Volume applied to the input.
65 * @param ramp - Ramp applied to volume every sample. 65 * @param ramp_ - Ramp applied to volume every sample.
66 * @param sample_count - Number of samples to process. 66 * @param sample_count - Number of samples to process.
67 * @return The final gained input sample, used for depopping. 67 * @return The final gained input sample, used for depopping.
68 */ 68 */
69template <size_t Q> 69template <size_t Q>
70s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 volume_, 70s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, f32 volume_, f32 ramp_,
71 const f32 ramp_, const u32 sample_count); 71 u32 sample_count);
72 72
73} // namespace AudioCore::AudioRenderer 73} // namespace AudioCore::AudioRenderer
diff --git a/src/audio_core/renderer/command/mix/mix_ramp_grouped.h b/src/audio_core/renderer/command/mix/mix_ramp_grouped.h
index 027276e5a..3b0ce67ef 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp_grouped.h
+++ b/src/audio_core/renderer/command/mix/mix_ramp_grouped.h
@@ -50,9 +50,9 @@ struct MixRampGroupedCommand : ICommand {
50 std::array<s16, MaxMixBuffers> inputs; 50 std::array<s16, MaxMixBuffers> inputs;
51 /// Output mix buffer indexes for each mix buffer 51 /// Output mix buffer indexes for each mix buffer
52 std::array<s16, MaxMixBuffers> outputs; 52 std::array<s16, MaxMixBuffers> outputs;
53 /// Previous mix vloumes for each mix buffer 53 /// Previous mix volumes for each mix buffer
54 std::array<f32, MaxMixBuffers> prev_volumes; 54 std::array<f32, MaxMixBuffers> prev_volumes;
55 /// Current mix vloumes for each mix buffer 55 /// Current mix volumes for each mix buffer
56 std::array<f32, MaxMixBuffers> volumes; 56 std::array<f32, MaxMixBuffers> volumes;
57 /// Pointer to the previous sample buffer, used for depop 57 /// Pointer to the previous sample buffer, used for depop
58 CpuAddr previous_samples; 58 CpuAddr previous_samples;
diff --git a/src/audio_core/renderer/effect/effect_context.h b/src/audio_core/renderer/effect/effect_context.h
index 85955bd9c..8f6d6e7d8 100644
--- a/src/audio_core/renderer/effect/effect_context.h
+++ b/src/audio_core/renderer/effect/effect_context.h
@@ -15,15 +15,15 @@ class EffectContext {
15public: 15public:
16 /** 16 /**
17 * Initialize the effect context 17 * Initialize the effect context
18 * @param effect_infos List of effect infos for this context 18 * @param effect_infos_ - List of effect infos for this context
19 * @param effect_count The number of effects in the list 19 * @param effect_count_ - The number of effects in the list
20 * @param result_states_cpu The workbuffer of result states for the CPU for this context 20 * @param result_states_cpu_ - The workbuffer of result states for the CPU for this context
21 * @param result_states_dsp The workbuffer of result states for the DSP for this context 21 * @param result_states_dsp_ - The workbuffer of result states for the DSP for this context
22 * @param state_count The number of result states 22 * @param dsp_state_count - The number of result states
23 */ 23 */
24 void Initialize(std::span<EffectInfoBase> effect_infos_, const u32 effect_count_, 24 void Initialize(std::span<EffectInfoBase> effect_infos_, u32 effect_count_,
25 std::span<EffectResultState> result_states_cpu_, 25 std::span<EffectResultState> result_states_cpu_,
26 std::span<EffectResultState> result_states_dsp_, const size_t dsp_state_count); 26 std::span<EffectResultState> result_states_dsp_, size_t dsp_state_count);
27 27
28 /** 28 /**
29 * Get the EffectInfo for a given index 29 * Get the EffectInfo for a given index
diff --git a/src/audio_core/renderer/effect/effect_info_base.h b/src/audio_core/renderer/effect/effect_info_base.h
index 8c9583878..8525fde05 100644
--- a/src/audio_core/renderer/effect/effect_info_base.h
+++ b/src/audio_core/renderer/effect/effect_info_base.h
@@ -291,7 +291,7 @@ public:
291 * Update the info with new parameters, version 1. 291 * Update the info with new parameters, version 1.
292 * 292 *
293 * @param error_info - Used to write call result code. 293 * @param error_info - Used to write call result code.
294 * @param in_params - New parameters to update the info with. 294 * @param params - New parameters to update the info with.
295 * @param pool_mapper - Pool for mapping buffers. 295 * @param pool_mapper - Pool for mapping buffers.
296 */ 296 */
297 virtual void Update(BehaviorInfo::ErrorInfo& error_info, 297 virtual void Update(BehaviorInfo::ErrorInfo& error_info,
@@ -305,7 +305,7 @@ public:
305 * Update the info with new parameters, version 2. 305 * Update the info with new parameters, version 2.
306 * 306 *
307 * @param error_info - Used to write call result code. 307 * @param error_info - Used to write call result code.
308 * @param in_params - New parameters to update the info with. 308 * @param params - New parameters to update the info with.
309 * @param pool_mapper - Pool for mapping buffers. 309 * @param pool_mapper - Pool for mapping buffers.
310 */ 310 */
311 virtual void Update(BehaviorInfo::ErrorInfo& error_info, 311 virtual void Update(BehaviorInfo::ErrorInfo& error_info,
diff --git a/src/audio_core/renderer/memory/address_info.h b/src/audio_core/renderer/memory/address_info.h
index 4cfefea8e..bb5c930e1 100644
--- a/src/audio_core/renderer/memory/address_info.h
+++ b/src/audio_core/renderer/memory/address_info.h
@@ -19,8 +19,8 @@ public:
19 /** 19 /**
20 * Setup a new AddressInfo. 20 * Setup a new AddressInfo.
21 * 21 *
22 * @param cpu_address - The CPU address of this region. 22 * @param cpu_address_ - The CPU address of this region.
23 * @param size - The size of this region. 23 * @param size_ - The size of this region.
24 */ 24 */
25 void Setup(CpuAddr cpu_address_, u64 size_) { 25 void Setup(CpuAddr cpu_address_, u64 size_) {
26 cpu_address = cpu_address_; 26 cpu_address = cpu_address_;
@@ -42,7 +42,6 @@ public:
42 * Assign this region to a memory pool. 42 * Assign this region to a memory pool.
43 * 43 *
44 * @param memory_pool_ - Memory pool to assign. 44 * @param memory_pool_ - Memory pool to assign.
45 * @return The CpuAddr address of this region.
46 */ 45 */
47 void SetPool(MemoryPoolInfo* memory_pool_) { 46 void SetPool(MemoryPoolInfo* memory_pool_) {
48 memory_pool = memory_pool_; 47 memory_pool = memory_pool_;
diff --git a/src/audio_core/renderer/nodes/node_states.h b/src/audio_core/renderer/nodes/node_states.h
index a1e0958a2..c0fced56f 100644
--- a/src/audio_core/renderer/nodes/node_states.h
+++ b/src/audio_core/renderer/nodes/node_states.h
@@ -112,11 +112,11 @@ public:
112 /** 112 /**
113 * Initialize the node states. 113 * Initialize the node states.
114 * 114 *
115 * @param buffer - The workbuffer to use. Unused. 115 * @param buffer_ - The workbuffer to use. Unused.
116 * @param node_buffer_size - The size of the workbuffer. Unused. 116 * @param node_buffer_size - The size of the workbuffer. Unused.
117 * @param count - The number of nodes in the graph. 117 * @param count - The number of nodes in the graph.
118 */ 118 */
119 void Initialize(std::span<u8> nodes, u64 node_buffer_size, u32 count); 119 void Initialize(std::span<u8> buffer_, u64 node_buffer_size, u32 count);
120 120
121 /** 121 /**
122 * Sort the graph. Only calls DepthFirstSearch. 122 * Sort the graph. Only calls DepthFirstSearch.
diff --git a/src/audio_core/renderer/performance/performance_manager.h b/src/audio_core/renderer/performance/performance_manager.h
index b82176bef..b65caa9b6 100644
--- a/src/audio_core/renderer/performance/performance_manager.h
+++ b/src/audio_core/renderer/performance/performance_manager.h
@@ -73,7 +73,8 @@ public:
73 * Calculate the required size for the performance workbuffer. 73 * Calculate the required size for the performance workbuffer.
74 * 74 *
75 * @param behavior - Check which version is supported. 75 * @param behavior - Check which version is supported.
76 * @param params - Input parameters. 76 * @param params - Input parameters.
77 *
77 * @return Required workbuffer size. 78 * @return Required workbuffer size.
78 */ 79 */
79 static u64 GetRequiredBufferSizeForPerformanceMetricsPerFrame( 80 static u64 GetRequiredBufferSizeForPerformanceMetricsPerFrame(
@@ -104,7 +105,7 @@ public:
104 * @param workbuffer - Workbuffer to use for performance frames. 105 * @param workbuffer - Workbuffer to use for performance frames.
105 * @param workbuffer_size - Size of the workbuffer. 106 * @param workbuffer_size - Size of the workbuffer.
106 * @param params - Input parameters. 107 * @param params - Input parameters.
107 * @param behavior - Behaviour to check version and data format. 108 * @param behavior - Behaviour to check version and data format.
108 * @param memory_pool - Used to translate the workbuffer address for the DSP. 109 * @param memory_pool - Used to translate the workbuffer address for the DSP.
109 */ 110 */
110 virtual void Initialize(std::span<u8> workbuffer, u64 workbuffer_size, 111 virtual void Initialize(std::span<u8> workbuffer, u64 workbuffer_size,
@@ -160,7 +161,8 @@ public:
160 * workbuffer, to be written by the AudioRenderer. 161 * workbuffer, to be written by the AudioRenderer.
161 * 162 *
162 * @param addresses - Filled with pointers to the new detail, which should be passed 163 * @param addresses - Filled with pointers to the new detail, which should be passed
163 * to the AudioRenderer with Performance commands to be written. 164 * to the AudioRenderer with Performance commands to be written.
165 * @param detail_type - Performance detail type.
164 * @param entry_type - The type of this detail. See PerformanceEntryType 166 * @param entry_type - The type of this detail. See PerformanceEntryType
165 * @param node_id - Node id for this detail. 167 * @param node_id - Node id for this detail.
166 * @return True if a new detail was created and the offsets are valid, otherwise false. 168 * @return True if a new detail was created and the offsets are valid, otherwise false.
diff --git a/src/audio_core/renderer/upsampler/upsampler_manager.h b/src/audio_core/renderer/upsampler/upsampler_manager.h
index 70cd42b08..83c697c0c 100644
--- a/src/audio_core/renderer/upsampler/upsampler_manager.h
+++ b/src/audio_core/renderer/upsampler/upsampler_manager.h
@@ -27,7 +27,7 @@ public:
27 /** 27 /**
28 * Free the given upsampler. 28 * Free the given upsampler.
29 * 29 *
30 * @param The upsampler to be freed. 30 * @param info The upsampler to be freed.
31 */ 31 */
32 void Free(UpsamplerInfo* info); 32 void Free(UpsamplerInfo* info);
33 33
diff --git a/src/audio_core/renderer/voice/voice_info.h b/src/audio_core/renderer/voice/voice_info.h
index 896723e0c..930180895 100644
--- a/src/audio_core/renderer/voice/voice_info.h
+++ b/src/audio_core/renderer/voice/voice_info.h
@@ -185,7 +185,8 @@ public:
185 /** 185 /**
186 * Does this voice ned an update? 186 * Does this voice ned an update?
187 * 187 *
188 * @param params - Input parametetrs to check matching. 188 * @param params - Input parameters to check matching.
189 *
189 * @return True if this voice needs an update, otherwise false. 190 * @return True if this voice needs an update, otherwise false.
190 */ 191 */
191 bool ShouldUpdateParameters(const InParameter& params) const; 192 bool ShouldUpdateParameters(const InParameter& params) const;
@@ -194,9 +195,9 @@ public:
194 * Update the parameters of this voice. 195 * Update the parameters of this voice.
195 * 196 *
196 * @param error_info - Output error code. 197 * @param error_info - Output error code.
197 * @param params - Input parametters to udpate from. 198 * @param params - Input parameters to update from.
198 * @param pool_mapper - Used to map buffers. 199 * @param pool_mapper - Used to map buffers.
199 * @param behavior - behavior to check supported features. 200 * @param behavior - behavior to check supported features.
200 */ 201 */
201 void UpdateParameters(BehaviorInfo::ErrorInfo& error_info, const InParameter& params, 202 void UpdateParameters(BehaviorInfo::ErrorInfo& error_info, const InParameter& params,
202 const PoolMapper& pool_mapper, const BehaviorInfo& behavior); 203 const PoolMapper& pool_mapper, const BehaviorInfo& behavior);
@@ -218,12 +219,12 @@ public:
218 /** 219 /**
219 * Update all wavebuffers. 220 * Update all wavebuffers.
220 * 221 *
221 * @param error_infos - Output 2D array of errors, 2 per wavebuffer. 222 * @param error_infos - Output 2D array of errors, 2 per wavebuffer.
222 * @param error_count - Number of errors provided. Unused. 223 * @param error_count - Number of errors provided. Unused.
223 * @param params - Input parametters to be used for the update. 224 * @param params - Input parameters to be used for the update.
224 * @param voice_states - The voice states for each channel in this voice to be updated. 225 * @param voice_states - The voice states for each channel in this voice to be updated.
225 * @param pool_mapper - Used to map the wavebuffers. 226 * @param pool_mapper - Used to map the wavebuffers.
226 * @param behavior - Used to check for supported features. 227 * @param behavior - Used to check for supported features.
227 */ 228 */
228 void UpdateWaveBuffers(std::span<std::array<BehaviorInfo::ErrorInfo, 2>> error_infos, 229 void UpdateWaveBuffers(std::span<std::array<BehaviorInfo::ErrorInfo, 2>> error_infos,
229 u32 error_count, const InParameter& params, 230 u32 error_count, const InParameter& params,
@@ -233,13 +234,13 @@ public:
233 /** 234 /**
234 * Update a wavebuffer. 235 * Update a wavebuffer.
235 * 236 *
236 * @param error_infos - Output array of errors. 237 * @param error_info - Output array of errors.
237 * @param wave_buffer - The wavebuffer to be updated. 238 * @param wave_buffer - The wavebuffer to be updated.
238 * @param wave_buffer_internal - Input parametters to be used for the update. 239 * @param wave_buffer_internal - Input parametters to be used for the update.
239 * @param sample_format - Sample format of the wavebuffer. 240 * @param sample_format - Sample format of the wavebuffer.
240 * @param valid - Is this wavebuffer valid? 241 * @param valid - Is this wavebuffer valid?
241 * @param pool_mapper - Used to map the wavebuffers. 242 * @param pool_mapper - Used to map the wavebuffers.
242 * @param behavior - Used to check for supported features. 243 * @param behavior - Used to check for supported features.
243 */ 244 */
244 void UpdateWaveBuffer(std::span<BehaviorInfo::ErrorInfo> error_info, WaveBuffer& wave_buffer, 245 void UpdateWaveBuffer(std::span<BehaviorInfo::ErrorInfo> error_info, WaveBuffer& wave_buffer,
245 const WaveBufferInternal& wave_buffer_internal, 246 const WaveBufferInternal& wave_buffer_internal,
@@ -276,7 +277,7 @@ public:
276 /** 277 /**
277 * Check if this voice has any mixing connections. 278 * Check if this voice has any mixing connections.
278 * 279 *
279 * @return True if this voice participes in mixing, otherwise false. 280 * @return True if this voice participates in mixing, otherwise false.
280 */ 281 */
281 bool HasAnyConnection() const; 282 bool HasAnyConnection() const;
282 283
@@ -301,7 +302,8 @@ public:
301 /** 302 /**
302 * Update this voice on command generation. 303 * Update this voice on command generation.
303 * 304 *
304 * @param voice_states - Voice states for these wavebuffers. 305 * @param voice_context - Voice context for these wavebuffers.
306 *
305 * @return True if this voice should be generated, otherwise false. 307 * @return True if this voice should be generated, otherwise false.
306 */ 308 */
307 bool UpdateForCommandGeneration(VoiceContext& voice_context); 309 bool UpdateForCommandGeneration(VoiceContext& voice_context);
diff --git a/src/audio_core/sink/cubeb_sink.h b/src/audio_core/sink/cubeb_sink.h
index 91a6480fa..a450a3343 100644
--- a/src/audio_core/sink/cubeb_sink.h
+++ b/src/audio_core/sink/cubeb_sink.h
@@ -34,8 +34,7 @@ public:
34 * May differ from the device's channel count. 34 * May differ from the device's channel count.
35 * @param name - Name of this stream. 35 * @param name - Name of this stream.
36 * @param type - Type of this stream, render/in/out. 36 * @param type - Type of this stream, render/in/out.
37 * @param event - Audio render only, a signal used to prevent the renderer running too 37 *
38 * fast.
39 * @return A pointer to the created SinkStream 38 * @return A pointer to the created SinkStream
40 */ 39 */
41 SinkStream* AcquireSinkStream(Core::System& system, u32 system_channels, 40 SinkStream* AcquireSinkStream(Core::System& system, u32 system_channels,
@@ -101,7 +100,7 @@ private:
101}; 100};
102 101
103/** 102/**
104 * Get a list of conencted devices from Cubeb. 103 * Get a list of connected devices from Cubeb.
105 * 104 *
106 * @param capture - Return input (capture) devices if true, otherwise output devices. 105 * @param capture - Return input (capture) devices if true, otherwise output devices.
107 */ 106 */
diff --git a/src/audio_core/sink/sdl2_sink.h b/src/audio_core/sink/sdl2_sink.h
index 57de9b6c2..b00f55849 100644
--- a/src/audio_core/sink/sdl2_sink.h
+++ b/src/audio_core/sink/sdl2_sink.h
@@ -32,8 +32,7 @@ public:
32 * May differ from the device's channel count. 32 * May differ from the device's channel count.
33 * @param name - Name of this stream. 33 * @param name - Name of this stream.
34 * @param type - Type of this stream, render/in/out. 34 * @param type - Type of this stream, render/in/out.
35 * @param event - Audio render only, a signal used to prevent the renderer running too 35 *
36 * fast.
37 * @return A pointer to the created SinkStream 36 * @return A pointer to the created SinkStream
38 */ 37 */
39 SinkStream* AcquireSinkStream(Core::System& system, u32 system_channels, 38 SinkStream* AcquireSinkStream(Core::System& system, u32 system_channels,
@@ -92,7 +91,7 @@ private:
92}; 91};
93 92
94/** 93/**
95 * Get a list of conencted devices from Cubeb. 94 * Get a list of connected devices from SDL.
96 * 95 *
97 * @param capture - Return input (capture) devices if true, otherwise output devices. 96 * @param capture - Return input (capture) devices if true, otherwise output devices.
98 */ 97 */
diff --git a/src/audio_core/sink/sink.h b/src/audio_core/sink/sink.h
index 43d99b62e..b3f65792d 100644
--- a/src/audio_core/sink/sink.h
+++ b/src/audio_core/sink/sink.h
@@ -58,8 +58,7 @@ public:
58 * May differ from the device's channel count. 58 * May differ from the device's channel count.
59 * @param name - Name of this stream. 59 * @param name - Name of this stream.
60 * @param type - Type of this stream, render/in/out. 60 * @param type - Type of this stream, render/in/out.
61 * @param event - Audio render only, a signal used to prevent the renderer running too 61 *
62 * fast.
63 * @return A pointer to the created SinkStream 62 * @return A pointer to the created SinkStream
64 */ 63 */
65 virtual SinkStream* AcquireSinkStream(Core::System& system, u32 system_channels, 64 virtual SinkStream* AcquireSinkStream(Core::System& system, u32 system_channels,
diff --git a/src/audio_core/sink/sink_stream.h b/src/audio_core/sink/sink_stream.h
index db7cff45e..5e9a86a10 100644
--- a/src/audio_core/sink/sink_stream.h
+++ b/src/audio_core/sink/sink_stream.h
@@ -214,7 +214,7 @@ protected:
214 Core::System& system; 214 Core::System& system;
215 /// Type of this stream 215 /// Type of this stream
216 StreamType type; 216 StreamType type;
217 /// Set by the audio render/in/out systen which uses this stream 217 /// Set by the audio render/in/out system which uses this stream
218 u32 system_channels{2}; 218 u32 system_channels{2};
219 /// Channels supported by hardware 219 /// Channels supported by hardware
220 u32 device_channels{2}; 220 u32 device_channels{2};