From ffbba74c91e2200868047f76ab5c452bb9aa338d Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Wed, 13 Dec 2023 06:26:20 +0000 Subject: Have GetActiveChannelCount return the system channels instead of host device channels --- src/audio_core/sink/sink.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/audio_core/sink/sink.h') diff --git a/src/audio_core/sink/sink.h b/src/audio_core/sink/sink.h index f28c6d126..e22e8c3e5 100644 --- a/src/audio_core/sink/sink.h +++ b/src/audio_core/sink/sink.h @@ -85,9 +85,21 @@ public: */ virtual void SetSystemVolume(f32 volume) = 0; + /** + * Get the number of channels the game has set, can be different to the host hardware's support. + * Either 2 or 6. + * + * @return Number of device channels. + */ + u32 GetSystemChannels() const { + return system_channels; + } + protected: /// Number of device channels supported by the hardware u32 device_channels{2}; + /// Number of channels the game is sending + u32 system_channels{2}; }; using SinkPtr = std::unique_ptr; -- cgit v1.2.3