diff options
| author | 2020-04-22 13:03:58 +1000 | |
|---|---|---|
| committer | 2020-05-11 12:56:15 -0400 | |
| commit | 9de860a419853bbaf913c07b1aae239c91c56d9e (patch) | |
| tree | 4de5b795d79a751d258e1b07c5c054cae7bc1f3d /src/audio_core/audio_renderer.h | |
| parent | Merge pull request #3896 from jroweboy/remove-clang-format-check-from-patreon (diff) | |
| download | yuzu-9de860a419853bbaf913c07b1aae239c91c56d9e.tar.gz yuzu-9de860a419853bbaf913c07b1aae239c91c56d9e.tar.xz yuzu-9de860a419853bbaf913c07b1aae239c91c56d9e.zip | |
audio_renderer: Better voice mixing and 6 channel downmixing
Supersedes #3738 and #3321
Diffstat (limited to 'src/audio_core/audio_renderer.h')
| -rw-r--r-- | src/audio_core/audio_renderer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/audio_core/audio_renderer.h b/src/audio_core/audio_renderer.h index b42770fae..1f9114c07 100644 --- a/src/audio_core/audio_renderer.h +++ b/src/audio_core/audio_renderer.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <vector> | 9 | #include <vector> |
| 10 | 10 | ||
| 11 | #include "audio_core/behavior_info.h" | 11 | #include "audio_core/behavior_info.h" |
| 12 | #include "audio_core/common.h" | ||
| 12 | #include "audio_core/stream.h" | 13 | #include "audio_core/stream.h" |
| 13 | #include "common/common_funcs.h" | 14 | #include "common/common_funcs.h" |
| 14 | #include "common/common_types.h" | 15 | #include "common/common_types.h" |
| @@ -116,6 +117,14 @@ struct WaveBuffer { | |||
| 116 | }; | 117 | }; |
| 117 | static_assert(sizeof(WaveBuffer) == 0x38, "WaveBuffer has wrong size"); | 118 | static_assert(sizeof(WaveBuffer) == 0x38, "WaveBuffer has wrong size"); |
| 118 | 119 | ||
| 120 | struct VoiceResourceInformation { | ||
| 121 | s32_le id{}; | ||
| 122 | std::array<float_le, MAX_MIX_BUFFERS> mix_volumes{}; | ||
| 123 | bool in_use{}; | ||
| 124 | INSERT_PADDING_BYTES(11); | ||
| 125 | }; | ||
| 126 | static_assert(sizeof(VoiceResourceInformation) == 0x70, "VoiceResourceInformation has wrong size"); | ||
| 127 | |||
| 119 | struct VoiceInfo { | 128 | struct VoiceInfo { |
| 120 | u32_le id; | 129 | u32_le id; |
| 121 | u32_le node_id; | 130 | u32_le node_id; |
| @@ -244,6 +253,7 @@ private: | |||
| 244 | AudioRendererParameter worker_params; | 253 | AudioRendererParameter worker_params; |
| 245 | std::shared_ptr<Kernel::WritableEvent> buffer_event; | 254 | std::shared_ptr<Kernel::WritableEvent> buffer_event; |
| 246 | std::vector<VoiceState> voices; | 255 | std::vector<VoiceState> voices; |
| 256 | std::vector<VoiceResourceInformation> voice_resources; | ||
| 247 | std::vector<EffectState> effects; | 257 | std::vector<EffectState> effects; |
| 248 | std::unique_ptr<AudioOut> audio_out; | 258 | std::unique_ptr<AudioOut> audio_out; |
| 249 | StreamPtr stream; | 259 | StreamPtr stream; |