[openal] Porting from XAudio2 to OpenAL - few questions

Chris Robinson chris.kcat at gmail.com
Mon Mar 24 20:07:01 EDT 2014


On 03/24/2014 07:19 AM, Mariusz 'MX' Szaflik wrote:
> just to be sure - I only need one pair of filters and I could use them
> multiple times (setting params to filter, binding to the source, then
> setting params again, binding to another source) - right ?

Yup, that works too. You could even get away with one filter, if you wanted:

alFilterf(filter, AL_LOWPASS_GAIN, drygain);
alFilterf(filter, AL_LOWPASS_GAINHF, drygainhf);
alSourcei(source, AL_DIRECT_FILTER, filter);

alFilterf(filter, AL_LOWPASS_GAIN, wetgain);
alFilterf(filter, AL_LOWPASS_GAINHF, wetgainhf);
alSource3i(source, AL_AUXILIARY_SEND_FILTER, reverbSlotID, 0, filter);

> and one more question - the XAudio2 version have some stereo voices with
> positioning ... AFAIK there is no such thing in OpenAL ?

Unfortunately not. You can of course create stereo sources (and 5.1, 
using AL_EXT_MCFORMATS or AL_SOFT_buffer_samples), but you can't 
position them. Filters (and effects) will work though, so you can 
manually apply distance attenuation and obstruction and such, but if you 
need to manually control the panning or volume of individual channels, 
you need to create individual mono sources.


More information about the openal mailing list