diff options
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 1cc3fe9d..762fc7fe 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -185,6 +185,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam ResamplerFunc Resample; ALbufferlistitem *BufferListItem; ALuint DataPosInt, DataPosFrac; + ALboolean isbformat = AL_FALSE; ALboolean Looping; ALuint increment; enum Resampler Resampler; @@ -206,6 +207,18 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam NumChannels = Source->NumChannels; SampleSize = Source->SampleSize; + while(BufferListItem) + { + ALbuffer *buffer; + if((buffer=BufferListItem->buffer) != NULL) + { + isbformat = (buffer->FmtChannels == FmtBFormat2D || + buffer->FmtChannels == FmtBFormat3D); + break; + } + BufferListItem = BufferListItem->next; + } + Mix = SelectMixer(); HrtfMix = SelectHrtfMixer(); Resample = SelectResampler(Resampler, increment); @@ -428,6 +441,10 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam &parms->Mix.Hrtf.State[chan], DstBufferSize); } + /* Only the first channel for B-Format buffers (W channel) goes to + * the send paths. */ + if(chan > 0 && isbformat) + continue; for(j = 0;j < Device->NumAuxSends;j++) { SendParams *parms = &voice->Send[j]; |