summaryrefslogtreecommitdiffstats
path: root/src/audio_core/sink_context.h
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2020-11-17 05:40:19 +0100
committerChloe Marcec <dmarcecguzman@gmail.com>2020-11-17 05:40:19 +0100
commit908d3c56793ee67dccd0d370b175c4937420053f (patch)
tree5a29b03bf2689219a7c686cc5b9b38db0d996322 /src/audio_core/sink_context.h
parentaudren: Make use of nodiscard, rework downmixing, release all buffers (diff)
downloadyuzu-908d3c56793ee67dccd0d370b175c4937420053f.tar
yuzu-908d3c56793ee67dccd0d370b175c4937420053f.tar.gz
yuzu-908d3c56793ee67dccd0d370b175c4937420053f.tar.bz2
yuzu-908d3c56793ee67dccd0d370b175c4937420053f.tar.lz
yuzu-908d3c56793ee67dccd0d370b175c4937420053f.tar.xz
yuzu-908d3c56793ee67dccd0d370b175c4937420053f.tar.zst
yuzu-908d3c56793ee67dccd0d370b175c4937420053f.zip
Diffstat (limited to 'src/audio_core/sink_context.h')
-rw-r--r--src/audio_core/sink_context.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/audio_core/sink_context.h b/src/audio_core/sink_context.h
index 5a757a4ef..e2e7880b7 100644
--- a/src/audio_core/sink_context.h
+++ b/src/audio_core/sink_context.h
@@ -11,6 +11,8 @@
namespace AudioCore {
+using DownmixCoefficients = std::array<float_le, 4>;
+
enum class SinkTypes : u8 {
Invalid = 0,
Device = 1,
@@ -50,7 +52,7 @@ public:
std::array<u8, AudioCommon::MAX_CHANNEL_COUNT> input;
INSERT_UNION_PADDING_BYTES(1);
bool down_matrix_enabled;
- std::array<float_le, 4> down_matrix_coef;
+ DownmixCoefficients down_matrix_coef;
};
static_assert(sizeof(SinkInfo::DeviceIn) == 0x11c, "SinkInfo::DeviceIn is an invalid size");
@@ -81,14 +83,14 @@ public:
[[nodiscard]] std::vector<u8> OutputBuffers() const;
[[nodiscard]] bool HasDownMixingCoefficients() const;
- [[nodiscard]] const std::array<float_le, 4>& GetDownmixCoefficients() const;
+ [[nodiscard]] const DownmixCoefficients& GetDownmixCoefficients() const;
private:
bool in_use{false};
s32 use_count{};
std::array<u8, AudioCommon::MAX_CHANNEL_COUNT> buffers{};
std::size_t sink_count{};
- bool downmix{false};
- std::array<float_le, 4> downmix_coefficients{};
+ bool has_downmix_coefs{false};
+ DownmixCoefficients downmix_coefficients{};
};
} // namespace AudioCore