From d0fe4022759b21e796fdb82f54a4f87f4505fa82 Mon Sep 17 00:00:00 2001 From: TurtleP Date: Thu, 5 Oct 2023 14:26:10 -0400 Subject: [PATCH] 3ds: add getMasterVolume/ChannelVolume --- platform/ctr/source/utilities/driver/dsp_ext.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/ctr/source/utilities/driver/dsp_ext.cpp b/platform/ctr/source/utilities/driver/dsp_ext.cpp index 351c26f6..10fc4969 100644 --- a/platform/ctr/source/utilities/driver/dsp_ext.cpp +++ b/platform/ctr/source/utilities/driver/dsp_ext.cpp @@ -46,7 +46,7 @@ void DSP::SetMasterVolume(float volume) float DSP::GetMasterVolume() const { - return 1.0f; + return ndspGetMasterVol(); } bool DSP::ChannelReset(size_t id, int channels, int bitDepth, int sampleRate) @@ -80,7 +80,10 @@ void DSP::ChannelSetVolume(size_t id, float volume) float DSP::ChannelGetVolume(size_t id) const { - return 1.0f; + float mix[12] { 0.0f }; + ndspChnGetMix(id, mix); + + return mix[0]; } size_t DSP::ChannelGetSampleOffset(size_t id) const