summaryrefslogtreecommitdiff
path: root/src/audio_core/renderer/command
diff options
context:
space:
mode:
authorGravatar Kelebek12023-08-31 15:09:15 +0100
committerGravatar Kelebek12023-09-04 17:12:16 +0100
commitebd19dec99d9809a669f63294745d7c8facc6d31 (patch)
treecd1f34cac0c091c2ffd16c429ac33b8fe133e06e /src/audio_core/renderer/command
parentMerge pull request #11420 from t895/long-install-fix (diff)
downloadyuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.gz
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.xz
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.zip
Rework ADSP into a wrapper for apps
Diffstat (limited to 'src/audio_core/renderer/command')
-rw-r--r--src/audio_core/renderer/command/command_buffer.cpp4
-rw-r--r--src/audio_core/renderer/command/command_buffer.h4
-rw-r--r--src/audio_core/renderer/command/command_generator.cpp4
-rw-r--r--src/audio_core/renderer/command/command_generator.h4
-rw-r--r--src/audio_core/renderer/command/command_list_header.h4
-rw-r--r--src/audio_core/renderer/command/command_processing_time_estimator.cpp4
-rw-r--r--src/audio_core/renderer/command/command_processing_time_estimator.h4
-rw-r--r--src/audio_core/renderer/command/data_source/adpcm.cpp18
-rw-r--r--src/audio_core/renderer/command/data_source/adpcm.h23
-rw-r--r--src/audio_core/renderer/command/data_source/decode.cpp6
-rw-r--r--src/audio_core/renderer/command/data_source/decode.h4
-rw-r--r--src/audio_core/renderer/command/data_source/pcm_float.cpp22
-rw-r--r--src/audio_core/renderer/command/data_source/pcm_float.h23
-rw-r--r--src/audio_core/renderer/command/data_source/pcm_int16.cpp22
-rw-r--r--src/audio_core/renderer/command/data_source/pcm_int16.h23
-rw-r--r--src/audio_core/renderer/command/effect/aux_.cpp12
-rw-r--r--src/audio_core/renderer/command/effect/aux_.h13
-rw-r--r--src/audio_core/renderer/command/effect/biquad_filter.cpp14
-rw-r--r--src/audio_core/renderer/command/effect/biquad_filter.h13
-rw-r--r--src/audio_core/renderer/command/effect/capture.cpp12
-rw-r--r--src/audio_core/renderer/command/effect/capture.h13
-rw-r--r--src/audio_core/renderer/command/effect/compressor.cpp12
-rw-r--r--src/audio_core/renderer/command/effect/compressor.h13
-rw-r--r--src/audio_core/renderer/command/effect/delay.cpp12
-rw-r--r--src/audio_core/renderer/command/effect/delay.h13
-rw-r--r--src/audio_core/renderer/command/effect/i3dl2_reverb.cpp12
-rw-r--r--src/audio_core/renderer/command/effect/i3dl2_reverb.h13
-rw-r--r--src/audio_core/renderer/command/effect/light_limiter.cpp22
-rw-r--r--src/audio_core/renderer/command/effect/light_limiter.h19
-rw-r--r--src/audio_core/renderer/command/effect/multi_tap_biquad_filter.cpp14
-rw-r--r--src/audio_core/renderer/command/effect/multi_tap_biquad_filter.h13
-rw-r--r--src/audio_core/renderer/command/effect/reverb.cpp12
-rw-r--r--src/audio_core/renderer/command/effect/reverb.h13
-rw-r--r--src/audio_core/renderer/command/icommand.h17
-rw-r--r--src/audio_core/renderer/command/mix/clear_mix.cpp14
-rw-r--r--src/audio_core/renderer/command/mix/clear_mix.h13
-rw-r--r--src/audio_core/renderer/command/mix/copy_mix.cpp14
-rw-r--r--src/audio_core/renderer/command/mix/copy_mix.h13
-rw-r--r--src/audio_core/renderer/command/mix/depop_for_mix_buffers.cpp14
-rw-r--r--src/audio_core/renderer/command/mix/depop_for_mix_buffers.h13
-rw-r--r--src/audio_core/renderer/command/mix/depop_prepare.cpp14
-rw-r--r--src/audio_core/renderer/command/mix/depop_prepare.h13
-rw-r--r--src/audio_core/renderer/command/mix/mix.cpp12
-rw-r--r--src/audio_core/renderer/command/mix/mix.h13
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp.cpp13
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp.h13
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp_grouped.cpp13
-rw-r--r--src/audio_core/renderer/command/mix/mix_ramp_grouped.h13
-rw-r--r--src/audio_core/renderer/command/mix/volume.cpp12
-rw-r--r--src/audio_core/renderer/command/mix/volume.h13
-rw-r--r--src/audio_core/renderer/command/mix/volume_ramp.cpp13
-rw-r--r--src/audio_core/renderer/command/mix/volume_ramp.h13
-rw-r--r--src/audio_core/renderer/command/performance/performance.cpp20
-rw-r--r--src/audio_core/renderer/command/performance/performance.h13
-rw-r--r--src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.cpp14
-rw-r--r--src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.h13
-rw-r--r--src/audio_core/renderer/command/resample/resample.cpp4
-rw-r--r--src/audio_core/renderer/command/resample/resample.h4
-rw-r--r--src/audio_core/renderer/command/resample/upsample.cpp12
-rw-r--r--src/audio_core/renderer/command/resample/upsample.h13
-rw-r--r--src/audio_core/renderer/command/sink/circular_buffer.cpp14
-rw-r--r--src/audio_core/renderer/command/sink/circular_buffer.h13
-rw-r--r--src/audio_core/renderer/command/sink/device.cpp12
-rw-r--r--src/audio_core/renderer/command/sink/device.h13
64 files changed, 427 insertions, 385 deletions
diff --git a/src/audio_core/renderer/command/command_buffer.cpp b/src/audio_core/renderer/command/command_buffer.cpp
index 0bd418306..67d43e69a 100644
--- a/src/audio_core/renderer/command/command_buffer.cpp
+++ b/src/audio_core/renderer/command/command_buffer.cpp
@@ -16,7 +16,7 @@
16#include "audio_core/renderer/voice/voice_info.h" 16#include "audio_core/renderer/voice/voice_info.h"
17#include "audio_core/renderer/voice/voice_state.h" 17#include "audio_core/renderer/voice/voice_state.h"
18 18
19namespace AudioCore::AudioRenderer { 19namespace AudioCore::Renderer {
20 20
21template <typename T, CommandId Id> 21template <typename T, CommandId Id>
22T& CommandBuffer::GenerateStart(const s32 node_id) { 22T& CommandBuffer::GenerateStart(const s32 node_id) {
@@ -713,4 +713,4 @@ void CommandBuffer::GenerateCompressorCommand(s16 buffer_offset, EffectInfoBase&
713 GenerateEnd<CompressorCommand>(cmd); 713 GenerateEnd<CompressorCommand>(cmd);
714} 714}
715 715
716} // namespace AudioCore::AudioRenderer 716} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/command_buffer.h b/src/audio_core/renderer/command/command_buffer.h
index 162170846..12e8c2c81 100644
--- a/src/audio_core/renderer/command/command_buffer.h
+++ b/src/audio_core/renderer/command/command_buffer.h
@@ -10,7 +10,7 @@
10#include "audio_core/renderer/performance/performance_manager.h" 10#include "audio_core/renderer/performance/performance_manager.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::Renderer {
14struct UpsamplerInfo; 14struct UpsamplerInfo;
15struct VoiceState; 15struct VoiceState;
16class EffectInfoBase; 16class EffectInfoBase;
@@ -465,4 +465,4 @@ private:
465 void GenerateEnd(T& cmd); 465 void GenerateEnd(T& cmd);
466}; 466};
467 467
468} // namespace AudioCore::AudioRenderer 468} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/command_generator.cpp b/src/audio_core/renderer/command/command_generator.cpp
index fba84c7bd..ccb186209 100644
--- a/src/audio_core/renderer/command/command_generator.cpp
+++ b/src/audio_core/renderer/command/command_generator.cpp
@@ -21,7 +21,7 @@
21#include "audio_core/renderer/voice/voice_context.h" 21#include "audio_core/renderer/voice/voice_context.h"
22#include "common/alignment.h" 22#include "common/alignment.h"
23 23
24namespace AudioCore::AudioRenderer { 24namespace AudioCore::Renderer {
25 25
26CommandGenerator::CommandGenerator(CommandBuffer& command_buffer_, 26CommandGenerator::CommandGenerator(CommandBuffer& command_buffer_,
27 const CommandListHeader& command_list_header_, 27 const CommandListHeader& command_list_header_,
@@ -793,4 +793,4 @@ void CommandGenerator::GeneratePerformanceCommand(
793 command_buffer.GeneratePerformanceCommand(node_id, state, entry_addresses); 793 command_buffer.GeneratePerformanceCommand(node_id, state, entry_addresses);
794} 794}
795 795
796} // namespace AudioCore::AudioRenderer 796} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/command_generator.h b/src/audio_core/renderer/command/command_generator.h
index b3cd7b408..38ee2a64e 100644
--- a/src/audio_core/renderer/command/command_generator.h
+++ b/src/audio_core/renderer/command/command_generator.h
@@ -12,7 +12,7 @@
12namespace AudioCore { 12namespace AudioCore {
13struct AudioRendererSystemContext; 13struct AudioRendererSystemContext;
14 14
15namespace AudioRenderer { 15namespace Renderer {
16class CommandBuffer; 16class CommandBuffer;
17struct CommandListHeader; 17struct CommandListHeader;
18class VoiceContext; 18class VoiceContext;
@@ -345,5 +345,5 @@ private:
345 PerformanceManager* performance_manager; 345 PerformanceManager* performance_manager;
346}; 346};
347 347
348} // namespace AudioRenderer 348} // namespace Renderer
349} // namespace AudioCore 349} // namespace AudioCore
diff --git a/src/audio_core/renderer/command/command_list_header.h b/src/audio_core/renderer/command/command_list_header.h
index 988530b1f..de9ee070b 100644
--- a/src/audio_core/renderer/command/command_list_header.h
+++ b/src/audio_core/renderer/command/command_list_header.h
@@ -8,7 +8,7 @@
8#include "audio_core/common/common.h" 8#include "audio_core/common/common.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::Renderer {
12 12
13struct CommandListHeader { 13struct CommandListHeader {
14 u64 buffer_size; 14 u64 buffer_size;
@@ -19,4 +19,4 @@ struct CommandListHeader {
19 u32 sample_rate; 19 u32 sample_rate;
20}; 20};
21 21
22} // namespace AudioCore::AudioRenderer 22} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/command_processing_time_estimator.cpp b/src/audio_core/renderer/command/command_processing_time_estimator.cpp
index 3091f587a..a48a016b1 100644
--- a/src/audio_core/renderer/command/command_processing_time_estimator.cpp
+++ b/src/audio_core/renderer/command/command_processing_time_estimator.cpp
@@ -3,7 +3,7 @@
3 3
4#include "audio_core/renderer/command/command_processing_time_estimator.h" 4#include "audio_core/renderer/command/command_processing_time_estimator.h"
5 5
6namespace AudioCore::AudioRenderer { 6namespace AudioCore::Renderer {
7 7
8u32 CommandProcessingTimeEstimatorVersion1::Estimate( 8u32 CommandProcessingTimeEstimatorVersion1::Estimate(
9 const PcmInt16DataSourceVersion1Command& command) const { 9 const PcmInt16DataSourceVersion1Command& command) const {
@@ -3617,4 +3617,4 @@ u32 CommandProcessingTimeEstimatorVersion5::Estimate(const CompressorCommand& co
3617 } 3617 }
3618} 3618}
3619 3619
3620} // namespace AudioCore::AudioRenderer 3620} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/command_processing_time_estimator.h b/src/audio_core/renderer/command/command_processing_time_estimator.h
index 452217196..1c76e4ba4 100644
--- a/src/audio_core/renderer/command/command_processing_time_estimator.h
+++ b/src/audio_core/renderer/command/command_processing_time_estimator.h
@@ -6,7 +6,7 @@
6#include "audio_core/renderer/command/commands.h" 6#include "audio_core/renderer/command/commands.h"
7#include "common/common_types.h" 7#include "common/common_types.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10/** 10/**
11 * Estimate the processing time required for all commands. 11 * Estimate the processing time required for all commands.
12 */ 12 */
@@ -251,4 +251,4 @@ private:
251 u32 buffer_count{}; 251 u32 buffer_count{};
252}; 252};
253 253
254} // namespace AudioCore::AudioRenderer 254} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/adpcm.cpp b/src/audio_core/renderer/command/data_source/adpcm.cpp
index e66ed2990..28e76fdcc 100644
--- a/src/audio_core/renderer/command/data_source/adpcm.cpp
+++ b/src/audio_core/renderer/command/data_source/adpcm.cpp
@@ -3,20 +3,20 @@
3 3
4#include <span> 4#include <span>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/data_source/adpcm.h" 7#include "audio_core/renderer/command/data_source/adpcm.h"
8#include "audio_core/renderer/command/data_source/decode.h" 8#include "audio_core/renderer/command/data_source/decode.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11 11
12void AdpcmDataSourceVersion1Command::Dump(const ADSP::CommandListProcessor& processor, 12void AdpcmDataSourceVersion1Command::Dump(const AudioRenderer::CommandListProcessor& processor,
13 std::string& string) { 13 std::string& string) {
14 string += fmt::format("AdpcmDataSourceVersion1Command\n\toutput_index {:02X} source sample " 14 string += fmt::format("AdpcmDataSourceVersion1Command\n\toutput_index {:02X} source sample "
15 "rate {} target sample rate {} src quality {}\n", 15 "rate {} target sample rate {} src quality {}\n",
16 output_index, sample_rate, processor.target_sample_rate, src_quality); 16 output_index, sample_rate, processor.target_sample_rate, src_quality);
17} 17}
18 18
19void AdpcmDataSourceVersion1Command::Process(const ADSP::CommandListProcessor& processor) { 19void AdpcmDataSourceVersion1Command::Process(const AudioRenderer::CommandListProcessor& processor) {
20 auto out_buffer{processor.mix_buffers.subspan(output_index * processor.sample_count, 20 auto out_buffer{processor.mix_buffers.subspan(output_index * processor.sample_count,
21 processor.sample_count)}; 21 processor.sample_count)};
22 22
@@ -41,18 +41,18 @@ void AdpcmDataSourceVersion1Command::Process(const ADSP::CommandListProcessor& p
41 DecodeFromWaveBuffers(*processor.memory, args); 41 DecodeFromWaveBuffers(*processor.memory, args);
42} 42}
43 43
44bool AdpcmDataSourceVersion1Command::Verify(const ADSP::CommandListProcessor& processor) { 44bool AdpcmDataSourceVersion1Command::Verify(const AudioRenderer::CommandListProcessor& processor) {
45 return true; 45 return true;
46} 46}
47 47
48void AdpcmDataSourceVersion2Command::Dump(const ADSP::CommandListProcessor& processor, 48void AdpcmDataSourceVersion2Command::Dump(const AudioRenderer::CommandListProcessor& processor,
49 std::string& string) { 49 std::string& string) {
50 string += fmt::format("AdpcmDataSourceVersion2Command\n\toutput_index {:02X} source sample " 50 string += fmt::format("AdpcmDataSourceVersion2Command\n\toutput_index {:02X} source sample "
51 "rate {} target sample rate {} src quality {}\n", 51 "rate {} target sample rate {} src quality {}\n",
52 output_index, sample_rate, processor.target_sample_rate, src_quality); 52 output_index, sample_rate, processor.target_sample_rate, src_quality);
53} 53}
54 54
55void AdpcmDataSourceVersion2Command::Process(const ADSP::CommandListProcessor& processor) { 55void AdpcmDataSourceVersion2Command::Process(const AudioRenderer::CommandListProcessor& processor) {
56 auto out_buffer{processor.mix_buffers.subspan(output_index * processor.sample_count, 56 auto out_buffer{processor.mix_buffers.subspan(output_index * processor.sample_count,
57 processor.sample_count)}; 57 processor.sample_count)};
58 58
@@ -77,8 +77,8 @@ void AdpcmDataSourceVersion2Command::Process(const ADSP::CommandListProcessor& p
77 DecodeFromWaveBuffers(*processor.memory, args); 77 DecodeFromWaveBuffers(*processor.memory, args);
78} 78}
79 79
80bool AdpcmDataSourceVersion2Command::Verify(const ADSP::CommandListProcessor& processor) { 80bool AdpcmDataSourceVersion2Command::Verify(const AudioRenderer::CommandListProcessor& processor) {
81 return true; 81 return true;
82} 82}
83 83
84} // namespace AudioCore::AudioRenderer 84} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/adpcm.h b/src/audio_core/renderer/command/data_source/adpcm.h
index a9cf9cee4..487846f0c 100644
--- a/src/audio_core/renderer/command/data_source/adpcm.h
+++ b/src/audio_core/renderer/command/data_source/adpcm.h
@@ -11,11 +11,12 @@
11#include "audio_core/renderer/command/icommand.h" 11#include "audio_core/renderer/command/icommand.h"
12#include "common/common_types.h" 12#include "common/common_types.h"
13 13
14namespace AudioCore::AudioRenderer { 14namespace AudioCore::ADSP::AudioRenderer {
15namespace ADSP {
16class CommandListProcessor; 15class CommandListProcessor;
17} 16}
18 17
18namespace AudioCore::Renderer {
19
19/** 20/**
20 * AudioRenderer command to decode ADPCM-encoded version 1 wavebuffers 21 * AudioRenderer command to decode ADPCM-encoded version 1 wavebuffers
21 * into the output_index mix buffer. 22 * into the output_index mix buffer.
@@ -27,14 +28,14 @@ struct AdpcmDataSourceVersion1Command : ICommand {
27 * @param processor - The CommandListProcessor processing this command. 28 * @param processor - The CommandListProcessor processing this command.
28 * @param string - The string to print into. 29 * @param string - The string to print into.
29 */ 30 */
30 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 31 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
31 32
32 /** 33 /**
33 * Process this command. 34 * Process this command.
34 * 35 *
35 * @param processor - The CommandListProcessor processing this command. 36 * @param processor - The CommandListProcessor processing this command.
36 */ 37 */
37 void Process(const ADSP::CommandListProcessor& processor) override; 38 void Process(const AudioRenderer::CommandListProcessor& processor) override;
38 39
39 /** 40 /**
40 * Verify this command's data is valid. 41 * Verify this command's data is valid.
@@ -42,13 +43,13 @@ struct AdpcmDataSourceVersion1Command : ICommand {
42 * @param processor - The CommandListProcessor processing this command. 43 * @param processor - The CommandListProcessor processing this command.
43 * @return True if the command is valid, otherwise false. 44 * @return True if the command is valid, otherwise false.
44 */ 45 */
45 bool Verify(const ADSP::CommandListProcessor& processor) override; 46 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
46 47
47 /// Quality used for sample rate conversion 48 /// Quality used for sample rate conversion
48 SrcQuality src_quality; 49 SrcQuality src_quality;
49 /// Mix buffer index for decoded samples 50 /// Mix buffer index for decoded samples
50 s16 output_index; 51 s16 output_index;
51 /// Flags to control decoding (see AudioCore::AudioRenderer::VoiceInfo::Flags) 52 /// Flags to control decoding (see AudioCore::Renderer::VoiceInfo::Flags)
52 u16 flags; 53 u16 flags;
53 /// Wavebuffer sample rate 54 /// Wavebuffer sample rate
54 u32 sample_rate; 55 u32 sample_rate;
@@ -75,14 +76,14 @@ struct AdpcmDataSourceVersion2Command : ICommand {
75 * @param processor - The CommandListProcessor processing this command. 76 * @param processor - The CommandListProcessor processing this command.
76 * @param string - The string to print into. 77 * @param string - The string to print into.
77 */ 78 */
78 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 79 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
79 80
80 /** 81 /**
81 * Process this command. 82 * Process this command.
82 * 83 *
83 * @param processor - The CommandListProcessor processing this command. 84 * @param processor - The CommandListProcessor processing this command.
84 */ 85 */
85 void Process(const ADSP::CommandListProcessor& processor) override; 86 void Process(const AudioRenderer::CommandListProcessor& processor) override;
86 87
87 /** 88 /**
88 * Verify this command's data is valid. 89 * Verify this command's data is valid.
@@ -90,13 +91,13 @@ struct AdpcmDataSourceVersion2Command : ICommand {
90 * @param processor - The CommandListProcessor processing this command. 91 * @param processor - The CommandListProcessor processing this command.
91 * @return True if the command is valid, otherwise false. 92 * @return True if the command is valid, otherwise false.
92 */ 93 */
93 bool Verify(const ADSP::CommandListProcessor& processor) override; 94 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
94 95
95 /// Quality used for sample rate conversion 96 /// Quality used for sample rate conversion
96 SrcQuality src_quality; 97 SrcQuality src_quality;
97 /// Mix buffer index for decoded samples 98 /// Mix buffer index for decoded samples
98 s16 output_index; 99 s16 output_index;
99 /// Flags to control decoding (see AudioCore::AudioRenderer::VoiceInfo::Flags) 100 /// Flags to control decoding (see AudioCore::Renderer::VoiceInfo::Flags)
100 u16 flags; 101 u16 flags;
101 /// Wavebuffer sample rate 102 /// Wavebuffer sample rate
102 u32 sample_rate; 103 u32 sample_rate;
@@ -116,4 +117,4 @@ struct AdpcmDataSourceVersion2Command : ICommand {
116 u64 data_size; 117 u64 data_size;
117}; 118};
118 119
119} // namespace AudioCore::AudioRenderer 120} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/decode.cpp b/src/audio_core/renderer/command/data_source/decode.cpp
index 257aa866e..762aec8ad 100644
--- a/src/audio_core/renderer/command/data_source/decode.cpp
+++ b/src/audio_core/renderer/command/data_source/decode.cpp
@@ -11,7 +11,7 @@
11#include "common/scratch_buffer.h" 11#include "common/scratch_buffer.h"
12#include "core/memory.h" 12#include "core/memory.h"
13 13
14namespace AudioCore::AudioRenderer { 14namespace AudioCore::Renderer {
15 15
16constexpr u32 TempBufferSize = 0x3F00; 16constexpr u32 TempBufferSize = 0x3F00;
17constexpr std::array<u8, 3> PitchBySrcQuality = {4, 8, 4}; 17constexpr std::array<u8, 3> PitchBySrcQuality = {4, 8, 4};
@@ -364,7 +364,7 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf
364 wavebuffers_consumed++; 364 wavebuffers_consumed++;
365 } else { 365 } else {
366 voice_state.loop_count++; 366 voice_state.loop_count++;
367 if (wavebuffer.loop_count > 0 && 367 if (wavebuffer.loop_count >= 0 &&
368 (voice_state.loop_count > wavebuffer.loop_count || samples_decoded == 0)) { 368 (voice_state.loop_count > wavebuffer.loop_count || samples_decoded == 0)) {
369 voice_state.wave_buffer_valid[wavebuffer_index] = false; 369 voice_state.wave_buffer_valid[wavebuffer_index] = false;
370 voice_state.loop_count = 0; 370 voice_state.loop_count = 0;
@@ -423,4 +423,4 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf
423 voice_state.fraction = fraction; 423 voice_state.fraction = fraction;
424} 424}
425 425
426} // namespace AudioCore::AudioRenderer 426} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/decode.h b/src/audio_core/renderer/command/data_source/decode.h
index 4d63d6fa8..5f52f32f0 100644
--- a/src/audio_core/renderer/command/data_source/decode.h
+++ b/src/audio_core/renderer/command/data_source/decode.h
@@ -15,7 +15,7 @@ namespace Core::Memory {
15class Memory; 15class Memory;
16} 16}
17 17
18namespace AudioCore::AudioRenderer { 18namespace AudioCore::Renderer {
19 19
20struct DecodeFromWaveBuffersArgs { 20struct DecodeFromWaveBuffersArgs {
21 SampleFormat sample_format; 21 SampleFormat sample_format;
@@ -56,4 +56,4 @@ struct DecodeArg {
56 */ 56 */
57void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuffersArgs& args); 57void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuffersArgs& args);
58 58
59} // namespace AudioCore::AudioRenderer 59} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/pcm_float.cpp b/src/audio_core/renderer/command/data_source/pcm_float.cpp
index be77fab69..5cc0797f4 100644
--- a/src/audio_core/renderer/command/data_source/pcm_float.cpp
+++ b/src/audio_core/renderer/command/data_source/pcm_float.cpp
@@ -1,13 +1,13 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/data_source/decode.h" 5#include "audio_core/renderer/command/data_source/decode.h"
6#include "audio_core/renderer/command/data_source/pcm_float.h" 6#include "audio_core/renderer/command/data_source/pcm_float.h"
7 7
8namespace AudioCore::AudioRenderer { 8namespace AudioCore::Renderer {
9 9
10void PcmFloatDataSourceVersion1Command::Dump(const ADSP::CommandListProcessor& processor, 10void PcmFloatDataSourceVersion1Command::Dump(const AudioRenderer::CommandListProcessor& processor,
11 std::string& string) { 11 std::string& string) {
12 string += 12 string +=
13 fmt::format("PcmFloatDataSourceVersion1Command\n\toutput_index {:02X} channel {} " 13 fmt::format("PcmFloatDataSourceVersion1Command\n\toutput_index {:02X} channel {} "
@@ -16,7 +16,8 @@ void PcmFloatDataSourceVersion1Command::Dump(const ADSP::CommandListProcessor& p
16 processor.target_sample_rate, src_quality); 16 processor.target_sample_rate, src_quality);
17} 17}
18 18
19void PcmFloatDataSourceVersion1Command::Process(const ADSP::CommandListProcessor& processor) { 19void PcmFloatDataSourceVersion1Command::Process(
20 const AudioRenderer::CommandListProcessor& processor) {
20 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count, 21 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count,
21 processor.sample_count); 22 processor.sample_count);
22 23
@@ -41,11 +42,12 @@ void PcmFloatDataSourceVersion1Command::Process(const ADSP::CommandListProcessor
41 DecodeFromWaveBuffers(*processor.memory, args); 42 DecodeFromWaveBuffers(*processor.memory, args);
42} 43}
43 44
44bool PcmFloatDataSourceVersion1Command::Verify(const ADSP::CommandListProcessor& processor) { 45bool PcmFloatDataSourceVersion1Command::Verify(
46 const AudioRenderer::CommandListProcessor& processor) {
45 return true; 47 return true;
46} 48}
47 49
48void PcmFloatDataSourceVersion2Command::Dump(const ADSP::CommandListProcessor& processor, 50void PcmFloatDataSourceVersion2Command::Dump(const AudioRenderer::CommandListProcessor& processor,
49 std::string& string) { 51 std::string& string) {
50 string += 52 string +=
51 fmt::format("PcmFloatDataSourceVersion2Command\n\toutput_index {:02X} channel {} " 53 fmt::format("PcmFloatDataSourceVersion2Command\n\toutput_index {:02X} channel {} "
@@ -54,7 +56,8 @@ void PcmFloatDataSourceVersion2Command::Dump(const ADSP::CommandListProcessor& p
54 processor.target_sample_rate, src_quality); 56 processor.target_sample_rate, src_quality);
55} 57}
56 58
57void PcmFloatDataSourceVersion2Command::Process(const ADSP::CommandListProcessor& processor) { 59void PcmFloatDataSourceVersion2Command::Process(
60 const AudioRenderer::CommandListProcessor& processor) {
58 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count, 61 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count,
59 processor.sample_count); 62 processor.sample_count);
60 63
@@ -79,8 +82,9 @@ void PcmFloatDataSourceVersion2Command::Process(const ADSP::CommandListProcessor
79 DecodeFromWaveBuffers(*processor.memory, args); 82 DecodeFromWaveBuffers(*processor.memory, args);
80} 83}
81 84
82bool PcmFloatDataSourceVersion2Command::Verify(const ADSP::CommandListProcessor& processor) { 85bool PcmFloatDataSourceVersion2Command::Verify(
86 const AudioRenderer::CommandListProcessor& processor) {
83 return true; 87 return true;
84} 88}
85 89
86} // namespace AudioCore::AudioRenderer 90} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/pcm_float.h b/src/audio_core/renderer/command/data_source/pcm_float.h
index e4af77c20..2c9d1877e 100644
--- a/src/audio_core/renderer/command/data_source/pcm_float.h
+++ b/src/audio_core/renderer/command/data_source/pcm_float.h
@@ -9,11 +9,12 @@
9#include "audio_core/renderer/command/icommand.h" 9#include "audio_core/renderer/command/icommand.h"
10#include "common/common_types.h" 10#include "common/common_types.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::ADSP::AudioRenderer {
13namespace ADSP {
14class CommandListProcessor; 13class CommandListProcessor;
15} 14}
16 15
16namespace AudioCore::Renderer {
17
17/** 18/**
18 * AudioRenderer command to decode PCM float-encoded version 1 wavebuffers 19 * AudioRenderer command to decode PCM float-encoded version 1 wavebuffers
19 * into the output_index mix buffer. 20 * into the output_index mix buffer.
@@ -25,14 +26,14 @@ struct PcmFloatDataSourceVersion1Command : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,13 +41,13 @@ struct PcmFloatDataSourceVersion1Command : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Quality used for sample rate conversion 46 /// Quality used for sample rate conversion
46 SrcQuality src_quality; 47 SrcQuality src_quality;
47 /// Mix buffer index for decoded samples 48 /// Mix buffer index for decoded samples
48 s16 output_index; 49 s16 output_index;
49 /// Flags to control decoding (see AudioCore::AudioRenderer::VoiceInfo::Flags) 50 /// Flags to control decoding (see AudioCore::Renderer::VoiceInfo::Flags)
50 u16 flags; 51 u16 flags;
51 /// Wavebuffer sample rate 52 /// Wavebuffer sample rate
52 u32 sample_rate; 53 u32 sample_rate;
@@ -73,14 +74,14 @@ struct PcmFloatDataSourceVersion2Command : ICommand {
73 * @param processor - The CommandListProcessor processing this command. 74 * @param processor - The CommandListProcessor processing this command.
74 * @param string - The string to print into. 75 * @param string - The string to print into.
75 */ 76 */
76 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 77 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
77 78
78 /** 79 /**
79 * Process this command. 80 * Process this command.
80 * 81 *
81 * @param processor - The CommandListProcessor processing this command. 82 * @param processor - The CommandListProcessor processing this command.
82 */ 83 */
83 void Process(const ADSP::CommandListProcessor& processor) override; 84 void Process(const AudioRenderer::CommandListProcessor& processor) override;
84 85
85 /** 86 /**
86 * Verify this command's data is valid. 87 * Verify this command's data is valid.
@@ -88,13 +89,13 @@ struct PcmFloatDataSourceVersion2Command : ICommand {
88 * @param processor - The CommandListProcessor processing this command. 89 * @param processor - The CommandListProcessor processing this command.
89 * @return True if the command is valid, otherwise false. 90 * @return True if the command is valid, otherwise false.
90 */ 91 */
91 bool Verify(const ADSP::CommandListProcessor& processor) override; 92 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
92 93
93 /// Quality used for sample rate conversion 94 /// Quality used for sample rate conversion
94 SrcQuality src_quality; 95 SrcQuality src_quality;
95 /// Mix buffer index for decoded samples 96 /// Mix buffer index for decoded samples
96 s16 output_index; 97 s16 output_index;
97 /// Flags to control decoding (see AudioCore::AudioRenderer::VoiceInfo::Flags) 98 /// Flags to control decoding (see AudioCore::Renderer::VoiceInfo::Flags)
98 u16 flags; 99 u16 flags;
99 /// Wavebuffer sample rate 100 /// Wavebuffer sample rate
100 u32 sample_rate; 101 u32 sample_rate;
@@ -110,4 +111,4 @@ struct PcmFloatDataSourceVersion2Command : ICommand {
110 CpuAddr voice_state; 111 CpuAddr voice_state;
111}; 112};
112 113
113} // namespace AudioCore::AudioRenderer 114} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/pcm_int16.cpp b/src/audio_core/renderer/command/data_source/pcm_int16.cpp
index 7a27463e4..649993068 100644
--- a/src/audio_core/renderer/command/data_source/pcm_int16.cpp
+++ b/src/audio_core/renderer/command/data_source/pcm_int16.cpp
@@ -3,13 +3,13 @@
3 3
4#include <span> 4#include <span>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/data_source/decode.h" 7#include "audio_core/renderer/command/data_source/decode.h"
8#include "audio_core/renderer/command/data_source/pcm_int16.h" 8#include "audio_core/renderer/command/data_source/pcm_int16.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11 11
12void PcmInt16DataSourceVersion1Command::Dump(const ADSP::CommandListProcessor& processor, 12void PcmInt16DataSourceVersion1Command::Dump(const AudioRenderer::CommandListProcessor& processor,
13 std::string& string) { 13 std::string& string) {
14 string += 14 string +=
15 fmt::format("PcmInt16DataSourceVersion1Command\n\toutput_index {:02X} channel {} " 15 fmt::format("PcmInt16DataSourceVersion1Command\n\toutput_index {:02X} channel {} "
@@ -18,7 +18,8 @@ void PcmInt16DataSourceVersion1Command::Dump(const ADSP::CommandListProcessor& p
18 processor.target_sample_rate, src_quality); 18 processor.target_sample_rate, src_quality);
19} 19}
20 20
21void PcmInt16DataSourceVersion1Command::Process(const ADSP::CommandListProcessor& processor) { 21void PcmInt16DataSourceVersion1Command::Process(
22 const AudioRenderer::CommandListProcessor& processor) {
22 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count, 23 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count,
23 processor.sample_count); 24 processor.sample_count);
24 25
@@ -43,11 +44,12 @@ void PcmInt16DataSourceVersion1Command::Process(const ADSP::CommandListProcessor
43 DecodeFromWaveBuffers(*processor.memory, args); 44 DecodeFromWaveBuffers(*processor.memory, args);
44} 45}
45 46
46bool PcmInt16DataSourceVersion1Command::Verify(const ADSP::CommandListProcessor& processor) { 47bool PcmInt16DataSourceVersion1Command::Verify(
48 const AudioRenderer::CommandListProcessor& processor) {
47 return true; 49 return true;
48} 50}
49 51
50void PcmInt16DataSourceVersion2Command::Dump(const ADSP::CommandListProcessor& processor, 52void PcmInt16DataSourceVersion2Command::Dump(const AudioRenderer::CommandListProcessor& processor,
51 std::string& string) { 53 std::string& string) {
52 string += 54 string +=
53 fmt::format("PcmInt16DataSourceVersion2Command\n\toutput_index {:02X} channel {} " 55 fmt::format("PcmInt16DataSourceVersion2Command\n\toutput_index {:02X} channel {} "
@@ -56,7 +58,8 @@ void PcmInt16DataSourceVersion2Command::Dump(const ADSP::CommandListProcessor& p
56 processor.target_sample_rate, src_quality); 58 processor.target_sample_rate, src_quality);
57} 59}
58 60
59void PcmInt16DataSourceVersion2Command::Process(const ADSP::CommandListProcessor& processor) { 61void PcmInt16DataSourceVersion2Command::Process(
62 const AudioRenderer::CommandListProcessor& processor) {
60 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count, 63 auto out_buffer = processor.mix_buffers.subspan(output_index * processor.sample_count,
61 processor.sample_count); 64 processor.sample_count);
62 DecodeFromWaveBuffersArgs args{ 65 DecodeFromWaveBuffersArgs args{
@@ -80,8 +83,9 @@ void PcmInt16DataSourceVersion2Command::Process(const ADSP::CommandListProcessor
80 DecodeFromWaveBuffers(*processor.memory, args); 83 DecodeFromWaveBuffers(*processor.memory, args);
81} 84}
82 85
83bool PcmInt16DataSourceVersion2Command::Verify(const ADSP::CommandListProcessor& processor) { 86bool PcmInt16DataSourceVersion2Command::Verify(
87 const AudioRenderer::CommandListProcessor& processor) {
84 return true; 88 return true;
85} 89}
86 90
87} // namespace AudioCore::AudioRenderer 91} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/data_source/pcm_int16.h b/src/audio_core/renderer/command/data_source/pcm_int16.h
index 5de1ad60d..2c013f003 100644
--- a/src/audio_core/renderer/command/data_source/pcm_int16.h
+++ b/src/audio_core/renderer/command/data_source/pcm_int16.h
@@ -9,11 +9,12 @@
9#include "audio_core/renderer/command/icommand.h" 9#include "audio_core/renderer/command/icommand.h"
10#include "common/common_types.h" 10#include "common/common_types.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::ADSP::AudioRenderer {
13namespace ADSP {
14class CommandListProcessor; 13class CommandListProcessor;
15} 14}
16 15
16namespace AudioCore::Renderer {
17
17/** 18/**
18 * AudioRenderer command to decode PCM s16-encoded version 1 wavebuffers 19 * AudioRenderer command to decode PCM s16-encoded version 1 wavebuffers
19 * into the output_index mix buffer. 20 * into the output_index mix buffer.
@@ -25,14 +26,14 @@ struct PcmInt16DataSourceVersion1Command : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,13 +41,13 @@ struct PcmInt16DataSourceVersion1Command : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Quality used for sample rate conversion 46 /// Quality used for sample rate conversion
46 SrcQuality src_quality; 47 SrcQuality src_quality;
47 /// Mix buffer index for decoded samples 48 /// Mix buffer index for decoded samples
48 s16 output_index; 49 s16 output_index;
49 /// Flags to control decoding (see AudioCore::AudioRenderer::VoiceInfo::Flags) 50 /// Flags to control decoding (see AudioCore::Renderer::VoiceInfo::Flags)
50 u16 flags; 51 u16 flags;
51 /// Wavebuffer sample rate 52 /// Wavebuffer sample rate
52 u32 sample_rate; 53 u32 sample_rate;
@@ -72,26 +73,26 @@ struct PcmInt16DataSourceVersion2Command : ICommand {
72 * @param processor - The CommandListProcessor processing this command. 73 * @param processor - The CommandListProcessor processing this command.
73 * @param string - The string to print into. 74 * @param string - The string to print into.
74 */ 75 */
75 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 76 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
76 77
77 /** 78 /**
78 * Process this command. 79 * Process this command.
79 * @param processor - The CommandListProcessor processing this command. 80 * @param processor - The CommandListProcessor processing this command.
80 */ 81 */
81 void Process(const ADSP::CommandListProcessor& processor) override; 82 void Process(const AudioRenderer::CommandListProcessor& processor) override;
82 83
83 /** 84 /**
84 * Verify this command's data is valid. 85 * Verify this command's data is valid.
85 * @param processor - The CommandListProcessor processing this command. 86 * @param processor - The CommandListProcessor processing this command.
86 * @return True if the command is valid, otherwise false. 87 * @return True if the command is valid, otherwise false.
87 */ 88 */
88 bool Verify(const ADSP::CommandListProcessor& processor) override; 89 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
89 90
90 /// Quality used for sample rate conversion 91 /// Quality used for sample rate conversion
91 SrcQuality src_quality; 92 SrcQuality src_quality;
92 /// Mix buffer index for decoded samples 93 /// Mix buffer index for decoded samples
93 s16 output_index; 94 s16 output_index;
94 /// Flags to control decoding (see AudioCore::AudioRenderer::VoiceInfo::Flags) 95 /// Flags to control decoding (see AudioCore::Renderer::VoiceInfo::Flags)
95 u16 flags; 96 u16 flags;
96 /// Wavebuffer sample rate 97 /// Wavebuffer sample rate
97 u32 sample_rate; 98 u32 sample_rate;
@@ -107,4 +108,4 @@ struct PcmInt16DataSourceVersion2Command : ICommand {
107 CpuAddr voice_state; 108 CpuAddr voice_state;
108}; 109};
109 110
110} // namespace AudioCore::AudioRenderer 111} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/aux_.cpp b/src/audio_core/renderer/command/effect/aux_.cpp
index a3e12b3e7..74d9c229f 100644
--- a/src/audio_core/renderer/command/effect/aux_.cpp
+++ b/src/audio_core/renderer/command/effect/aux_.cpp
@@ -1,13 +1,13 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/effect/aux_.h" 5#include "audio_core/renderer/command/effect/aux_.h"
6#include "audio_core/renderer/effect/aux_.h" 6#include "audio_core/renderer/effect/aux_.h"
7#include "core/core.h" 7#include "core/core.h"
8#include "core/memory.h" 8#include "core/memory.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11/** 11/**
12 * Reset an AuxBuffer. 12 * Reset an AuxBuffer.
13 * 13 *
@@ -175,13 +175,13 @@ static u32 ReadAuxBufferDsp(Core::Memory::Memory& memory, CpuAddr return_info_,
175 return read_count_; 175 return read_count_;
176} 176}
177 177
178void AuxCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 178void AuxCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
179 std::string& string) { 179 std::string& string) {
180 string += fmt::format("AuxCommand\n\tenabled {} input {:02X} output {:02X}\n", effect_enabled, 180 string += fmt::format("AuxCommand\n\tenabled {} input {:02X} output {:02X}\n", effect_enabled,
181 input, output); 181 input, output);
182} 182}
183 183
184void AuxCommand::Process(const ADSP::CommandListProcessor& processor) { 184void AuxCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
185 auto input_buffer{ 185 auto input_buffer{
186 processor.mix_buffers.subspan(input * processor.sample_count, processor.sample_count)}; 186 processor.mix_buffers.subspan(input * processor.sample_count, processor.sample_count)};
187 auto output_buffer{ 187 auto output_buffer{
@@ -208,8 +208,8 @@ void AuxCommand::Process(const ADSP::CommandListProcessor& processor) {
208 } 208 }
209} 209}
210 210
211bool AuxCommand::Verify(const ADSP::CommandListProcessor& processor) { 211bool AuxCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
212 return true; 212 return true;
213} 213}
214 214
215} // namespace AudioCore::AudioRenderer 215} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/aux_.h b/src/audio_core/renderer/command/effect/aux_.h
index 825c93732..da1e55261 100644
--- a/src/audio_core/renderer/command/effect/aux_.h
+++ b/src/audio_core/renderer/command/effect/aux_.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command to read and write an auxiliary buffer, writing the input mix buffer to game 18 * AudioRenderer command to read and write an auxiliary buffer, writing the input mix buffer to game
18 * memory, and reading into the output buffer from game memory. 19 * memory, and reading into the output buffer from game memory.
@@ -24,14 +25,14 @@ struct AuxCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct AuxCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43 44
44 /// Input mix buffer index 45 /// Input mix buffer index
45 s16 input; 46 s16 input;
@@ -63,4 +64,4 @@ struct AuxCommand : ICommand {
63 bool effect_enabled; 64 bool effect_enabled;
64}; 65};
65 66
66} // namespace AudioCore::AudioRenderer 67} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/biquad_filter.cpp b/src/audio_core/renderer/command/effect/biquad_filter.cpp
index dea6423dc..3392e7747 100644
--- a/src/audio_core/renderer/command/effect/biquad_filter.cpp
+++ b/src/audio_core/renderer/command/effect/biquad_filter.cpp
@@ -1,12 +1,12 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/effect/biquad_filter.h" 5#include "audio_core/renderer/command/effect/biquad_filter.h"
6#include "audio_core/renderer/voice/voice_state.h" 6#include "audio_core/renderer/voice/voice_state.h"
7#include "common/bit_cast.h" 7#include "common/bit_cast.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10/** 10/**
11 * Biquad filter float implementation. 11 * Biquad filter float implementation.
12 * 12 *
@@ -76,14 +76,14 @@ static void ApplyBiquadFilterInt(std::span<s32> output, std::span<const s32> inp
76 } 76 }
77} 77}
78 78
79void BiquadFilterCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 79void BiquadFilterCommand::Dump(
80 std::string& string) { 80 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
81 string += fmt::format( 81 string += fmt::format(
82 "BiquadFilterCommand\n\tinput {:02X} output {:02X} needs_init {} use_float_processing {}\n", 82 "BiquadFilterCommand\n\tinput {:02X} output {:02X} needs_init {} use_float_processing {}\n",
83 input, output, needs_init, use_float_processing); 83 input, output, needs_init, use_float_processing);
84} 84}
85 85
86void BiquadFilterCommand::Process(const ADSP::CommandListProcessor& processor) { 86void BiquadFilterCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
87 auto state_{reinterpret_cast<VoiceState::BiquadFilterState*>(state)}; 87 auto state_{reinterpret_cast<VoiceState::BiquadFilterState*>(state)};
88 if (needs_init) { 88 if (needs_init) {
89 *state_ = {}; 89 *state_ = {};
@@ -103,8 +103,8 @@ void BiquadFilterCommand::Process(const ADSP::CommandListProcessor& processor) {
103 } 103 }
104} 104}
105 105
106bool BiquadFilterCommand::Verify(const ADSP::CommandListProcessor& processor) { 106bool BiquadFilterCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
107 return true; 107 return true;
108} 108}
109 109
110} // namespace AudioCore::AudioRenderer 110} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/biquad_filter.h b/src/audio_core/renderer/command/effect/biquad_filter.h
index 4c9c42d29..0e903930a 100644
--- a/src/audio_core/renderer/command/effect/biquad_filter.h
+++ b/src/audio_core/renderer/command/effect/biquad_filter.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/voice/voice_state.h" 10#include "audio_core/renderer/voice/voice_state.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for applying a biquad filter to the input mix buffer, saving the results to 20 * AudioRenderer command for applying a biquad filter to the input mix buffer, saving the results to
20 * the output mix buffer. 21 * the output mix buffer.
@@ -26,14 +27,14 @@ struct BiquadFilterCommand : ICommand {
26 * @param processor - The CommandListProcessor processing this command. 27 * @param processor - The CommandListProcessor processing this command.
27 * @param string - The string to print into. 28 * @param string - The string to print into.
28 */ 29 */
29 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 30 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
30 31
31 /** 32 /**
32 * Process this command. 33 * Process this command.
33 * 34 *
34 * @param processor - The CommandListProcessor processing this command. 35 * @param processor - The CommandListProcessor processing this command.
35 */ 36 */
36 void Process(const ADSP::CommandListProcessor& processor) override; 37 void Process(const AudioRenderer::CommandListProcessor& processor) override;
37 38
38 /** 39 /**
39 * Verify this command's data is valid. 40 * Verify this command's data is valid.
@@ -41,7 +42,7 @@ struct BiquadFilterCommand : ICommand {
41 * @param processor - The CommandListProcessor processing this command. 42 * @param processor - The CommandListProcessor processing this command.
42 * @return True if the command is valid, otherwise false. 43 * @return True if the command is valid, otherwise false.
43 */ 44 */
44 bool Verify(const ADSP::CommandListProcessor& processor) override; 45 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
45 46
46 /// Input mix buffer index 47 /// Input mix buffer index
47 s16 input; 48 s16 input;
@@ -71,4 +72,4 @@ void ApplyBiquadFilterFloat(std::span<s32> output, std::span<const s32> input,
71 std::array<s16, 3>& b, std::array<s16, 2>& a, 72 std::array<s16, 3>& b, std::array<s16, 2>& a,
72 VoiceState::BiquadFilterState& state, const u32 sample_count); 73 VoiceState::BiquadFilterState& state, const u32 sample_count);
73 74
74} // namespace AudioCore::AudioRenderer 75} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/capture.cpp b/src/audio_core/renderer/command/effect/capture.cpp
index 042fd286e..f235ce027 100644
--- a/src/audio_core/renderer/command/effect/capture.cpp
+++ b/src/audio_core/renderer/command/effect/capture.cpp
@@ -1,12 +1,12 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/effect/capture.h" 5#include "audio_core/renderer/command/effect/capture.h"
6#include "audio_core/renderer/effect/aux_.h" 6#include "audio_core/renderer/effect/aux_.h"
7#include "core/memory.h" 7#include "core/memory.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10/** 10/**
11 * Reset an AuxBuffer. 11 * Reset an AuxBuffer.
12 * 12 *
@@ -118,13 +118,13 @@ static u32 WriteAuxBufferDsp(Core::Memory::Memory& memory, const CpuAddr send_in
118 return write_count_; 118 return write_count_;
119} 119}
120 120
121void CaptureCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 121void CaptureCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
122 std::string& string) { 122 std::string& string) {
123 string += fmt::format("CaptureCommand\n\tenabled {} input {:02X} output {:02X}", effect_enabled, 123 string += fmt::format("CaptureCommand\n\tenabled {} input {:02X} output {:02X}", effect_enabled,
124 input, output); 124 input, output);
125} 125}
126 126
127void CaptureCommand::Process(const ADSP::CommandListProcessor& processor) { 127void CaptureCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
128 if (effect_enabled) { 128 if (effect_enabled) {
129 auto input_buffer{ 129 auto input_buffer{
130 processor.mix_buffers.subspan(input * processor.sample_count, processor.sample_count)}; 130 processor.mix_buffers.subspan(input * processor.sample_count, processor.sample_count)};
@@ -135,8 +135,8 @@ void CaptureCommand::Process(const ADSP::CommandListProcessor& processor) {
135 } 135 }
136} 136}
137 137
138bool CaptureCommand::Verify(const ADSP::CommandListProcessor& processor) { 138bool CaptureCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
139 return true; 139 return true;
140} 140}
141 141
142} // namespace AudioCore::AudioRenderer 142} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/capture.h b/src/audio_core/renderer/command/effect/capture.h
index 8670acb24..a0016c6f6 100644
--- a/src/audio_core/renderer/command/effect/capture.h
+++ b/src/audio_core/renderer/command/effect/capture.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for capturing a mix buffer. That is, writing it back to a given game memory 18 * AudioRenderer command for capturing a mix buffer. That is, writing it back to a given game memory
18 * address. 19 * address.
@@ -24,14 +25,14 @@ struct CaptureCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct CaptureCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43 44
44 /// Input mix buffer index 45 /// Input mix buffer index
45 s16 input; 46 s16 input;
@@ -59,4 +60,4 @@ struct CaptureCommand : ICommand {
59 bool effect_enabled; 60 bool effect_enabled;
60}; 61};
61 62
62} // namespace AudioCore::AudioRenderer 63} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/compressor.cpp b/src/audio_core/renderer/command/effect/compressor.cpp
index ee9b68d5b..7ff707f4e 100644
--- a/src/audio_core/renderer/command/effect/compressor.cpp
+++ b/src/audio_core/renderer/command/effect/compressor.cpp
@@ -5,11 +5,11 @@
5#include <span> 5#include <span>
6#include <vector> 6#include <vector>
7 7
8#include "audio_core/renderer/adsp/command_list_processor.h" 8#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
9#include "audio_core/renderer/command/effect/compressor.h" 9#include "audio_core/renderer/command/effect/compressor.h"
10#include "audio_core/renderer/effect/compressor.h" 10#include "audio_core/renderer/effect/compressor.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::Renderer {
13 13
14static void SetCompressorEffectParameter(const CompressorInfo::ParameterVersion2& params, 14static void SetCompressorEffectParameter(const CompressorInfo::ParameterVersion2& params,
15 CompressorInfo::State& state) { 15 CompressorInfo::State& state) {
@@ -110,7 +110,7 @@ static void ApplyCompressorEffect(const CompressorInfo::ParameterVersion2& param
110 } 110 }
111} 111}
112 112
113void CompressorCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 113void CompressorCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
114 std::string& string) { 114 std::string& string) {
115 string += fmt::format("CompressorCommand\n\tenabled {} \n\tinputs: ", effect_enabled); 115 string += fmt::format("CompressorCommand\n\tenabled {} \n\tinputs: ", effect_enabled);
116 for (s16 i = 0; i < parameter.channel_count; i++) { 116 for (s16 i = 0; i < parameter.channel_count; i++) {
@@ -123,7 +123,7 @@ void CompressorCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor&
123 string += "\n"; 123 string += "\n";
124} 124}
125 125
126void CompressorCommand::Process(const ADSP::CommandListProcessor& processor) { 126void CompressorCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
127 std::array<std::span<const s32>, MaxChannels> input_buffers{}; 127 std::array<std::span<const s32>, MaxChannels> input_buffers{};
128 std::array<std::span<s32>, MaxChannels> output_buffers{}; 128 std::array<std::span<s32>, MaxChannels> output_buffers{};
129 129
@@ -148,8 +148,8 @@ void CompressorCommand::Process(const ADSP::CommandListProcessor& processor) {
148 processor.sample_count); 148 processor.sample_count);
149} 149}
150 150
151bool CompressorCommand::Verify(const ADSP::CommandListProcessor& processor) { 151bool CompressorCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
152 return true; 152 return true;
153} 153}
154 154
155} // namespace AudioCore::AudioRenderer 155} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/compressor.h b/src/audio_core/renderer/command/effect/compressor.h
index f8e96cb43..c011aa927 100644
--- a/src/audio_core/renderer/command/effect/compressor.h
+++ b/src/audio_core/renderer/command/effect/compressor.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/effect/compressor.h" 10#include "audio_core/renderer/effect/compressor.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for limiting volume between a high and low threshold. 20 * AudioRenderer command for limiting volume between a high and low threshold.
20 * Version 1. 21 * Version 1.
@@ -26,14 +27,14 @@ struct CompressorCommand : ICommand {
26 * @param processor - The CommandListProcessor processing this command. 27 * @param processor - The CommandListProcessor processing this command.
27 * @param string - The string to print into. 28 * @param string - The string to print into.
28 */ 29 */
29 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 30 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
30 31
31 /** 32 /**
32 * Process this command. 33 * Process this command.
33 * 34 *
34 * @param processor - The CommandListProcessor processing this command. 35 * @param processor - The CommandListProcessor processing this command.
35 */ 36 */
36 void Process(const ADSP::CommandListProcessor& processor) override; 37 void Process(const AudioRenderer::CommandListProcessor& processor) override;
37 38
38 /** 39 /**
39 * Verify this command's data is valid. 40 * Verify this command's data is valid.
@@ -41,7 +42,7 @@ struct CompressorCommand : ICommand {
41 * @param processor - The CommandListProcessor processing this command. 42 * @param processor - The CommandListProcessor processing this command.
42 * @return True if the command is valid, otherwise false. 43 * @return True if the command is valid, otherwise false.
43 */ 44 */
44 bool Verify(const ADSP::CommandListProcessor& processor) override; 45 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
45 46
46 /// Input mix buffer offsets for each channel 47 /// Input mix buffer offsets for each channel
47 std::array<s16, MaxChannels> inputs; 48 std::array<s16, MaxChannels> inputs;
@@ -57,4 +58,4 @@ struct CompressorCommand : ICommand {
57 bool effect_enabled; 58 bool effect_enabled;
58}; 59};
59 60
60} // namespace AudioCore::AudioRenderer 61} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/delay.cpp b/src/audio_core/renderer/command/effect/delay.cpp
index e536cbb1e..ffb298c07 100644
--- a/src/audio_core/renderer/command/effect/delay.cpp
+++ b/src/audio_core/renderer/command/effect/delay.cpp
@@ -1,10 +1,10 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/effect/delay.h" 5#include "audio_core/renderer/command/effect/delay.h"
6 6
7namespace AudioCore::AudioRenderer { 7namespace AudioCore::Renderer {
8/** 8/**
9 * Update the DelayInfo state according to the given parameters. 9 * Update the DelayInfo state according to the given parameters.
10 * 10 *
@@ -194,7 +194,7 @@ static void ApplyDelayEffect(const DelayInfo::ParameterVersion1& params, DelayIn
194 } 194 }
195} 195}
196 196
197void DelayCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 197void DelayCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
198 std::string& string) { 198 std::string& string) {
199 string += fmt::format("DelayCommand\n\tenabled {} \n\tinputs: ", effect_enabled); 199 string += fmt::format("DelayCommand\n\tenabled {} \n\tinputs: ", effect_enabled);
200 for (u32 i = 0; i < MaxChannels; i++) { 200 for (u32 i = 0; i < MaxChannels; i++) {
@@ -207,7 +207,7 @@ void DelayCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& proce
207 string += "\n"; 207 string += "\n";
208} 208}
209 209
210void DelayCommand::Process(const ADSP::CommandListProcessor& processor) { 210void DelayCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
211 std::array<std::span<const s32>, MaxChannels> input_buffers{}; 211 std::array<std::span<const s32>, MaxChannels> input_buffers{};
212 std::array<std::span<s32>, MaxChannels> output_buffers{}; 212 std::array<std::span<s32>, MaxChannels> output_buffers{};
213 213
@@ -231,8 +231,8 @@ void DelayCommand::Process(const ADSP::CommandListProcessor& processor) {
231 processor.sample_count); 231 processor.sample_count);
232} 232}
233 233
234bool DelayCommand::Verify(const ADSP::CommandListProcessor& processor) { 234bool DelayCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
235 return true; 235 return true;
236} 236}
237 237
238} // namespace AudioCore::AudioRenderer 238} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/delay.h b/src/audio_core/renderer/command/effect/delay.h
index b7a15ae6b..bfeac7af4 100644
--- a/src/audio_core/renderer/command/effect/delay.h
+++ b/src/audio_core/renderer/command/effect/delay.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/effect/delay.h" 10#include "audio_core/renderer/effect/delay.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for a delay effect. Delays inputs mix buffers according to the parameters 20 * AudioRenderer command for a delay effect. Delays inputs mix buffers according to the parameters
20 * and state, outputs receives the delayed samples. 21 * and state, outputs receives the delayed samples.
@@ -26,14 +27,14 @@ struct DelayCommand : ICommand {
26 * @param processor - The CommandListProcessor processing this command. 27 * @param processor - The CommandListProcessor processing this command.
27 * @param string - The string to print into. 28 * @param string - The string to print into.
28 */ 29 */
29 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 30 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
30 31
31 /** 32 /**
32 * Process this command. 33 * Process this command.
33 * 34 *
34 * @param processor - The CommandListProcessor processing this command. 35 * @param processor - The CommandListProcessor processing this command.
35 */ 36 */
36 void Process(const ADSP::CommandListProcessor& processor) override; 37 void Process(const AudioRenderer::CommandListProcessor& processor) override;
37 38
38 /** 39 /**
39 * Verify this command's data is valid. 40 * Verify this command's data is valid.
@@ -41,7 +42,7 @@ struct DelayCommand : ICommand {
41 * @param processor - The CommandListProcessor processing this command. 42 * @param processor - The CommandListProcessor processing this command.
42 * @return True if the command is valid, otherwise false. 43 * @return True if the command is valid, otherwise false.
43 */ 44 */
44 bool Verify(const ADSP::CommandListProcessor& processor) override; 45 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
45 46
46 /// Input mix buffer offsets for each channel 47 /// Input mix buffer offsets for each channel
47 std::array<s16, MaxChannels> inputs; 48 std::array<s16, MaxChannels> inputs;
@@ -57,4 +58,4 @@ struct DelayCommand : ICommand {
57 bool effect_enabled; 58 bool effect_enabled;
58}; 59};
59 60
60} // namespace AudioCore::AudioRenderer 61} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp
index d2bfb67cc..ecfdfabc6 100644
--- a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp
+++ b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp
@@ -3,11 +3,11 @@
3 3
4#include <numbers> 4#include <numbers>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/effect/i3dl2_reverb.h" 7#include "audio_core/renderer/command/effect/i3dl2_reverb.h"
8#include "common/polyfill_ranges.h" 8#include "common/polyfill_ranges.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11 11
12constexpr std::array<f32, I3dl2ReverbInfo::MaxDelayLines> MinDelayLineTimes{ 12constexpr std::array<f32, I3dl2ReverbInfo::MaxDelayLines> MinDelayLineTimes{
13 5.0f, 13 5.0f,
@@ -394,7 +394,7 @@ static void ApplyI3dl2ReverbEffect(const I3dl2ReverbInfo::ParameterVersion1& par
394 } 394 }
395} 395}
396 396
397void I3dl2ReverbCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 397void I3dl2ReverbCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
398 std::string& string) { 398 std::string& string) {
399 string += fmt::format("I3dl2ReverbCommand\n\tenabled {} \n\tinputs: ", effect_enabled); 399 string += fmt::format("I3dl2ReverbCommand\n\tenabled {} \n\tinputs: ", effect_enabled);
400 for (u32 i = 0; i < parameter.channel_count; i++) { 400 for (u32 i = 0; i < parameter.channel_count; i++) {
@@ -407,7 +407,7 @@ void I3dl2ReverbCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor&
407 string += "\n"; 407 string += "\n";
408} 408}
409 409
410void I3dl2ReverbCommand::Process(const ADSP::CommandListProcessor& processor) { 410void I3dl2ReverbCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
411 std::array<std::span<const s32>, MaxChannels> input_buffers{}; 411 std::array<std::span<const s32>, MaxChannels> input_buffers{};
412 std::array<std::span<s32>, MaxChannels> output_buffers{}; 412 std::array<std::span<s32>, MaxChannels> output_buffers{};
413 413
@@ -431,8 +431,8 @@ void I3dl2ReverbCommand::Process(const ADSP::CommandListProcessor& processor) {
431 processor.sample_count); 431 processor.sample_count);
432} 432}
433 433
434bool I3dl2ReverbCommand::Verify(const ADSP::CommandListProcessor& processor) { 434bool I3dl2ReverbCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
435 return true; 435 return true;
436} 436}
437 437
438} // namespace AudioCore::AudioRenderer 438} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/i3dl2_reverb.h b/src/audio_core/renderer/command/effect/i3dl2_reverb.h
index 243877056..e4c538ae8 100644
--- a/src/audio_core/renderer/command/effect/i3dl2_reverb.h
+++ b/src/audio_core/renderer/command/effect/i3dl2_reverb.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/effect/i3dl2.h" 10#include "audio_core/renderer/effect/i3dl2.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for a I3DL2Reverb effect. Apply a reverb to inputs mix buffer according to 20 * AudioRenderer command for a I3DL2Reverb effect. Apply a reverb to inputs mix buffer according to
20 * the I3DL2 spec, outputs receives the results. 21 * the I3DL2 spec, outputs receives the results.
@@ -26,14 +27,14 @@ struct I3dl2ReverbCommand : ICommand {
26 * @param processor - The CommandListProcessor processing this command. 27 * @param processor - The CommandListProcessor processing this command.
27 * @param string - The string to print into. 28 * @param string - The string to print into.
28 */ 29 */
29 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 30 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
30 31
31 /** 32 /**
32 * Process this command. 33 * Process this command.
33 * 34 *
34 * @param processor - The CommandListProcessor processing this command. 35 * @param processor - The CommandListProcessor processing this command.
35 */ 36 */
36 void Process(const ADSP::CommandListProcessor& processor) override; 37 void Process(const AudioRenderer::CommandListProcessor& processor) override;
37 38
38 /** 39 /**
39 * Verify this command's data is valid. 40 * Verify this command's data is valid.
@@ -41,7 +42,7 @@ struct I3dl2ReverbCommand : ICommand {
41 * @param processor - The CommandListProcessor processing this command. 42 * @param processor - The CommandListProcessor processing this command.
42 * @return True if the command is valid, otherwise false. 43 * @return True if the command is valid, otherwise false.
43 */ 44 */
44 bool Verify(const ADSP::CommandListProcessor& processor) override; 45 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
45 46
46 /// Input mix buffer offsets for each channel 47 /// Input mix buffer offsets for each channel
47 std::array<s16, MaxChannels> inputs; 48 std::array<s16, MaxChannels> inputs;
@@ -57,4 +58,4 @@ struct I3dl2ReverbCommand : ICommand {
57 bool effect_enabled; 58 bool effect_enabled;
58}; 59};
59 60
60} // namespace AudioCore::AudioRenderer 61} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/light_limiter.cpp b/src/audio_core/renderer/command/effect/light_limiter.cpp
index 4161a9821..63aa06f5c 100644
--- a/src/audio_core/renderer/command/effect/light_limiter.cpp
+++ b/src/audio_core/renderer/command/effect/light_limiter.cpp
@@ -1,10 +1,10 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/effect/light_limiter.h" 5#include "audio_core/renderer/command/effect/light_limiter.h"
6 6
7namespace AudioCore::AudioRenderer { 7namespace AudioCore::Renderer {
8/** 8/**
9 * Update the LightLimiterInfo state according to the given parameters. 9 * Update the LightLimiterInfo state according to the given parameters.
10 * A no-op. 10 * A no-op.
@@ -133,8 +133,8 @@ static void ApplyLightLimiterEffect(const LightLimiterInfo::ParameterVersion2& p
133 } 133 }
134} 134}
135 135
136void LightLimiterVersion1Command::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 136void LightLimiterVersion1Command::Dump(
137 std::string& string) { 137 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
138 string += fmt::format("LightLimiterVersion1Command\n\tinputs: "); 138 string += fmt::format("LightLimiterVersion1Command\n\tinputs: ");
139 for (u32 i = 0; i < MaxChannels; i++) { 139 for (u32 i = 0; i < MaxChannels; i++) {
140 string += fmt::format("{:02X}, ", inputs[i]); 140 string += fmt::format("{:02X}, ", inputs[i]);
@@ -146,7 +146,7 @@ void LightLimiterVersion1Command::Dump([[maybe_unused]] const ADSP::CommandListP
146 string += "\n"; 146 string += "\n";
147} 147}
148 148
149void LightLimiterVersion1Command::Process(const ADSP::CommandListProcessor& processor) { 149void LightLimiterVersion1Command::Process(const AudioRenderer::CommandListProcessor& processor) {
150 std::array<std::span<const s32>, MaxChannels> input_buffers{}; 150 std::array<std::span<const s32>, MaxChannels> input_buffers{};
151 std::array<std::span<s32>, MaxChannels> output_buffers{}; 151 std::array<std::span<s32>, MaxChannels> output_buffers{};
152 152
@@ -172,12 +172,12 @@ void LightLimiterVersion1Command::Process(const ADSP::CommandListProcessor& proc
172 processor.sample_count, statistics); 172 processor.sample_count, statistics);
173} 173}
174 174
175bool LightLimiterVersion1Command::Verify(const ADSP::CommandListProcessor& processor) { 175bool LightLimiterVersion1Command::Verify(const AudioRenderer::CommandListProcessor& processor) {
176 return true; 176 return true;
177} 177}
178 178
179void LightLimiterVersion2Command::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 179void LightLimiterVersion2Command::Dump(
180 std::string& string) { 180 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
181 string += fmt::format("LightLimiterVersion2Command\n\tinputs: \n"); 181 string += fmt::format("LightLimiterVersion2Command\n\tinputs: \n");
182 for (u32 i = 0; i < MaxChannels; i++) { 182 for (u32 i = 0; i < MaxChannels; i++) {
183 string += fmt::format("{:02X}, ", inputs[i]); 183 string += fmt::format("{:02X}, ", inputs[i]);
@@ -189,7 +189,7 @@ void LightLimiterVersion2Command::Dump([[maybe_unused]] const ADSP::CommandListP
189 string += "\n"; 189 string += "\n";
190} 190}
191 191
192void LightLimiterVersion2Command::Process(const ADSP::CommandListProcessor& processor) { 192void LightLimiterVersion2Command::Process(const AudioRenderer::CommandListProcessor& processor) {
193 std::array<std::span<const s32>, MaxChannels> input_buffers{}; 193 std::array<std::span<const s32>, MaxChannels> input_buffers{};
194 std::array<std::span<s32>, MaxChannels> output_buffers{}; 194 std::array<std::span<s32>, MaxChannels> output_buffers{};
195 195
@@ -215,8 +215,8 @@ void LightLimiterVersion2Command::Process(const ADSP::CommandListProcessor& proc
215 processor.sample_count, statistics); 215 processor.sample_count, statistics);
216} 216}
217 217
218bool LightLimiterVersion2Command::Verify(const ADSP::CommandListProcessor& processor) { 218bool LightLimiterVersion2Command::Verify(const AudioRenderer::CommandListProcessor& processor) {
219 return true; 219 return true;
220} 220}
221 221
222} // namespace AudioCore::AudioRenderer 222} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/light_limiter.h b/src/audio_core/renderer/command/effect/light_limiter.h
index 5d98272c7..6e3ee1b53 100644
--- a/src/audio_core/renderer/command/effect/light_limiter.h
+++ b/src/audio_core/renderer/command/effect/light_limiter.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/effect/light_limiter.h" 10#include "audio_core/renderer/effect/light_limiter.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for limiting volume between a high and low threshold. 20 * AudioRenderer command for limiting volume between a high and low threshold.
20 * Version 1. 21 * Version 1.
@@ -26,14 +27,14 @@ struct LightLimiterVersion1Command : ICommand {
26 * @param processor - The CommandListProcessor processing this command. 27 * @param processor - The CommandListProcessor processing this command.
27 * @param string - The string to print into. 28 * @param string - The string to print into.
28 */ 29 */
29 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 30 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
30 31
31 /** 32 /**
32 * Process this command. 33 * Process this command.
33 * 34 *
34 * @param processor - The CommandListProcessor processing this command. 35 * @param processor - The CommandListProcessor processing this command.
35 */ 36 */
36 void Process(const ADSP::CommandListProcessor& processor) override; 37 void Process(const AudioRenderer::CommandListProcessor& processor) override;
37 38
38 /** 39 /**
39 * Verify this command's data is valid. 40 * Verify this command's data is valid.
@@ -41,7 +42,7 @@ struct LightLimiterVersion1Command : ICommand {
41 * @param processor - The CommandListProcessor processing this command. 42 * @param processor - The CommandListProcessor processing this command.
42 * @return True if the command is valid, otherwise false. 43 * @return True if the command is valid, otherwise false.
43 */ 44 */
44 bool Verify(const ADSP::CommandListProcessor& processor) override; 45 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
45 46
46 /// Input mix buffer offsets for each channel 47 /// Input mix buffer offsets for each channel
47 std::array<s16, MaxChannels> inputs; 48 std::array<s16, MaxChannels> inputs;
@@ -68,21 +69,21 @@ struct LightLimiterVersion2Command : ICommand {
68 * @param processor - The CommandListProcessor processing this command. 69 * @param processor - The CommandListProcessor processing this command.
69 * @param string - The string to print into. 70 * @param string - The string to print into.
70 */ 71 */
71 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 72 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
72 73
73 /** 74 /**
74 * Process this command. 75 * Process this command.
75 * 76 *
76 * @param processor - The CommandListProcessor processing this command. 77 * @param processor - The CommandListProcessor processing this command.
77 */ 78 */
78 void Process(const ADSP::CommandListProcessor& processor) override; 79 void Process(const AudioRenderer::CommandListProcessor& processor) override;
79 80
80 /** 81 /**
81 * Verify this command's data is valid. 82 * Verify this command's data is valid.
82 * 83 *
83 * @param processor - The CommandListProcessor processing this command. 84 * @param processor - The CommandListProcessor processing this command.
84 */ 85 */
85 bool Verify(const ADSP::CommandListProcessor& processor) override; 86 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
86 87
87 /// Input mix buffer offsets for each channel 88 /// Input mix buffer offsets for each channel
88 std::array<s16, MaxChannels> inputs; 89 std::array<s16, MaxChannels> inputs;
@@ -100,4 +101,4 @@ struct LightLimiterVersion2Command : ICommand {
100 bool effect_enabled; 101 bool effect_enabled;
101}; 102};
102 103
103} // namespace AudioCore::AudioRenderer 104} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.cpp b/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.cpp
index 48a7cba8a..208bbeaf2 100644
--- a/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.cpp
+++ b/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.cpp
@@ -1,20 +1,20 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/effect/biquad_filter.h" 5#include "audio_core/renderer/command/effect/biquad_filter.h"
6#include "audio_core/renderer/command/effect/multi_tap_biquad_filter.h" 6#include "audio_core/renderer/command/effect/multi_tap_biquad_filter.h"
7 7
8namespace AudioCore::AudioRenderer { 8namespace AudioCore::Renderer {
9 9
10void MultiTapBiquadFilterCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 10void MultiTapBiquadFilterCommand::Dump(
11 std::string& string) { 11 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
12 string += fmt::format( 12 string += fmt::format(
13 "MultiTapBiquadFilterCommand\n\tinput {:02X}\n\toutput {:02X}\n\tneeds_init ({}, {})\n", 13 "MultiTapBiquadFilterCommand\n\tinput {:02X}\n\toutput {:02X}\n\tneeds_init ({}, {})\n",
14 input, output, needs_init[0], needs_init[1]); 14 input, output, needs_init[0], needs_init[1]);
15} 15}
16 16
17void MultiTapBiquadFilterCommand::Process(const ADSP::CommandListProcessor& processor) { 17void MultiTapBiquadFilterCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
18 if (filter_tap_count > MaxBiquadFilters) { 18 if (filter_tap_count > MaxBiquadFilters) {
19 LOG_ERROR(Service_Audio, "Too many filter taps! {}", filter_tap_count); 19 LOG_ERROR(Service_Audio, "Too many filter taps! {}", filter_tap_count);
20 filter_tap_count = MaxBiquadFilters; 20 filter_tap_count = MaxBiquadFilters;
@@ -38,8 +38,8 @@ void MultiTapBiquadFilterCommand::Process(const ADSP::CommandListProcessor& proc
38 } 38 }
39} 39}
40 40
41bool MultiTapBiquadFilterCommand::Verify(const ADSP::CommandListProcessor& processor) { 41bool MultiTapBiquadFilterCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
42 return true; 42 return true;
43} 43}
44 44
45} // namespace AudioCore::AudioRenderer 45} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.h b/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.h
index 99c2c0830..50fce80b0 100644
--- a/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.h
+++ b/src/audio_core/renderer/command/effect/multi_tap_biquad_filter.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/voice/voice_info.h" 10#include "audio_core/renderer/voice/voice_info.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for applying multiple biquads at once. 20 * AudioRenderer command for applying multiple biquads at once.
20 */ 21 */
@@ -25,14 +26,14 @@ struct MultiTapBiquadFilterCommand : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,7 +41,7 @@ struct MultiTapBiquadFilterCommand : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Input mix buffer index 46 /// Input mix buffer index
46 s16 input; 47 s16 input;
@@ -56,4 +57,4 @@ struct MultiTapBiquadFilterCommand : ICommand {
56 u8 filter_tap_count; 57 u8 filter_tap_count;
57}; 58};
58 59
59} // namespace AudioCore::AudioRenderer 60} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/reverb.cpp b/src/audio_core/renderer/command/effect/reverb.cpp
index fc2f15a5e..7f152a962 100644
--- a/src/audio_core/renderer/command/effect/reverb.cpp
+++ b/src/audio_core/renderer/command/effect/reverb.cpp
@@ -4,11 +4,11 @@
4#include <numbers> 4#include <numbers>
5#include <ranges> 5#include <ranges>
6 6
7#include "audio_core/renderer/adsp/command_list_processor.h" 7#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
8#include "audio_core/renderer/command/effect/reverb.h" 8#include "audio_core/renderer/command/effect/reverb.h"
9#include "common/polyfill_ranges.h" 9#include "common/polyfill_ranges.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::Renderer {
12 12
13constexpr std::array<f32, ReverbInfo::MaxDelayLines> FdnMaxDelayLineTimes = { 13constexpr std::array<f32, ReverbInfo::MaxDelayLines> FdnMaxDelayLineTimes = {
14 53.9532470703125f, 14 53.9532470703125f,
@@ -396,7 +396,7 @@ static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, Rever
396 } 396 }
397} 397}
398 398
399void ReverbCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 399void ReverbCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
400 std::string& string) { 400 std::string& string) {
401 string += fmt::format( 401 string += fmt::format(
402 "ReverbCommand\n\tenabled {} long_size_pre_delay_supported {}\n\tinputs: ", effect_enabled, 402 "ReverbCommand\n\tenabled {} long_size_pre_delay_supported {}\n\tinputs: ", effect_enabled,
@@ -411,7 +411,7 @@ void ReverbCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& proc
411 string += "\n"; 411 string += "\n";
412} 412}
413 413
414void ReverbCommand::Process(const ADSP::CommandListProcessor& processor) { 414void ReverbCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
415 std::array<std::span<const s32>, MaxChannels> input_buffers{}; 415 std::array<std::span<const s32>, MaxChannels> input_buffers{};
416 std::array<std::span<s32>, MaxChannels> output_buffers{}; 416 std::array<std::span<s32>, MaxChannels> output_buffers{};
417 417
@@ -435,8 +435,8 @@ void ReverbCommand::Process(const ADSP::CommandListProcessor& processor) {
435 processor.sample_count); 435 processor.sample_count);
436} 436}
437 437
438bool ReverbCommand::Verify(const ADSP::CommandListProcessor& processor) { 438bool ReverbCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
439 return true; 439 return true;
440} 440}
441 441
442} // namespace AudioCore::AudioRenderer 442} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/effect/reverb.h b/src/audio_core/renderer/command/effect/reverb.h
index 328756150..2056c73f2 100644
--- a/src/audio_core/renderer/command/effect/reverb.h
+++ b/src/audio_core/renderer/command/effect/reverb.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/effect/reverb.h" 10#include "audio_core/renderer/effect/reverb.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for a Reverb effect. Apply a reverb to inputs mix buffer, outputs receives 20 * AudioRenderer command for a Reverb effect. Apply a reverb to inputs mix buffer, outputs receives
20 * the results. 21 * the results.
@@ -26,14 +27,14 @@ struct ReverbCommand : ICommand {
26 * @param processor - The CommandListProcessor processing this command. 27 * @param processor - The CommandListProcessor processing this command.
27 * @param string - The string to print into. 28 * @param string - The string to print into.
28 */ 29 */
29 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 30 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
30 31
31 /** 32 /**
32 * Process this command. 33 * Process this command.
33 * 34 *
34 * @param processor - The CommandListProcessor processing this command. 35 * @param processor - The CommandListProcessor processing this command.
35 */ 36 */
36 void Process(const ADSP::CommandListProcessor& processor) override; 37 void Process(const AudioRenderer::CommandListProcessor& processor) override;
37 38
38 /** 39 /**
39 * Verify this command's data is valid. 40 * Verify this command's data is valid.
@@ -41,7 +42,7 @@ struct ReverbCommand : ICommand {
41 * @param processor - The CommandListProcessor processing this command. 42 * @param processor - The CommandListProcessor processing this command.
42 * @return True if the command is valid, otherwise false. 43 * @return True if the command is valid, otherwise false.
43 */ 44 */
44 bool Verify(const ADSP::CommandListProcessor& processor) override; 45 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
45 46
46 /// Input mix buffer offsets for each channel 47 /// Input mix buffer offsets for each channel
47 std::array<s16, MaxChannels> inputs; 48 std::array<s16, MaxChannels> inputs;
@@ -59,4 +60,4 @@ struct ReverbCommand : ICommand {
59 bool long_size_pre_delay_supported; 60 bool long_size_pre_delay_supported;
60}; 61};
61 62
62} // namespace AudioCore::AudioRenderer 63} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/icommand.h b/src/audio_core/renderer/command/icommand.h
index f2dd41254..10a78ddf2 100644
--- a/src/audio_core/renderer/command/icommand.h
+++ b/src/audio_core/renderer/command/icommand.h
@@ -3,14 +3,18 @@
3 3
4#pragma once 4#pragma once
5 5
6#include <string>
7
6#include "audio_core/common/common.h" 8#include "audio_core/common/common.h"
7#include "common/common_types.h" 9#include "common/common_types.h"
8 10
9namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
10namespace ADSP {
11class CommandListProcessor; 12class CommandListProcessor;
12} 13}
13 14
15namespace AudioCore::Renderer {
16using namespace ::AudioCore::ADSP;
17
14enum class CommandId : u8 { 18enum class CommandId : u8 {
15 /* 0x00 */ Invalid, 19 /* 0x00 */ Invalid,
16 /* 0x01 */ DataSourcePcmInt16Version1, 20 /* 0x01 */ DataSourcePcmInt16Version1,
@@ -59,14 +63,15 @@ struct ICommand {
59 * @param processor - The CommandListProcessor processing this command. 63 * @param processor - The CommandListProcessor processing this command.
60 * @param string - The string to print into. 64 * @param string - The string to print into.
61 */ 65 */
62 virtual void Dump(const ADSP::CommandListProcessor& processor, std::string& string) = 0; 66 virtual void Dump(const AudioRenderer::CommandListProcessor& processor,
67 std::string& string) = 0;
63 68
64 /** 69 /**
65 * Process this command. 70 * Process this command.
66 * 71 *
67 * @param processor - The CommandListProcessor processing this command. 72 * @param processor - The CommandListProcessor processing this command.
68 */ 73 */
69 virtual void Process(const ADSP::CommandListProcessor& processor) = 0; 74 virtual void Process(const AudioRenderer::CommandListProcessor& processor) = 0;
70 75
71 /** 76 /**
72 * Verify this command's data is valid. 77 * Verify this command's data is valid.
@@ -74,7 +79,7 @@ struct ICommand {
74 * @param processor - The CommandListProcessor processing this command. 79 * @param processor - The CommandListProcessor processing this command.
75 * @return True if the command is valid, otherwise false. 80 * @return True if the command is valid, otherwise false.
76 */ 81 */
77 virtual bool Verify(const ADSP::CommandListProcessor& processor) = 0; 82 virtual bool Verify(const AudioRenderer::CommandListProcessor& processor) = 0;
78 83
79 /// Command magic 0xCAFEBABE 84 /// Command magic 0xCAFEBABE
80 u32 magic{}; 85 u32 magic{};
@@ -90,4 +95,4 @@ struct ICommand {
90 u32 node_id{}; 95 u32 node_id{};
91}; 96};
92 97
93} // namespace AudioCore::AudioRenderer 98} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/clear_mix.cpp b/src/audio_core/renderer/command/mix/clear_mix.cpp
index 4f649d6a8..060d7cb28 100644
--- a/src/audio_core/renderer/command/mix/clear_mix.cpp
+++ b/src/audio_core/renderer/command/mix/clear_mix.cpp
@@ -3,22 +3,22 @@
3 3
4#include <string> 4#include <string>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/mix/clear_mix.h" 7#include "audio_core/renderer/command/mix/clear_mix.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10 10
11void ClearMixBufferCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 11void ClearMixBufferCommand::Dump(
12 std::string& string) { 12 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
13 string += fmt::format("ClearMixBufferCommand\n"); 13 string += fmt::format("ClearMixBufferCommand\n");
14} 14}
15 15
16void ClearMixBufferCommand::Process(const ADSP::CommandListProcessor& processor) { 16void ClearMixBufferCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
17 memset(processor.mix_buffers.data(), 0, processor.mix_buffers.size_bytes()); 17 memset(processor.mix_buffers.data(), 0, processor.mix_buffers.size_bytes());
18} 18}
19 19
20bool ClearMixBufferCommand::Verify(const ADSP::CommandListProcessor& processor) { 20bool ClearMixBufferCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
21 return true; 21 return true;
22} 22}
23 23
24} // namespace AudioCore::AudioRenderer 24} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/clear_mix.h b/src/audio_core/renderer/command/mix/clear_mix.h
index 956ec0b65..650fa1a8a 100644
--- a/src/audio_core/renderer/command/mix/clear_mix.h
+++ b/src/audio_core/renderer/command/mix/clear_mix.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for a clearing the mix buffers. 18 * AudioRenderer command for a clearing the mix buffers.
18 * Used at the start of each command list. 19 * Used at the start of each command list.
@@ -24,14 +25,14 @@ struct ClearMixBufferCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct ClearMixBufferCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43}; 44};
44 45
45} // namespace AudioCore::AudioRenderer 46} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/copy_mix.cpp b/src/audio_core/renderer/command/mix/copy_mix.cpp
index 1d49f1644..5d386f95a 100644
--- a/src/audio_core/renderer/command/mix/copy_mix.cpp
+++ b/src/audio_core/renderer/command/mix/copy_mix.cpp
@@ -1,18 +1,18 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/mix/copy_mix.h" 5#include "audio_core/renderer/command/mix/copy_mix.h"
6 6
7namespace AudioCore::AudioRenderer { 7namespace AudioCore::Renderer {
8 8
9void CopyMixBufferCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 9void CopyMixBufferCommand::Dump(
10 std::string& string) { 10 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
11 string += fmt::format("CopyMixBufferCommand\n\tinput {:02X} output {:02X}\n", input_index, 11 string += fmt::format("CopyMixBufferCommand\n\tinput {:02X} output {:02X}\n", input_index,
12 output_index); 12 output_index);
13} 13}
14 14
15void CopyMixBufferCommand::Process(const ADSP::CommandListProcessor& processor) { 15void CopyMixBufferCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
16 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count, 16 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count,
17 processor.sample_count)}; 17 processor.sample_count)};
18 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count, 18 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count,
@@ -20,8 +20,8 @@ void CopyMixBufferCommand::Process(const ADSP::CommandListProcessor& processor)
20 std::memcpy(output.data(), input.data(), processor.sample_count * sizeof(s32)); 20 std::memcpy(output.data(), input.data(), processor.sample_count * sizeof(s32));
21} 21}
22 22
23bool CopyMixBufferCommand::Verify(const ADSP::CommandListProcessor& processor) { 23bool CopyMixBufferCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
24 return true; 24 return true;
25} 25}
26 26
27} // namespace AudioCore::AudioRenderer 27} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/copy_mix.h b/src/audio_core/renderer/command/mix/copy_mix.h
index a59007fb6..ae247c3f8 100644
--- a/src/audio_core/renderer/command/mix/copy_mix.h
+++ b/src/audio_core/renderer/command/mix/copy_mix.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for a copying a mix buffer from input to output. 18 * AudioRenderer command for a copying a mix buffer from input to output.
18 */ 19 */
@@ -23,14 +24,14 @@ struct CopyMixBufferCommand : ICommand {
23 * @param processor - The CommandListProcessor processing this command. 24 * @param processor - The CommandListProcessor processing this command.
24 * @param string - The string to print into. 25 * @param string - The string to print into.
25 */ 26 */
26 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 27 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
27 28
28 /** 29 /**
29 * Process this command. 30 * Process this command.
30 * 31 *
31 * @param processor - The CommandListProcessor processing this command. 32 * @param processor - The CommandListProcessor processing this command.
32 */ 33 */
33 void Process(const ADSP::CommandListProcessor& processor) override; 34 void Process(const AudioRenderer::CommandListProcessor& processor) override;
34 35
35 /** 36 /**
36 * Verify this command's data is valid. 37 * Verify this command's data is valid.
@@ -38,7 +39,7 @@ struct CopyMixBufferCommand : ICommand {
38 * @param processor - The CommandListProcessor processing this command. 39 * @param processor - The CommandListProcessor processing this command.
39 * @return True if the command is valid, otherwise false. 40 * @return True if the command is valid, otherwise false.
40 */ 41 */
41 bool Verify(const ADSP::CommandListProcessor& processor) override; 42 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
42 43
43 /// Input mix buffer index 44 /// Input mix buffer index
44 s16 input_index; 45 s16 input_index;
@@ -46,4 +47,4 @@ struct CopyMixBufferCommand : ICommand {
46 s16 output_index; 47 s16 output_index;
47}; 48};
48 49
49} // namespace AudioCore::AudioRenderer 50} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/depop_for_mix_buffers.cpp b/src/audio_core/renderer/command/mix/depop_for_mix_buffers.cpp
index c2bc10061..caedb56b7 100644
--- a/src/audio_core/renderer/command/mix/depop_for_mix_buffers.cpp
+++ b/src/audio_core/renderer/command/mix/depop_for_mix_buffers.cpp
@@ -1,11 +1,11 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
4#include "audio_core/common/common.h" 5#include "audio_core/common/common.h"
5#include "audio_core/renderer/adsp/command_list_processor.h"
6#include "audio_core/renderer/command/mix/depop_for_mix_buffers.h" 6#include "audio_core/renderer/command/mix/depop_for_mix_buffers.h"
7 7
8namespace AudioCore::AudioRenderer { 8namespace AudioCore::Renderer {
9/** 9/**
10 * Apply depopping. Add the depopped sample to each incoming new sample, decaying it each time 10 * Apply depopping. Add the depopped sample to each incoming new sample, decaying it each time
11 * according to decay. 11 * according to decay.
@@ -36,13 +36,13 @@ static s32 ApplyDepopMix(std::span<s32> output, const s32 depop_sample,
36 } 36 }
37} 37}
38 38
39void DepopForMixBuffersCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 39void DepopForMixBuffersCommand::Dump(
40 std::string& string) { 40 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
41 string += fmt::format("DepopForMixBuffersCommand\n\tinput {:02X} count {} decay {}\n", input, 41 string += fmt::format("DepopForMixBuffersCommand\n\tinput {:02X} count {} decay {}\n", input,
42 count, decay.to_float()); 42 count, decay.to_float());
43} 43}
44 44
45void DepopForMixBuffersCommand::Process(const ADSP::CommandListProcessor& processor) { 45void DepopForMixBuffersCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
46 auto end_index{std::min(processor.buffer_count, input + count)}; 46 auto end_index{std::min(processor.buffer_count, input + count)};
47 std::span<s32> depop_buff{reinterpret_cast<s32*>(depop_buffer), end_index}; 47 std::span<s32> depop_buff{reinterpret_cast<s32*>(depop_buffer), end_index};
48 48
@@ -57,8 +57,8 @@ void DepopForMixBuffersCommand::Process(const ADSP::CommandListProcessor& proces
57 } 57 }
58} 58}
59 59
60bool DepopForMixBuffersCommand::Verify(const ADSP::CommandListProcessor& processor) { 60bool DepopForMixBuffersCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
61 return true; 61 return true;
62} 62}
63 63
64} // namespace AudioCore::AudioRenderer 64} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/depop_for_mix_buffers.h b/src/audio_core/renderer/command/mix/depop_for_mix_buffers.h
index e7268ff27..699d38988 100644
--- a/src/audio_core/renderer/command/mix/depop_for_mix_buffers.h
+++ b/src/audio_core/renderer/command/mix/depop_for_mix_buffers.h
@@ -9,11 +9,12 @@
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/fixed_point.h" 10#include "common/fixed_point.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::ADSP::AudioRenderer {
13namespace ADSP {
14class CommandListProcessor; 13class CommandListProcessor;
15} 14}
16 15
16namespace AudioCore::Renderer {
17
17/** 18/**
18 * AudioRenderer command for depopping a mix buffer. 19 * AudioRenderer command for depopping a mix buffer.
19 * Adds a cumulation of previous samples to the current mix buffer with a decay. 20 * Adds a cumulation of previous samples to the current mix buffer with a decay.
@@ -25,14 +26,14 @@ struct DepopForMixBuffersCommand : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,7 +41,7 @@ struct DepopForMixBuffersCommand : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Starting input mix buffer index 46 /// Starting input mix buffer index
46 u32 input; 47 u32 input;
@@ -52,4 +53,4 @@ struct DepopForMixBuffersCommand : ICommand {
52 CpuAddr depop_buffer; 53 CpuAddr depop_buffer;
53}; 54};
54 55
55} // namespace AudioCore::AudioRenderer 56} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/depop_prepare.cpp b/src/audio_core/renderer/command/mix/depop_prepare.cpp
index 69bb78ccc..2faf4681a 100644
--- a/src/audio_core/renderer/command/mix/depop_prepare.cpp
+++ b/src/audio_core/renderer/command/mix/depop_prepare.cpp
@@ -1,15 +1,15 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/mix/depop_prepare.h" 5#include "audio_core/renderer/command/mix/depop_prepare.h"
6#include "audio_core/renderer/voice/voice_state.h" 6#include "audio_core/renderer/voice/voice_state.h"
7#include "common/fixed_point.h" 7#include "common/fixed_point.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10 10
11void DepopPrepareCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 11void DepopPrepareCommand::Dump(
12 std::string& string) { 12 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
13 string += fmt::format("DepopPrepareCommand\n\tinputs: "); 13 string += fmt::format("DepopPrepareCommand\n\tinputs: ");
14 for (u32 i = 0; i < buffer_count; i++) { 14 for (u32 i = 0; i < buffer_count; i++) {
15 string += fmt::format("{:02X}, ", inputs[i]); 15 string += fmt::format("{:02X}, ", inputs[i]);
@@ -17,7 +17,7 @@ void DepopPrepareCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor
17 string += "\n"; 17 string += "\n";
18} 18}
19 19
20void DepopPrepareCommand::Process(const ADSP::CommandListProcessor& processor) { 20void DepopPrepareCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
21 auto samples{reinterpret_cast<s32*>(previous_samples)}; 21 auto samples{reinterpret_cast<s32*>(previous_samples)};
22 auto buffer{reinterpret_cast<s32*>(depop_buffer)}; 22 auto buffer{reinterpret_cast<s32*>(depop_buffer)};
23 23
@@ -29,8 +29,8 @@ void DepopPrepareCommand::Process(const ADSP::CommandListProcessor& processor) {
29 } 29 }
30} 30}
31 31
32bool DepopPrepareCommand::Verify(const ADSP::CommandListProcessor& processor) { 32bool DepopPrepareCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
33 return true; 33 return true;
34} 34}
35 35
36} // namespace AudioCore::AudioRenderer 36} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/depop_prepare.h b/src/audio_core/renderer/command/mix/depop_prepare.h
index a5465da9a..161a94461 100644
--- a/src/audio_core/renderer/command/mix/depop_prepare.h
+++ b/src/audio_core/renderer/command/mix/depop_prepare.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for preparing depop. 18 * AudioRenderer command for preparing depop.
18 * Adds the previusly output last samples to the depop buffer. 19 * Adds the previusly output last samples to the depop buffer.
@@ -24,14 +25,14 @@ struct DepopPrepareCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct DepopPrepareCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43 44
44 /// Depop buffer offset for each mix buffer 45 /// Depop buffer offset for each mix buffer
45 std::array<s16, MaxMixBuffers> inputs; 46 std::array<s16, MaxMixBuffers> inputs;
@@ -51,4 +52,4 @@ struct DepopPrepareCommand : ICommand {
51 CpuAddr depop_buffer; 52 CpuAddr depop_buffer;
52}; 53};
53 54
54} // namespace AudioCore::AudioRenderer 55} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/mix.cpp b/src/audio_core/renderer/command/mix/mix.cpp
index 8ecf9b05a..8bd689b88 100644
--- a/src/audio_core/renderer/command/mix/mix.cpp
+++ b/src/audio_core/renderer/command/mix/mix.cpp
@@ -5,11 +5,11 @@
5#include <limits> 5#include <limits>
6#include <span> 6#include <span>
7 7
8#include "audio_core/renderer/adsp/command_list_processor.h" 8#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
9#include "audio_core/renderer/command/mix/mix.h" 9#include "audio_core/renderer/command/mix/mix.h"
10#include "common/fixed_point.h" 10#include "common/fixed_point.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::Renderer {
13/** 13/**
14 * Mix input mix buffer into output mix buffer, with volume applied to the input. 14 * Mix input mix buffer into output mix buffer, with volume applied to the input.
15 * 15 *
@@ -28,7 +28,7 @@ static void ApplyMix(std::span<s32> output, std::span<const s32> input, const f3
28 } 28 }
29} 29}
30 30
31void MixCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 31void MixCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
32 std::string& string) { 32 std::string& string) {
33 string += fmt::format("MixCommand"); 33 string += fmt::format("MixCommand");
34 string += fmt::format("\n\tinput {:02X}", input_index); 34 string += fmt::format("\n\tinput {:02X}", input_index);
@@ -37,7 +37,7 @@ void MixCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& process
37 string += "\n"; 37 string += "\n";
38} 38}
39 39
40void MixCommand::Process(const ADSP::CommandListProcessor& processor) { 40void MixCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
41 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count, 41 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count,
42 processor.sample_count)}; 42 processor.sample_count)};
43 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count, 43 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count,
@@ -63,8 +63,8 @@ void MixCommand::Process(const ADSP::CommandListProcessor& processor) {
63 } 63 }
64} 64}
65 65
66bool MixCommand::Verify(const ADSP::CommandListProcessor& processor) { 66bool MixCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
67 return true; 67 return true;
68} 68}
69 69
70} // namespace AudioCore::AudioRenderer 70} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/mix.h b/src/audio_core/renderer/command/mix/mix.h
index 0201cf171..64c812382 100644
--- a/src/audio_core/renderer/command/mix/mix.h
+++ b/src/audio_core/renderer/command/mix/mix.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for mixing an input mix buffer to an output mix buffer, with a volume 18 * AudioRenderer command for mixing an input mix buffer to an output mix buffer, with a volume
18 * applied to the input. 19 * applied to the input.
@@ -24,14 +25,14 @@ struct MixCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct MixCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43 44
44 /// Fixed point precision 45 /// Fixed point precision
45 u8 precision; 46 u8 precision;
@@ -51,4 +52,4 @@ struct MixCommand : ICommand {
51 f32 volume; 52 f32 volume;
52}; 53};
53 54
54} // namespace AudioCore::AudioRenderer 55} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/mix_ramp.cpp b/src/audio_core/renderer/command/mix/mix_ramp.cpp
index d67123cd8..2f6500da5 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp.cpp
+++ b/src/audio_core/renderer/command/mix/mix_ramp.cpp
@@ -1,12 +1,12 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/mix/mix_ramp.h" 5#include "audio_core/renderer/command/mix/mix_ramp.h"
6#include "common/fixed_point.h" 6#include "common/fixed_point.h"
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10 10
11template <size_t Q> 11template <size_t Q>
12s32 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_,
@@ -33,7 +33,8 @@ s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, const f32 vo
33template s32 ApplyMixRamp<15>(std::span<s32>, std::span<const s32>, f32, f32, u32); 33template s32 ApplyMixRamp<15>(std::span<s32>, std::span<const s32>, f32, f32, u32);
34template s32 ApplyMixRamp<23>(std::span<s32>, std::span<const s32>, f32, f32, u32); 34template s32 ApplyMixRamp<23>(std::span<s32>, std::span<const s32>, f32, f32, u32);
35 35
36void MixRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::string& string) { 36void MixRampCommand::Dump(const AudioRenderer::CommandListProcessor& processor,
37 std::string& string) {
37 const auto ramp{(volume - prev_volume) / static_cast<f32>(processor.sample_count)}; 38 const auto ramp{(volume - prev_volume) / static_cast<f32>(processor.sample_count)};
38 string += fmt::format("MixRampCommand"); 39 string += fmt::format("MixRampCommand");
39 string += fmt::format("\n\tinput {:02X}", input_index); 40 string += fmt::format("\n\tinput {:02X}", input_index);
@@ -44,7 +45,7 @@ void MixRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::stri
44 string += "\n"; 45 string += "\n";
45} 46}
46 47
47void MixRampCommand::Process(const ADSP::CommandListProcessor& processor) { 48void MixRampCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
48 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count, 49 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count,
49 processor.sample_count)}; 50 processor.sample_count)};
50 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count, 51 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count,
@@ -75,8 +76,8 @@ void MixRampCommand::Process(const ADSP::CommandListProcessor& processor) {
75 } 76 }
76} 77}
77 78
78bool MixRampCommand::Verify(const ADSP::CommandListProcessor& processor) { 79bool MixRampCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
79 return true; 80 return true;
80} 81}
81 82
82} // namespace AudioCore::AudioRenderer 83} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/mix_ramp.h b/src/audio_core/renderer/command/mix/mix_ramp.h
index 52f74a273..92209b53a 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp.h
+++ b/src/audio_core/renderer/command/mix/mix_ramp.h
@@ -9,11 +9,12 @@
9#include "audio_core/renderer/command/icommand.h" 9#include "audio_core/renderer/command/icommand.h"
10#include "common/common_types.h" 10#include "common/common_types.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::ADSP::AudioRenderer {
13namespace ADSP {
14class CommandListProcessor; 13class CommandListProcessor;
15} 14}
16 15
16namespace AudioCore::Renderer {
17
17/** 18/**
18 * AudioRenderer command for mixing an input mix buffer to an output mix buffer, with a volume 19 * AudioRenderer command for mixing an input mix buffer to an output mix buffer, with a volume
19 * applied to the input, and volume ramping to smooth out the transition. 20 * applied to the input, and volume ramping to smooth out the transition.
@@ -25,14 +26,14 @@ struct MixRampCommand : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,7 +41,7 @@ struct MixRampCommand : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Fixed point precision 46 /// Fixed point precision
46 u8 precision; 47 u8 precision;
@@ -70,4 +71,4 @@ template <size_t Q>
70s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, f32 volume_, f32 ramp_, 71s32 ApplyMixRamp(std::span<s32> output, std::span<const s32> input, f32 volume_, f32 ramp_,
71 u32 sample_count); 72 u32 sample_count);
72 73
73} // namespace AudioCore::AudioRenderer 74} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/mix_ramp_grouped.cpp b/src/audio_core/renderer/command/mix/mix_ramp_grouped.cpp
index 43dbef9fc..64138a9bf 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp_grouped.cpp
+++ b/src/audio_core/renderer/command/mix/mix_ramp_grouped.cpp
@@ -1,13 +1,14 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/mix/mix_ramp.h" 5#include "audio_core/renderer/command/mix/mix_ramp.h"
6#include "audio_core/renderer/command/mix/mix_ramp_grouped.h" 6#include "audio_core/renderer/command/mix/mix_ramp_grouped.h"
7 7
8namespace AudioCore::AudioRenderer { 8namespace AudioCore::Renderer {
9 9
10void MixRampGroupedCommand::Dump(const ADSP::CommandListProcessor& processor, std::string& string) { 10void MixRampGroupedCommand::Dump(const AudioRenderer::CommandListProcessor& processor,
11 std::string& string) {
11 string += "MixRampGroupedCommand"; 12 string += "MixRampGroupedCommand";
12 for (u32 i = 0; i < buffer_count; i++) { 13 for (u32 i = 0; i < buffer_count; i++) {
13 string += fmt::format("\n\t{}", i); 14 string += fmt::format("\n\t{}", i);
@@ -21,7 +22,7 @@ void MixRampGroupedCommand::Dump(const ADSP::CommandListProcessor& processor, st
21 } 22 }
22} 23}
23 24
24void MixRampGroupedCommand::Process(const ADSP::CommandListProcessor& processor) { 25void MixRampGroupedCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
25 std::span<s32> prev_samples = {reinterpret_cast<s32*>(previous_samples), MaxMixBuffers}; 26 std::span<s32> prev_samples = {reinterpret_cast<s32*>(previous_samples), MaxMixBuffers};
26 27
27 for (u32 i = 0; i < buffer_count; i++) { 28 for (u32 i = 0; i < buffer_count; i++) {
@@ -58,8 +59,8 @@ void MixRampGroupedCommand::Process(const ADSP::CommandListProcessor& processor)
58 } 59 }
59} 60}
60 61
61bool MixRampGroupedCommand::Verify(const ADSP::CommandListProcessor& processor) { 62bool MixRampGroupedCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
62 return true; 63 return true;
63} 64}
64 65
65} // namespace AudioCore::AudioRenderer 66} // namespace AudioCore::Renderer
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 3b0ce67ef..9621e42a3 100644
--- a/src/audio_core/renderer/command/mix/mix_ramp_grouped.h
+++ b/src/audio_core/renderer/command/mix/mix_ramp_grouped.h
@@ -9,11 +9,12 @@
9#include "audio_core/renderer/command/icommand.h" 9#include "audio_core/renderer/command/icommand.h"
10#include "common/common_types.h" 10#include "common/common_types.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::ADSP::AudioRenderer {
13namespace ADSP {
14class CommandListProcessor; 13class CommandListProcessor;
15} 14}
16 15
16namespace AudioCore::Renderer {
17
17/** 18/**
18 * AudioRenderer command for mixing multiple input mix buffers to multiple output mix buffers, with 19 * AudioRenderer command for mixing multiple input mix buffers to multiple output mix buffers, with
19 * a volume applied to the input, and volume ramping to smooth out the transition. 20 * a volume applied to the input, and volume ramping to smooth out the transition.
@@ -25,14 +26,14 @@ struct MixRampGroupedCommand : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,7 +41,7 @@ struct MixRampGroupedCommand : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Fixed point precision 46 /// Fixed point precision
46 u8 precision; 47 u8 precision;
@@ -58,4 +59,4 @@ struct MixRampGroupedCommand : ICommand {
58 CpuAddr previous_samples; 59 CpuAddr previous_samples;
59}; 60};
60 61
61} // namespace AudioCore::AudioRenderer 62} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/volume.cpp b/src/audio_core/renderer/command/mix/volume.cpp
index b045fb062..92baf6cc3 100644
--- a/src/audio_core/renderer/command/mix/volume.cpp
+++ b/src/audio_core/renderer/command/mix/volume.cpp
@@ -1,12 +1,12 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/mix/volume.h" 5#include "audio_core/renderer/command/mix/volume.h"
6#include "common/fixed_point.h" 6#include "common/fixed_point.h"
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10/** 10/**
11 * Apply volume to the input mix buffer, saving to the output buffer. 11 * Apply volume to the input mix buffer, saving to the output buffer.
12 * 12 *
@@ -29,7 +29,7 @@ static void ApplyUniformGain(std::span<s32> output, std::span<const s32> input,
29 } 29 }
30} 30}
31 31
32void VolumeCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 32void VolumeCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
33 std::string& string) { 33 std::string& string) {
34 string += fmt::format("VolumeCommand"); 34 string += fmt::format("VolumeCommand");
35 string += fmt::format("\n\tinput {:02X}", input_index); 35 string += fmt::format("\n\tinput {:02X}", input_index);
@@ -38,7 +38,7 @@ void VolumeCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& proc
38 string += "\n"; 38 string += "\n";
39} 39}
40 40
41void VolumeCommand::Process(const ADSP::CommandListProcessor& processor) { 41void VolumeCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
42 // If input and output buffers are the same, and the volume is 1.0f, this won't do 42 // If input and output buffers are the same, and the volume is 1.0f, this won't do
43 // anything, so just skip. 43 // anything, so just skip.
44 if (input_index == output_index && volume == 1.0f) { 44 if (input_index == output_index && volume == 1.0f) {
@@ -65,8 +65,8 @@ void VolumeCommand::Process(const ADSP::CommandListProcessor& processor) {
65 } 65 }
66} 66}
67 67
68bool VolumeCommand::Verify(const ADSP::CommandListProcessor& processor) { 68bool VolumeCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
69 return true; 69 return true;
70} 70}
71 71
72} // namespace AudioCore::AudioRenderer 72} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/volume.h b/src/audio_core/renderer/command/mix/volume.h
index 6ae9fb794..fbb8156ca 100644
--- a/src/audio_core/renderer/command/mix/volume.h
+++ b/src/audio_core/renderer/command/mix/volume.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for applying volume to a mix buffer. 18 * AudioRenderer command for applying volume to a mix buffer.
18 */ 19 */
@@ -23,14 +24,14 @@ struct VolumeCommand : ICommand {
23 * @param processor - The CommandListProcessor processing this command. 24 * @param processor - The CommandListProcessor processing this command.
24 * @param string - The string to print into. 25 * @param string - The string to print into.
25 */ 26 */
26 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 27 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
27 28
28 /** 29 /**
29 * Process this command. 30 * Process this command.
30 * 31 *
31 * @param processor - The CommandListProcessor processing this command. 32 * @param processor - The CommandListProcessor processing this command.
32 */ 33 */
33 void Process(const ADSP::CommandListProcessor& processor) override; 34 void Process(const AudioRenderer::CommandListProcessor& processor) override;
34 35
35 /** 36 /**
36 * Verify this command's data is valid. 37 * Verify this command's data is valid.
@@ -38,7 +39,7 @@ struct VolumeCommand : ICommand {
38 * @param processor - The CommandListProcessor processing this command. 39 * @param processor - The CommandListProcessor processing this command.
39 * @return True if the command is valid, otherwise false. 40 * @return True if the command is valid, otherwise false.
40 */ 41 */
41 bool Verify(const ADSP::CommandListProcessor& processor) override; 42 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
42 43
43 /// Fixed point precision 44 /// Fixed point precision
44 u8 precision; 45 u8 precision;
@@ -50,4 +51,4 @@ struct VolumeCommand : ICommand {
50 f32 volume; 51 f32 volume;
51}; 52};
52 53
53} // namespace AudioCore::AudioRenderer 54} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/volume_ramp.cpp b/src/audio_core/renderer/command/mix/volume_ramp.cpp
index 424307148..fdc751957 100644
--- a/src/audio_core/renderer/command/mix/volume_ramp.cpp
+++ b/src/audio_core/renderer/command/mix/volume_ramp.cpp
@@ -1,11 +1,11 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/mix/volume_ramp.h" 5#include "audio_core/renderer/command/mix/volume_ramp.h"
6#include "common/fixed_point.h" 6#include "common/fixed_point.h"
7 7
8namespace AudioCore::AudioRenderer { 8namespace AudioCore::Renderer {
9/** 9/**
10 * Apply volume with ramping to the input mix buffer, saving to the output buffer. 10 * Apply volume with ramping to the input mix buffer, saving to the output buffer.
11 * 11 *
@@ -38,7 +38,8 @@ static void ApplyLinearEnvelopeGain(std::span<s32> output, std::span<const s32>
38 } 38 }
39} 39}
40 40
41void VolumeRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::string& string) { 41void VolumeRampCommand::Dump(const AudioRenderer::CommandListProcessor& processor,
42 std::string& string) {
42 const auto ramp{(volume - prev_volume) / static_cast<f32>(processor.sample_count)}; 43 const auto ramp{(volume - prev_volume) / static_cast<f32>(processor.sample_count)};
43 string += fmt::format("VolumeRampCommand"); 44 string += fmt::format("VolumeRampCommand");
44 string += fmt::format("\n\tinput {:02X}", input_index); 45 string += fmt::format("\n\tinput {:02X}", input_index);
@@ -49,7 +50,7 @@ void VolumeRampCommand::Dump(const ADSP::CommandListProcessor& processor, std::s
49 string += "\n"; 50 string += "\n";
50} 51}
51 52
52void VolumeRampCommand::Process(const ADSP::CommandListProcessor& processor) { 53void VolumeRampCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
53 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count, 54 auto output{processor.mix_buffers.subspan(output_index * processor.sample_count,
54 processor.sample_count)}; 55 processor.sample_count)};
55 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count, 56 auto input{processor.mix_buffers.subspan(input_index * processor.sample_count,
@@ -77,8 +78,8 @@ void VolumeRampCommand::Process(const ADSP::CommandListProcessor& processor) {
77 } 78 }
78} 79}
79 80
80bool VolumeRampCommand::Verify(const ADSP::CommandListProcessor& processor) { 81bool VolumeRampCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
81 return true; 82 return true;
82} 83}
83 84
84} // namespace AudioCore::AudioRenderer 85} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/mix/volume_ramp.h b/src/audio_core/renderer/command/mix/volume_ramp.h
index 77b61547e..d9794fb95 100644
--- a/src/audio_core/renderer/command/mix/volume_ramp.h
+++ b/src/audio_core/renderer/command/mix/volume_ramp.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for applying volume to a mix buffer, with ramping for the volume to smooth 18 * AudioRenderer command for applying volume to a mix buffer, with ramping for the volume to smooth
18 * out the transition. 19 * out the transition.
@@ -24,14 +25,14 @@ struct VolumeRampCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct VolumeRampCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43 44
44 /// Fixed point precision 45 /// Fixed point precision
45 u8 precision; 46 u8 precision;
@@ -53,4 +54,4 @@ struct VolumeRampCommand : ICommand {
53 f32 volume; 54 f32 volume;
54}; 55};
55 56
56} // namespace AudioCore::AudioRenderer 57} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/performance/performance.cpp b/src/audio_core/renderer/command/performance/performance.cpp
index 4a881547f..f0cfcc9fd 100644
--- a/src/audio_core/renderer/command/performance/performance.cpp
+++ b/src/audio_core/renderer/command/performance/performance.cpp
@@ -1,25 +1,25 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/performance/performance.h" 5#include "audio_core/renderer/command/performance/performance.h"
6#include "core/core.h" 6#include "core/core.h"
7#include "core/core_timing.h" 7#include "core/core_timing.h"
8 8
9namespace AudioCore::AudioRenderer { 9namespace AudioCore::Renderer {
10 10
11void PerformanceCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 11void PerformanceCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
12 std::string& string) { 12 std::string& string) {
13 string += fmt::format("PerformanceCommand\n\tstate {}\n", static_cast<u32>(state)); 13 string += fmt::format("PerformanceCommand\n\tstate {}\n", static_cast<u32>(state));
14} 14}
15 15
16void PerformanceCommand::Process(const ADSP::CommandListProcessor& processor) { 16void PerformanceCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
17 auto base{entry_address.translated_address}; 17 auto base{entry_address.translated_address};
18 if (state == PerformanceState::Start) { 18 if (state == PerformanceState::Start) {
19 auto start_time_ptr{reinterpret_cast<u32*>(base + entry_address.entry_start_time_offset)}; 19 auto start_time_ptr{reinterpret_cast<u32*>(base + entry_address.entry_start_time_offset)};
20 *start_time_ptr = 20 *start_time_ptr =
21 static_cast<u32>(processor.system->CoreTiming().GetClockTicks() - processor.start_time - 21 static_cast<u32>(processor.system->CoreTiming().GetGlobalTimeUs().count() -
22 processor.current_processing_time); 22 processor.start_time - processor.current_processing_time);
23 } else if (state == PerformanceState::Stop) { 23 } else if (state == PerformanceState::Stop) {
24 auto processed_time_ptr{ 24 auto processed_time_ptr{
25 reinterpret_cast<u32*>(base + entry_address.entry_processed_time_offset)}; 25 reinterpret_cast<u32*>(base + entry_address.entry_processed_time_offset)};
@@ -27,14 +27,14 @@ void PerformanceCommand::Process(const ADSP::CommandListProcessor& processor) {
27 reinterpret_cast<u32*>(base + entry_address.header_entry_count_offset)}; 27 reinterpret_cast<u32*>(base + entry_address.header_entry_count_offset)};
28 28
29 *processed_time_ptr = 29 *processed_time_ptr =
30 static_cast<u32>(processor.system->CoreTiming().GetClockTicks() - processor.start_time - 30 static_cast<u32>(processor.system->CoreTiming().GetGlobalTimeUs().count() -
31 processor.current_processing_time); 31 processor.start_time - processor.current_processing_time);
32 (*entry_count_ptr)++; 32 (*entry_count_ptr)++;
33 } 33 }
34} 34}
35 35
36bool PerformanceCommand::Verify(const ADSP::CommandListProcessor& processor) { 36bool PerformanceCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
37 return true; 37 return true;
38} 38}
39 39
40} // namespace AudioCore::AudioRenderer 40} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/performance/performance.h b/src/audio_core/renderer/command/performance/performance.h
index 11a7d6c08..522e51e34 100644
--- a/src/audio_core/renderer/command/performance/performance.h
+++ b/src/audio_core/renderer/command/performance/performance.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/performance/performance_manager.h" 10#include "audio_core/renderer/performance/performance_manager.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for writing AudioRenderer performance metrics back to the sysmodule. 20 * AudioRenderer command for writing AudioRenderer performance metrics back to the sysmodule.
20 */ 21 */
@@ -25,14 +26,14 @@ struct PerformanceCommand : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,7 +41,7 @@ struct PerformanceCommand : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// State of the performance 46 /// State of the performance
46 PerformanceState state; 47 PerformanceState state;
@@ -48,4 +49,4 @@ struct PerformanceCommand : ICommand {
48 PerformanceEntryAddresses entry_address; 49 PerformanceEntryAddresses entry_address;
49}; 50};
50 51
51} // namespace AudioCore::AudioRenderer 52} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.cpp b/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.cpp
index 1fd90308a..f9b289887 100644
--- a/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.cpp
+++ b/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.cpp
@@ -1,13 +1,13 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project 1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "audio_core/renderer/adsp/command_list_processor.h" 4#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
5#include "audio_core/renderer/command/resample/downmix_6ch_to_2ch.h" 5#include "audio_core/renderer/command/resample/downmix_6ch_to_2ch.h"
6 6
7namespace AudioCore::AudioRenderer { 7namespace AudioCore::Renderer {
8 8
9void DownMix6chTo2chCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 9void DownMix6chTo2chCommand::Dump(
10 std::string& string) { 10 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
11 string += fmt::format("DownMix6chTo2chCommand\n\tinputs: "); 11 string += fmt::format("DownMix6chTo2chCommand\n\tinputs: ");
12 for (u32 i = 0; i < MaxChannels; i++) { 12 for (u32 i = 0; i < MaxChannels; i++) {
13 string += fmt::format("{:02X}, ", inputs[i]); 13 string += fmt::format("{:02X}, ", inputs[i]);
@@ -19,7 +19,7 @@ void DownMix6chTo2chCommand::Dump([[maybe_unused]] const ADSP::CommandListProces
19 string += "\n"; 19 string += "\n";
20} 20}
21 21
22void DownMix6chTo2chCommand::Process(const ADSP::CommandListProcessor& processor) { 22void DownMix6chTo2chCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
23 auto in_front_left{ 23 auto in_front_left{
24 processor.mix_buffers.subspan(inputs[0] * processor.sample_count, processor.sample_count)}; 24 processor.mix_buffers.subspan(inputs[0] * processor.sample_count, processor.sample_count)};
25 auto in_front_right{ 25 auto in_front_right{
@@ -67,8 +67,8 @@ void DownMix6chTo2chCommand::Process(const ADSP::CommandListProcessor& processor
67 std::memset(out_back_right.data(), 0, out_back_right.size_bytes()); 67 std::memset(out_back_right.data(), 0, out_back_right.size_bytes());
68} 68}
69 69
70bool DownMix6chTo2chCommand::Verify(const ADSP::CommandListProcessor& processor) { 70bool DownMix6chTo2chCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
71 return true; 71 return true;
72} 72}
73 73
74} // namespace AudioCore::AudioRenderer 74} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.h b/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.h
index dc133a73b..96cbc5506 100644
--- a/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.h
+++ b/src/audio_core/renderer/command/resample/downmix_6ch_to_2ch.h
@@ -9,11 +9,12 @@
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/fixed_point.h" 10#include "common/fixed_point.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::ADSP::AudioRenderer {
13namespace ADSP {
14class CommandListProcessor; 13class CommandListProcessor;
15} 14}
16 15
16namespace AudioCore::Renderer {
17
17/** 18/**
18 * AudioRenderer command for downmixing 6 channels to 2. 19 * AudioRenderer command for downmixing 6 channels to 2.
19 * Channel layout (SMPTE): 20 * Channel layout (SMPTE):
@@ -31,14 +32,14 @@ struct DownMix6chTo2chCommand : ICommand {
31 * @param processor - The CommandListProcessor processing this command. 32 * @param processor - The CommandListProcessor processing this command.
32 * @param string - The string to print into. 33 * @param string - The string to print into.
33 */ 34 */
34 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 35 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
35 36
36 /** 37 /**
37 * Process this command. 38 * Process this command.
38 * 39 *
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 */ 41 */
41 void Process(const ADSP::CommandListProcessor& processor) override; 42 void Process(const AudioRenderer::CommandListProcessor& processor) override;
42 43
43 /** 44 /**
44 * Verify this command's data is valid. 45 * Verify this command's data is valid.
@@ -46,7 +47,7 @@ struct DownMix6chTo2chCommand : ICommand {
46 * @param processor - The CommandListProcessor processing this command. 47 * @param processor - The CommandListProcessor processing this command.
47 * @return True if the command is valid, otherwise false. 48 * @return True if the command is valid, otherwise false.
48 */ 49 */
49 bool Verify(const ADSP::CommandListProcessor& processor) override; 50 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
50 51
51 /// Input mix buffer offsets for each channel 52 /// Input mix buffer offsets for each channel
52 std::array<s16, MaxChannels> inputs; 53 std::array<s16, MaxChannels> inputs;
@@ -56,4 +57,4 @@ struct DownMix6chTo2chCommand : ICommand {
56 std::array<Common::FixedPoint<48, 16>, 4> down_mix_coeff; 57 std::array<Common::FixedPoint<48, 16>, 4> down_mix_coeff;
57}; 58};
58 59
59} // namespace AudioCore::AudioRenderer 60} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/resample/resample.cpp b/src/audio_core/renderer/command/resample/resample.cpp
index 070c9d2b8..51f4ba39e 100644
--- a/src/audio_core/renderer/command/resample/resample.cpp
+++ b/src/audio_core/renderer/command/resample/resample.cpp
@@ -3,7 +3,7 @@
3 3
4#include "audio_core/renderer/command/resample/resample.h" 4#include "audio_core/renderer/command/resample/resample.h"
5 5
6namespace AudioCore::AudioRenderer { 6namespace AudioCore::Renderer {
7 7
8static void ResampleLowQuality(std::span<s32> output, std::span<const s16> input, 8static void ResampleLowQuality(std::span<s32> output, std::span<const s16> input,
9 const Common::FixedPoint<49, 15>& sample_rate_ratio, 9 const Common::FixedPoint<49, 15>& sample_rate_ratio,
@@ -880,4 +880,4 @@ void Resample(std::span<s32> output, std::span<const s16> input,
880 } 880 }
881} 881}
882 882
883} // namespace AudioCore::AudioRenderer 883} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/resample/resample.h b/src/audio_core/renderer/command/resample/resample.h
index ba9209b82..134aff0c9 100644
--- a/src/audio_core/renderer/command/resample/resample.h
+++ b/src/audio_core/renderer/command/resample/resample.h
@@ -9,7 +9,7 @@
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/fixed_point.h" 10#include "common/fixed_point.h"
11 11
12namespace AudioCore::AudioRenderer { 12namespace AudioCore::Renderer {
13/** 13/**
14 * Resample an input buffer into an output buffer, according to the sample_rate_ratio. 14 * Resample an input buffer into an output buffer, according to the sample_rate_ratio.
15 * 15 *
@@ -26,4 +26,4 @@ void Resample(std::span<s32> output, std::span<const s16> input,
26 const Common::FixedPoint<49, 15>& sample_rate_ratio, 26 const Common::FixedPoint<49, 15>& sample_rate_ratio,
27 Common::FixedPoint<49, 15>& fraction, u32 samples_to_write, SrcQuality src_quality); 27 Common::FixedPoint<49, 15>& fraction, u32 samples_to_write, SrcQuality src_quality);
28 28
29} // namespace AudioCore::AudioRenderer 29} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/resample/upsample.cpp b/src/audio_core/renderer/command/resample/upsample.cpp
index 86ddee1a4..691d70390 100644
--- a/src/audio_core/renderer/command/resample/upsample.cpp
+++ b/src/audio_core/renderer/command/resample/upsample.cpp
@@ -3,11 +3,11 @@
3 3
4#include <array> 4#include <array>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/resample/upsample.h" 7#include "audio_core/renderer/command/resample/upsample.h"
8#include "audio_core/renderer/upsampler/upsampler_info.h" 8#include "audio_core/renderer/upsampler/upsampler_info.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11/** 11/**
12 * Upsampling impl. Input must be 8K, 16K or 32K, output is 48K. 12 * Upsampling impl. Input must be 8K, 16K or 32K, output is 48K.
13 * 13 *
@@ -198,7 +198,7 @@ static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input,
198 } 198 }
199} 199}
200 200
201auto UpsampleCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 201auto UpsampleCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
202 std::string& string) -> void { 202 std::string& string) -> void {
203 string += fmt::format("UpsampleCommand\n\tsource_sample_count {} source_sample_rate {}", 203 string += fmt::format("UpsampleCommand\n\tsource_sample_count {} source_sample_rate {}",
204 source_sample_count, source_sample_rate); 204 source_sample_count, source_sample_rate);
@@ -213,7 +213,7 @@ auto UpsampleCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& pr
213 string += "\n"; 213 string += "\n";
214} 214}
215 215
216void UpsampleCommand::Process(const ADSP::CommandListProcessor& processor) { 216void UpsampleCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
217 const auto info{reinterpret_cast<UpsamplerInfo*>(upsampler_info)}; 217 const auto info{reinterpret_cast<UpsamplerInfo*>(upsampler_info)};
218 const auto input_count{std::min(info->input_count, buffer_count)}; 218 const auto input_count{std::min(info->input_count, buffer_count)};
219 const std::span<const s16> inputs_{reinterpret_cast<const s16*>(inputs), input_count}; 219 const std::span<const s16> inputs_{reinterpret_cast<const s16*>(inputs), input_count};
@@ -234,8 +234,8 @@ void UpsampleCommand::Process(const ADSP::CommandListProcessor& processor) {
234 } 234 }
235} 235}
236 236
237bool UpsampleCommand::Verify(const ADSP::CommandListProcessor& processor) { 237bool UpsampleCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
238 return true; 238 return true;
239} 239}
240 240
241} // namespace AudioCore::AudioRenderer 241} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/resample/upsample.h b/src/audio_core/renderer/command/resample/upsample.h
index bfc94e8af..877271ba9 100644
--- a/src/audio_core/renderer/command/resample/upsample.h
+++ b/src/audio_core/renderer/command/resample/upsample.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for upsampling a mix buffer to 48Khz. 18 * AudioRenderer command for upsampling a mix buffer to 48Khz.
18 * Input must be 8Khz, 16Khz or 32Khz, and output will be 48Khz. 19 * Input must be 8Khz, 16Khz or 32Khz, and output will be 48Khz.
@@ -24,14 +25,14 @@ struct UpsampleCommand : ICommand {
24 * @param processor - The CommandListProcessor processing this command. 25 * @param processor - The CommandListProcessor processing this command.
25 * @param string - The string to print into. 26 * @param string - The string to print into.
26 */ 27 */
27 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 28 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
28 29
29 /** 30 /**
30 * Process this command. 31 * Process this command.
31 * 32 *
32 * @param processor - The CommandListProcessor processing this command. 33 * @param processor - The CommandListProcessor processing this command.
33 */ 34 */
34 void Process(const ADSP::CommandListProcessor& processor) override; 35 void Process(const AudioRenderer::CommandListProcessor& processor) override;
35 36
36 /** 37 /**
37 * Verify this command's data is valid. 38 * Verify this command's data is valid.
@@ -39,7 +40,7 @@ struct UpsampleCommand : ICommand {
39 * @param processor - The CommandListProcessor processing this command. 40 * @param processor - The CommandListProcessor processing this command.
40 * @return True if the command is valid, otherwise false. 41 * @return True if the command is valid, otherwise false.
41 */ 42 */
42 bool Verify(const ADSP::CommandListProcessor& processor) override; 43 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
43 44
44 /// Pointer to the output samples buffer. 45 /// Pointer to the output samples buffer.
45 CpuAddr samples_buffer; 46 CpuAddr samples_buffer;
@@ -57,4 +58,4 @@ struct UpsampleCommand : ICommand {
57 CpuAddr upsampler_info; 58 CpuAddr upsampler_info;
58}; 59};
59 60
60} // namespace AudioCore::AudioRenderer 61} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/sink/circular_buffer.cpp b/src/audio_core/renderer/command/sink/circular_buffer.cpp
index e2ce59792..e056d15a6 100644
--- a/src/audio_core/renderer/command/sink/circular_buffer.cpp
+++ b/src/audio_core/renderer/command/sink/circular_buffer.cpp
@@ -3,14 +3,14 @@
3 3
4#include <vector> 4#include <vector>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/sink/circular_buffer.h" 7#include "audio_core/renderer/command/sink/circular_buffer.h"
8#include "core/memory.h" 8#include "core/memory.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11 11
12void CircularBufferSinkCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 12void CircularBufferSinkCommand::Dump(
13 std::string& string) { 13 [[maybe_unused]] const AudioRenderer::CommandListProcessor& processor, std::string& string) {
14 string += fmt::format( 14 string += fmt::format(
15 "CircularBufferSinkCommand\n\tinput_count {} ring size {:04X} ring pos {:04X}\n\tinputs: ", 15 "CircularBufferSinkCommand\n\tinput_count {} ring size {:04X} ring pos {:04X}\n\tinputs: ",
16 input_count, size, pos); 16 input_count, size, pos);
@@ -20,7 +20,7 @@ void CircularBufferSinkCommand::Dump([[maybe_unused]] const ADSP::CommandListPro
20 string += "\n"; 20 string += "\n";
21} 21}
22 22
23void CircularBufferSinkCommand::Process(const ADSP::CommandListProcessor& processor) { 23void CircularBufferSinkCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
24 constexpr s32 min{std::numeric_limits<s16>::min()}; 24 constexpr s32 min{std::numeric_limits<s16>::min()};
25 constexpr s32 max{std::numeric_limits<s16>::max()}; 25 constexpr s32 max{std::numeric_limits<s16>::max()};
26 26
@@ -41,8 +41,8 @@ void CircularBufferSinkCommand::Process(const ADSP::CommandListProcessor& proces
41 } 41 }
42} 42}
43 43
44bool CircularBufferSinkCommand::Verify(const ADSP::CommandListProcessor& processor) { 44bool CircularBufferSinkCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
45 return true; 45 return true;
46} 46}
47 47
48} // namespace AudioCore::AudioRenderer 48} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/sink/circular_buffer.h b/src/audio_core/renderer/command/sink/circular_buffer.h
index e7d5be26e..a3234a406 100644
--- a/src/audio_core/renderer/command/sink/circular_buffer.h
+++ b/src/audio_core/renderer/command/sink/circular_buffer.h
@@ -8,11 +8,12 @@
8#include "audio_core/renderer/command/icommand.h" 8#include "audio_core/renderer/command/icommand.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10 10
11namespace AudioCore::AudioRenderer { 11namespace AudioCore::ADSP::AudioRenderer {
12namespace ADSP {
13class CommandListProcessor; 12class CommandListProcessor;
14} 13}
15 14
15namespace AudioCore::Renderer {
16
16/** 17/**
17 * AudioRenderer command for sinking samples to a circular buffer. 18 * AudioRenderer command for sinking samples to a circular buffer.
18 */ 19 */
@@ -23,14 +24,14 @@ struct CircularBufferSinkCommand : ICommand {
23 * @param processor - The CommandListProcessor processing this command. 24 * @param processor - The CommandListProcessor processing this command.
24 * @param string - The string to print into. 25 * @param string - The string to print into.
25 */ 26 */
26 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 27 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
27 28
28 /** 29 /**
29 * Process this command. 30 * Process this command.
30 * 31 *
31 * @param processor - The CommandListProcessor processing this command. 32 * @param processor - The CommandListProcessor processing this command.
32 */ 33 */
33 void Process(const ADSP::CommandListProcessor& processor) override; 34 void Process(const AudioRenderer::CommandListProcessor& processor) override;
34 35
35 /** 36 /**
36 * Verify this command's data is valid. 37 * Verify this command's data is valid.
@@ -38,7 +39,7 @@ struct CircularBufferSinkCommand : ICommand {
38 * @param processor - The CommandListProcessor processing this command. 39 * @param processor - The CommandListProcessor processing this command.
39 * @return True if the command is valid, otherwise false. 40 * @return True if the command is valid, otherwise false.
40 */ 41 */
41 bool Verify(const ADSP::CommandListProcessor& processor) override; 42 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
42 43
43 /// Number of input mix buffers 44 /// Number of input mix buffers
44 u32 input_count; 45 u32 input_count;
@@ -52,4 +53,4 @@ struct CircularBufferSinkCommand : ICommand {
52 u32 pos; 53 u32 pos;
53}; 54};
54 55
55} // namespace AudioCore::AudioRenderer 56} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/sink/device.cpp b/src/audio_core/renderer/command/sink/device.cpp
index 5f74dd7ad..3480ed475 100644
--- a/src/audio_core/renderer/command/sink/device.cpp
+++ b/src/audio_core/renderer/command/sink/device.cpp
@@ -3,13 +3,13 @@
3 3
4#include <algorithm> 4#include <algorithm>
5 5
6#include "audio_core/renderer/adsp/command_list_processor.h" 6#include "audio_core/adsp/apps/audio_renderer/command_list_processor.h"
7#include "audio_core/renderer/command/sink/device.h" 7#include "audio_core/renderer/command/sink/device.h"
8#include "audio_core/sink/sink.h" 8#include "audio_core/sink/sink.h"
9 9
10namespace AudioCore::AudioRenderer { 10namespace AudioCore::Renderer {
11 11
12void DeviceSinkCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& processor, 12void DeviceSinkCommand::Dump([[maybe_unused]] const AudioRenderer::CommandListProcessor& processor,
13 std::string& string) { 13 std::string& string) {
14 string += fmt::format("DeviceSinkCommand\n\t{} session {} input_count {}\n\tinputs: ", 14 string += fmt::format("DeviceSinkCommand\n\t{} session {} input_count {}\n\tinputs: ",
15 std::string_view(name), session_id, input_count); 15 std::string_view(name), session_id, input_count);
@@ -19,7 +19,7 @@ void DeviceSinkCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor&
19 string += "\n"; 19 string += "\n";
20} 20}
21 21
22void DeviceSinkCommand::Process(const ADSP::CommandListProcessor& processor) { 22void DeviceSinkCommand::Process(const AudioRenderer::CommandListProcessor& processor) {
23 constexpr s32 min = std::numeric_limits<s16>::min(); 23 constexpr s32 min = std::numeric_limits<s16>::min();
24 constexpr s32 max = std::numeric_limits<s16>::max(); 24 constexpr s32 max = std::numeric_limits<s16>::max();
25 25
@@ -51,8 +51,8 @@ void DeviceSinkCommand::Process(const ADSP::CommandListProcessor& processor) {
51 } 51 }
52} 52}
53 53
54bool DeviceSinkCommand::Verify(const ADSP::CommandListProcessor& processor) { 54bool DeviceSinkCommand::Verify(const AudioRenderer::CommandListProcessor& processor) {
55 return true; 55 return true;
56} 56}
57 57
58} // namespace AudioCore::AudioRenderer 58} // namespace AudioCore::Renderer
diff --git a/src/audio_core/renderer/command/sink/device.h b/src/audio_core/renderer/command/sink/device.h
index 1099bcf8c..385b51ecc 100644
--- a/src/audio_core/renderer/command/sink/device.h
+++ b/src/audio_core/renderer/command/sink/device.h
@@ -10,11 +10,12 @@
10#include "audio_core/renderer/command/icommand.h" 10#include "audio_core/renderer/command/icommand.h"
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace AudioCore::AudioRenderer { 13namespace AudioCore::ADSP::AudioRenderer {
14namespace ADSP {
15class CommandListProcessor; 14class CommandListProcessor;
16} 15}
17 16
17namespace AudioCore::Renderer {
18
18/** 19/**
19 * AudioRenderer command for sinking samples to an output device. 20 * AudioRenderer command for sinking samples to an output device.
20 */ 21 */
@@ -25,14 +26,14 @@ struct DeviceSinkCommand : ICommand {
25 * @param processor - The CommandListProcessor processing this command. 26 * @param processor - The CommandListProcessor processing this command.
26 * @param string - The string to print into. 27 * @param string - The string to print into.
27 */ 28 */
28 void Dump(const ADSP::CommandListProcessor& processor, std::string& string) override; 29 void Dump(const AudioRenderer::CommandListProcessor& processor, std::string& string) override;
29 30
30 /** 31 /**
31 * Process this command. 32 * Process this command.
32 * 33 *
33 * @param processor - The CommandListProcessor processing this command. 34 * @param processor - The CommandListProcessor processing this command.
34 */ 35 */
35 void Process(const ADSP::CommandListProcessor& processor) override; 36 void Process(const AudioRenderer::CommandListProcessor& processor) override;
36 37
37 /** 38 /**
38 * Verify this command's data is valid. 39 * Verify this command's data is valid.
@@ -40,7 +41,7 @@ struct DeviceSinkCommand : ICommand {
40 * @param processor - The CommandListProcessor processing this command. 41 * @param processor - The CommandListProcessor processing this command.
41 * @return True if the command is valid, otherwise false. 42 * @return True if the command is valid, otherwise false.
42 */ 43 */
43 bool Verify(const ADSP::CommandListProcessor& processor) override; 44 bool Verify(const AudioRenderer::CommandListProcessor& processor) override;
44 45
45 /// Device name 46 /// Device name
46 char name[0x100]; 47 char name[0x100];
@@ -54,4 +55,4 @@ struct DeviceSinkCommand : ICommand {
54 std::array<s16, MaxChannels> inputs; 55 std::array<s16, MaxChannels> inputs;
55}; 56};
56 57
57} // namespace AudioCore::AudioRenderer 58} // namespace AudioCore::Renderer