From 7b890ffba1b9d62716871cc496f5bc732c66734d Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Wed, 27 Mar 2024 10:56:22 +0100 Subject: [PATCH] AudioDriverAD1938Class --- src/Driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Driver.h b/src/Driver.h index 9678a19..49fb7df 100644 --- a/src/Driver.h +++ b/src/Driver.h @@ -360,9 +360,9 @@ class AudioDriverAD1938Class : public AudioDriver { } bool end(void) override { return ad1938.end(); } bool setMute(bool mute) override { return ad1938.setMute(mute); } - // mutes an individual DAC + // mutes an individual DAC: valid range (0:3) bool setMute(bool mute, int line) { - if (line > 7) return false; + if (dac_num > 3) return false; return ad1938.setVolumeDAC(line, mute ? 0.0 : (static_cast(volumes[line]) / 100.0f)); }