Re: [linux-audio-dev] EVO event handling proposal ...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] EVO event handling proposal ...
From: David Olofson (david_AT_gardena.net)
Date: Fri Jul 21 2000 - 19:45:54 EEST


On Fri, 21 Jul 2000, Benno Senoner wrote:
> now , let's say the audio rendering routine does the following:
>
>
>
> for each sample {
>
> if(--next_event_numsamples <= 0) {
>
> -call the all parameter handling functions (most of time this will be only
> one, except when more than one event occurs within the same sample)
> - this will in the case of the volume parameter , load the new volume
> envelope table (curr_value, delta)
>
> -fow for each parameter check what the next occurring event will be
> set next_event_numsamples and the function ponter array accodingly
> }
>
> calculate new sample and and write result to output buffer
>
> }

Another version (similar to the standard way MuCoS plugins would
work, although they don't need samples_to_end):

        samples_to_end = buffer_size;
        fix samples_to_event from previous run;

         while(samples_to_end)
        {
                samples_to_end -= samples_to_event;

                while(samples_to_event--)
                        calculate new sample;

                if(samples_to_end)
                {
                        do event handling;
                        set up samples_to_event;
                }
        }

This gets rid of the double loop counter effect, and should cover the
special cases "no events within this frame" and "no samples to
process before first event", unless I'm exceptionally sloppy
today... :-) It also makes optimization through array operations
(SIMD) slightly easier, since the inner DSP loop is doing nothing
but actual signal processing.

//David

.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jul 21 2000 - 21:17:15 EEST