From 9a4beac95a0f88ec312a28d06da8270aa58736e3 Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Tue, 17 Nov 2020 14:14:29 +1100 Subject: audren: Make use of nodiscard, rework downmixing, release all buffers Preliminary work for upmixing & general cleanup. Fixes basic issues in games such as Shovel Knight and slightly improves the LEGO games. Upmixing stitll needs to be implemented. Audio levels in a few games will be fixed as we now use the downmix coefficients when possible instead of supplying our own --- src/audio_core/sink_context.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/audio_core/sink_context.h') diff --git a/src/audio_core/sink_context.h b/src/audio_core/sink_context.h index d7aa72ba7..5a757a4ef 100644 --- a/src/audio_core/sink_context.h +++ b/src/audio_core/sink_context.h @@ -74,16 +74,21 @@ public: explicit SinkContext(std::size_t sink_count); ~SinkContext(); - std::size_t GetCount() const; + [[nodiscard]] std::size_t GetCount() const; - void UpdateMainSink(SinkInfo::InParams& in); - bool InUse() const; - std::vector OutputBuffers() const; + void UpdateMainSink(const SinkInfo::InParams& in); + [[nodiscard]] bool InUse() const; + [[nodiscard]] std::vector OutputBuffers() const; + + [[nodiscard]] bool HasDownMixingCoefficients() const; + [[nodiscard]] const std::array& GetDownmixCoefficients() const; private: bool in_use{false}; s32 use_count{}; std::array buffers{}; std::size_t sink_count{}; + bool downmix{false}; + std::array downmix_coefficients{}; }; } // namespace AudioCore -- cgit v1.2.3