diff options
Diffstat (limited to 'src/audio_core/hle/dsp.cpp')
| -rw-r--r-- | src/audio_core/hle/dsp.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/audio_core/hle/dsp.cpp b/src/audio_core/hle/dsp.cpp index 1420bf2dd..5c8afa111 100644 --- a/src/audio_core/hle/dsp.cpp +++ b/src/audio_core/hle/dsp.cpp | |||
| @@ -47,11 +47,9 @@ static SharedMemory& WriteRegion() { | |||
| 47 | // Audio processing and mixing | 47 | // Audio processing and mixing |
| 48 | 48 | ||
| 49 | static std::array<Source, num_sources> sources = { | 49 | static std::array<Source, num_sources> sources = { |
| 50 | Source(0), Source(1), Source(2), Source(3), Source(4), Source(5), | 50 | Source(0), Source(1), Source(2), Source(3), Source(4), Source(5), Source(6), Source(7), |
| 51 | Source(6), Source(7), Source(8), Source(9), Source(10), Source(11), | 51 | Source(8), Source(9), Source(10), Source(11), Source(12), Source(13), Source(14), Source(15), |
| 52 | Source(12), Source(13), Source(14), Source(15), Source(16), Source(17), | 52 | Source(16), Source(17), Source(18), Source(19), Source(20), Source(21), Source(22), Source(23)}; |
| 53 | Source(18), Source(19), Source(20), Source(21), Source(22), Source(23) | ||
| 54 | }; | ||
| 55 | static Mixers mixers; | 53 | static Mixers mixers; |
| 56 | 54 | ||
| 57 | static StereoFrame16 GenerateCurrentFrame() { | 55 | static StereoFrame16 GenerateCurrentFrame() { |
| @@ -62,14 +60,16 @@ static StereoFrame16 GenerateCurrentFrame() { | |||
| 62 | 60 | ||
| 63 | // Generate intermediate mixes | 61 | // Generate intermediate mixes |
| 64 | for (size_t i = 0; i < num_sources; i++) { | 62 | for (size_t i = 0; i < num_sources; i++) { |
| 65 | write.source_statuses.status[i] = sources[i].Tick(read.source_configurations.config[i], read.adpcm_coefficients.coeff[i]); | 63 | write.source_statuses.status[i] = |
| 64 | sources[i].Tick(read.source_configurations.config[i], read.adpcm_coefficients.coeff[i]); | ||
| 66 | for (size_t mix = 0; mix < 3; mix++) { | 65 | for (size_t mix = 0; mix < 3; mix++) { |
| 67 | sources[i].MixInto(intermediate_mixes[mix], mix); | 66 | sources[i].MixInto(intermediate_mixes[mix], mix); |
| 68 | } | 67 | } |
| 69 | } | 68 | } |
| 70 | 69 | ||
| 71 | // Generate final mix | 70 | // Generate final mix |
| 72 | write.dsp_status = mixers.Tick(read.dsp_configuration, read.intermediate_mix_samples, write.intermediate_mix_samples, intermediate_mixes); | 71 | write.dsp_status = mixers.Tick(read.dsp_configuration, read.intermediate_mix_samples, |
| 72 | write.intermediate_mix_samples, intermediate_mixes); | ||
| 73 | 73 | ||
| 74 | StereoFrame16 output_frame = mixers.GetOutput(); | 74 | StereoFrame16 output_frame = mixers.GetOutput(); |
| 75 | 75 | ||
| @@ -152,7 +152,8 @@ void Shutdown() { | |||
| 152 | bool Tick() { | 152 | bool Tick() { |
| 153 | StereoFrame16 current_frame = {}; | 153 | StereoFrame16 current_frame = {}; |
| 154 | 154 | ||
| 155 | // TODO: Check dsp::DSP semaphore (which indicates emulated application has finished writing to shared memory region) | 155 | // TODO: Check dsp::DSP semaphore (which indicates emulated application has finished writing to |
| 156 | // shared memory region) | ||
| 156 | current_frame = GenerateCurrentFrame(); | 157 | current_frame = GenerateCurrentFrame(); |
| 157 | 158 | ||
| 158 | OutputCurrentFrame(current_frame); | 159 | OutputCurrentFrame(current_frame); |