[PATCH] dsound: Only warn for unsupported channels/bpp when volume adjustment has to be done
Maarten Lankhorst
maarten at codeweavers.com
Sat Oct 13 13:29:40 CDT 2007
---
dlls/dsound/mixer.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 2486e72..daa4e97 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -435,6 +435,11 @@ static LPBYTE DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, DWORD writepos,
TRACE("left = %x, right = %x\n", dsb->volpan.dwTotalLeftAmpFactor,
dsb->volpan.dwTotalRightAmpFactor);
+ if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->volpan.lPan == 0)) &&
+ (!(dsb->dsbd.dwFlags & DSBCAPS_CTRLVOLUME) || (dsb->volpan.lVolume == 0)) &&
+ !(dsb->dsbd.dwFlags & DSBCAPS_CTRL3D))
+ return NULL; /* Nothing to do */
+
if (nChannels != 1 && nChannels != 2)
{
FIXME("There is no support for %d channels\n", nChannels);
@@ -447,11 +452,6 @@ static LPBYTE DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, DWORD writepos,
return NULL;
}
- if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->volpan.lPan == 0)) &&
- (!(dsb->dsbd.dwFlags & DSBCAPS_CTRLVOLUME) || (dsb->volpan.lVolume == 0)) &&
- !(dsb->dsbd.dwFlags & DSBCAPS_CTRL3D))
- return NULL; /* Nothing to do */
-
if (dsb->device->tmp_buffer_len < len || !dsb->device->tmp_buffer)
{
dsb->device->tmp_buffer_len = len;
--
1.5.2.5
--------------000501060909080702070902--
More information about the wine-patches
mailing list