diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2018-08-12 06:46:12 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2018-08-12 06:46:12 +0200 |
commit | e5ee0afe6f7b9cc8bf551b70ce61c773706710cc (patch) | |
tree | 590299674a18111fbda7cbe810ed81e61186bc5b /src/audio_core | |
parent | Merge pull request #1022 from bunnei/fix-splat (diff) | |
download | yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.tar yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.tar.gz yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.tar.bz2 yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.tar.lz yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.tar.xz yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.tar.zst yuzu-e5ee0afe6f7b9cc8bf551b70ce61c773706710cc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/audio_renderer.cpp | 12 | ||||
-rw-r--r-- | src/audio_core/audio_renderer.h | 5 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index 282f345c5..1ab6e88c2 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp @@ -26,6 +26,18 @@ AudioRenderer::AudioRenderer(AudioRendererParameter params, QueueMixedBuffer(2); } +u32 AudioRenderer::GetSampleRate() const { + return STREAM_SAMPLE_RATE; +} + +u32 AudioRenderer::GetSampleCount() const { + return worker_params.sample_count; +} + +u32 AudioRenderer::GetMixBufferCount() const { + return worker_params.mix_buffer_count; +} + std::vector<u8> AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_params) { // Copy UpdateDataHeader struct UpdateDataHeader config{}; diff --git a/src/audio_core/audio_renderer.h b/src/audio_core/audio_renderer.h index 6950a4681..13c5d0adc 100644 --- a/src/audio_core/audio_renderer.h +++ b/src/audio_core/audio_renderer.h @@ -26,7 +26,7 @@ enum class PlayState : u8 { struct AudioRendererParameter { u32_le sample_rate; u32_le sample_count; - u32_le unknown_8; + u32_le mix_buffer_count; u32_le unknown_c; u32_le voice_count; u32_le sink_count; @@ -160,6 +160,9 @@ public: std::vector<u8> UpdateAudioRenderer(const std::vector<u8>& input_params); void QueueMixedBuffer(Buffer::Tag tag); void ReleaseAndQueueBuffers(); + u32 GetSampleRate() const; + u32 GetSampleCount() const; + u32 GetMixBufferCount() const; private: class VoiceState { |