summaryrefslogtreecommitdiffstats
path: root/src/audio_core/sink_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/sink_context.cpp')
-rw-r--r--src/audio_core/sink_context.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/audio_core/sink_context.cpp b/src/audio_core/sink_context.cpp
index 0882b411a..b29b47890 100644
--- a/src/audio_core/sink_context.cpp
+++ b/src/audio_core/sink_context.cpp
@@ -12,10 +12,16 @@ std::size_t SinkContext::GetCount() const {
return sink_count;
}
-void SinkContext::UpdateMainSink(SinkInfo::InParams& in) {
+void SinkContext::UpdateMainSink(const SinkInfo::InParams& in) {
+ ASSERT(in.type == SinkTypes::Device);
+
+ has_downmix_coefs = in.device.down_matrix_enabled;
+ if (has_downmix_coefs) {
+ downmix_coefficients = in.device.down_matrix_coef;
+ }
in_use = in.in_use;
use_count = in.device.input_count;
- std::memcpy(buffers.data(), in.device.input.data(), AudioCommon::MAX_CHANNEL_COUNT);
+ buffers = in.device.input;
}
bool SinkContext::InUse() const {
@@ -28,4 +34,12 @@ std::vector<u8> SinkContext::OutputBuffers() const {
return buffer_ret;
}
+bool SinkContext::HasDownMixingCoefficients() const {
+ return has_downmix_coefs;
+}
+
+const DownmixCoefficients& SinkContext::GetDownmixCoefficients() const {
+ return downmix_coefficients;
+}
+
} // namespace AudioCore