summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-12 19:33:08 +0200
committerGitHub <noreply@github.com>2018-08-12 19:33:08 +0200
commit68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2 (patch)
tree8030e3696ed3ceebfb606ac119e5d9ff66ea8f58 /src/audio_core
parentMerge pull request #1034 from lioncash/hid (diff)
parentPushed the requested sample rate instead of our fixed sample rate (diff)
downloadyuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.tar
yuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.tar.gz
yuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.tar.bz2
yuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.tar.lz
yuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.tar.xz
yuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.tar.zst
yuzu-68c44ca0ee17ed9f5319150e28c5dfa6115fb7b2.zip
Diffstat (limited to 'src/audio_core')
-rw-r--r--src/audio_core/audio_renderer.cpp12
-rw-r--r--src/audio_core/audio_renderer.h5
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..6ebed3fb0 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 worker_params.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 {