Re: [AD] mixers gone?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Apr 28, 2008 at 2:13 AM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
On Apr 28, 2008, at 10:37 AM, Ryan Dickie wrote:
> Well the mixer never seemed to work right for downmixing high
> channels to low channels (like a 7.1 channel to 2 channel sample)
> or converting between certain sample depths.
>
> I didn't see any other use for it. Maybe someone could enlighten me.

As a general point of policy, shouldn't things like that be at least
announced or mentioned for general discussion on the mailing list
before they are commited to SVN?
I was mildly surprised at the log message as  well, then again I
haven't always followed the discussion in great detail for the past
few weeks, so I could have missed it.

Evert



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers

Hmm, sorry. I guess I got a bit carried away trying to refactor in order to make things more manageable.

I was on #allegro-dev and I found out the 'mixer' was meant to be more of a 'filter' system where people could do fancy audio effects processing. I could add something like what i describe below.

Each voice has an attached sample. Each voice could also have a set of attached 'filters'. We could do something like this:

//generate kernels based on sample properties like depth, frequency, etc.
//a small set of stock kernels, users will obviously have to make their own to do custom effects
void* kernel1 = al_filter_make_kernel(AL_SAMPLE* spl, ALLEGRO_GAUSSIAN_KERNEL);
...
//adding a filter simply convolves the kernels always yielding a single kernel
//this single kernel will be convolved with the sound sample when it is time
// f * (g * h) = ( f * g ) * h
// scalar a for amplification/attentuation can be factored in as well.
al_voice_add_filter( void* kernel1, int len );
al_voice_add_filter( void* kernel2, int len );
al_voice_clear_filters();
...

The voice will apply the filters as needed. This will be done before it is 'loaded' into the sound buffer for both samples and streams.

I hope this solution is both simple and effective for users and simple for US to code and maintain.

--ryan


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/