From: Matteo Bruni <mbruni@codeweavers.com> Notably from DSOUND_Calc3DBuffer() for distant sounds. The idea is to make secondarybuffer_is_audible() work with > 2 channels. --- dlls/dsound/mixer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index dbc84cbd04f..f7192bfb1b6 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -50,6 +50,13 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan) TRACE("Vol=%ld Pan=%ld\n", volpan->lVolume, volpan->lPan); /* the AmpFactors are expressed in 16.16 fixed point */ + if (volpan->lVolume == DSBVOLUME_MIN) + { + for (unsigned int i = 0; i < DS_MAX_CHANNELS; i++) + volpan->dwTotalAmpFactor[i] = 0; + TRACE("setting all channel volumes to 0\n"); + return; + } /* FIXME: use calculated vol and pan ampfactors */ temp = (double) (volpan->lVolume - (volpan->lPan > 0 ? volpan->lPan : 0)); volpan->dwTotalAmpFactor[0] = (ULONG) (pow(2.0, temp / 600.0) * 0xffff); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10048