summaryrefslogtreecommitdiffstats
path: root/src/audio_core/audio_renderer.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2019-09-20 02:42:09 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2019-09-20 02:42:09 +0200
commitb54cdeb28448aade6eb84bc703d04d63348eea3d (patch)
tree3cb0347035a3069baddc993f9e7d45a5d425db25 /src/audio_core/audio_renderer.cpp
parentMerge pull request #2784 from ReinUsesLisp/smem (diff)
downloadyuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.tar
yuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.tar.gz
yuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.tar.bz2
yuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.tar.lz
yuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.tar.xz
yuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.tar.zst
yuzu-b54cdeb28448aade6eb84bc703d04d63348eea3d.zip
Diffstat (limited to 'src/audio_core/audio_renderer.cpp')
-rw-r--r--src/audio_core/audio_renderer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp
index da50a0bbc..cf24527f3 100644
--- a/src/audio_core/audio_renderer.cpp
+++ b/src/audio_core/audio_renderer.cpp
@@ -107,6 +107,11 @@ Stream::State AudioRenderer::GetStreamState() const {
return stream->GetState();
}
+constexpr u32 VersionFromRevision(u32_le rev) {
+ // "REV7" -> 7
+ return ((rev >> 24) & 0xff) - 0x30;
+}
+
std::vector<u8> AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_params) {
// Copy UpdateDataHeader struct
UpdateDataHeader config{};
@@ -166,6 +171,11 @@ std::vector<u8> AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_
// Copy output header
UpdateDataHeader response_data{worker_params};
std::vector<u8> output_params(response_data.total_size);
+ const auto audren_revision = VersionFromRevision(config.revision);
+ if (audren_revision >= 7) {
+ response_data.frame_count = 0x10;
+ response_data.total_size += 0x10;
+ }
std::memcpy(output_params.data(), &response_data, sizeof(UpdateDataHeader));
// Copy output memory pool entries