diff options
| author | 2022-09-13 13:50:39 -0400 | |
|---|---|---|
| committer | 2022-09-15 09:47:23 -0400 | |
| commit | 2c91fbf7f1384b5cb01e20e4f59e27a1f9bd9a61 (patch) | |
| tree | 3191d4574de640a9f152df2f32cbc47a0458a9b8 /src/audio_core/renderer/command | |
| parent | Merge pull request #8880 from german77/slow-moving (diff) | |
| download | yuzu-2c91fbf7f1384b5cb01e20e4f59e27a1f9bd9a61.tar.gz yuzu-2c91fbf7f1384b5cb01e20e4f59e27a1f9bd9a61.tar.xz yuzu-2c91fbf7f1384b5cb01e20e4f59e27a1f9bd9a61.zip | |
audio_core: Amend documentation tags
Resolves a wackload of -Wdocumentation warnings due to mismatching tags
and whatnot.
Diffstat (limited to 'src/audio_core/renderer/command')
| -rw-r--r-- | src/audio_core/renderer/command/command_buffer.h | 12 | ||||
| -rw-r--r-- | src/audio_core/renderer/command/command_generator.h | 46 | ||||
| -rw-r--r-- | src/audio_core/renderer/command/mix/mix_ramp.cpp | 18 | ||||
| -rw-r--r-- | src/audio_core/renderer/command/mix/mix_ramp.h | 8 | ||||
| -rw-r--r-- | src/audio_core/renderer/command/mix/mix_ramp_grouped.h | 4 |
5 files changed, 39 insertions, 49 deletions
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 | ||
| 9 | namespace AudioCore::AudioRenderer { | 9 | namespace 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 | */ | ||
| 21 | template <size_t Q> | 11 | template <size_t Q> |
| 22 | s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 volume_, | 12 | s32 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 | ||
| 43 | template s32 ApplyMixRamp<15>(std::span<s32>, std::span<const s32>, const f32, const f32, | 33 | template s32 ApplyMixRamp<15>(std::span<s32>, std::span<const s32>, f32, f32, u32); |
| 44 | const u32); | 34 | template s32 ApplyMixRamp<23>(std::span<s32>, std::span<const s32>, f32, f32, u32); |
| 45 | template s32 ApplyMixRamp<23>(std::span<s32>, std::span<const s32>, const f32, const f32, | ||
| 46 | const u32); | ||
| 47 | 35 | ||
| 48 | void MixRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::string& string) { | 36 | void 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 | */ |
| 69 | template <size_t Q> | 69 | template <size_t Q> |
| 70 | s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 volume_, | 70 | s32 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; |