dsound: Only warn for unsupported channels (or bits) when volume adjustment is done.

oldstable
Maarten Lankhorst 2007-10-13 20:29:40 +02:00 committed by Alexandre Julliard
parent 3f4c267028
commit 80192b93eb
1 changed files with 5 additions and 5 deletions

View File

@ -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;