From a55e9ce19cc20afc6b13258321a845684b94d0c6 Mon Sep 17 00:00:00 2001 From: Oleg Dubinskiy Date: Sat, 1 Jun 2024 12:31:53 +0200 Subject: [PATCH] [AC97] Use individual Decibel range for Master Volume control (#6950) Add ReactOS change to use the same Decibel (dB) sound loudness range for Master Volume control as for WaveOut Volume Control. This fixes incompatible volume level change scaling when changing the volume in Fox Audio Player 0.10.2 from Rapps and Winamp 2.95 with WaveOut output plugin. Now it is identical to the one when using original AC97 driver from Windows XP/Server 2003. CORE-14780 --- drivers/wdm/audio/drivers/ac97/prophnd.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/wdm/audio/drivers/ac97/prophnd.cpp b/drivers/wdm/audio/drivers/ac97/prophnd.cpp index 714e89da8d7..3ff8e563501 100644 --- a/drivers/wdm/audio/drivers/ac97/prophnd.cpp +++ b/drivers/wdm/audio/drivers/ac97/prophnd.cpp @@ -170,7 +170,9 @@ NTSTATUS CAC97MiniportTopology::GetDBValues { // These nodes could have 5bit or 6bit controls, so we first // have to check this. +#ifndef __REACTOS__ case NODE_MASTEROUT_VOLUME: +#endif case NODE_FRONT_VOLUME: case NODE_HPOUT_VOLUME: case NODE_SURROUND_VOLUME: @@ -230,6 +232,11 @@ NTSTATUS CAC97MiniportTopology::GetDBValues case NODE_VIDEO_VOLUME: case NODE_AUX_VOLUME: case NODE_WAVEOUT_VOLUME: +#ifdef __REACTOS__ + // ReactOS change: use the same Decibel range as for WaveOut, + // to fix incorrect volume level change scaling. CORE-14780 + case NODE_MASTEROUT_VOLUME: +#endif *plMaximum = 0x000C0000; // 12 dB *plMinimum = 0xFFDD8000; // -34.5 dB *puStep = 0x00018000; // 1.5 dB