[Openal] multiple effects attached to a effect slot?
Daniel PEACOCK
dpeacock at creativelabs.com
Fri Jul 20 17:55:27 PDT 2007
Hi,
> - i can have multiple sound sources attached to a single effect slot (ie
> effect)
Multiple sound sources can feed (send to) a single Auxiliary Effect Slot.
The Auxiliary Effect Slot needs to have an Effect object attached (loaded)
in order for this to do anything.
> - a sound source can have multiple filters
Yes. Each Source has one Direct Filter (affects the "dry" path) and a
variable number of Send Filters (which affect the sends to the Auxiliary
Effect Slots). The number of Effect Send Filters per Source is soundcard
dependant. You can request this number using a Context Creation hint
(ALC_MAX_AUXILIARY_SENDS), and check to see what the AL device is capable
of by querying for the property using alcGetIntergerv.
> - a sound source can only belong to a single effect
No that's not right. Sound Sources are not related to Effects at all.
Effects are more like Buffers in that they simply contain data and don't do
anything until they are attached to an object. An Effect needs to be
attached to an Auxiliary Effect Slot, in the same way that a Buffer needs
to be attached to a Source.
If you have the Creative OpenAL SDK ( available from
http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=45
) then I would highly recommend checking out the EFX examples (with source
code) and running the EFX10Show application (in the \Samples\bin folder).
The EFX10Show application has a graphical interface that allows you to
experiment with generating Auxiliary Effect Slots, loading Effects into
those Slots, and configuring Sources to feed them. The application does
hide some implementation details (e.g when you are adjusting an Effect
parameter, EFX10Show is actually changing the parameter of an Effect object
and the immediately re-attaching that Effect to the Auxiliary Effect Slot)
but I think it is still useful to see how the objects are related.
Dan
More information about the Openal
mailing list