Re: [LAD] SDL_mixer+LADSPA was:basic in-game audio synthesis api?

From: Justin Smith <noisesmith@email-addr-hidden>
Date: Mon Apr 06 2009 - 20:19:16 EEST

On Mon, Apr 6, 2009 at 9:20 AM, Luis Garrido
<luisgarrido@email-addr-hidden> wrote:
>> passed by SDL_mixer to my sfx processing callback. 1880 samples at
>> sample rate 44100 (halved for 22050). I'm trying to understand how this
>> figure is arrived at, and if I can rely on it (before any audio
>
> The buffer size you get from an audio backend is normally difficult to
> predict, and I wouldn't advice you to do so. Sometimes it may even
> depend on the hardware you are using, so it is not guaranteed that it
> will be the same on another machine. I don't know whether SDL
> encapsulates that for you, that would be more a question for SDL
> support.
>
> Most audio processing apps use ring buffers to account for that variability.
>
> Just use any value you think provides you with a reasonable latency.
> If you get more from the backend, just make several calls to the
> LADSPA, it shouldn't mean much overhead. If you get less, just process
> that bit or save it for the next iteration.
>
> L
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@email-addr-hidden
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
>

The output buffer is not your only audio buffer, what we are dealing
with here is the size of the LADSPA processing buffer. This is a
simple matter of sending data from one buffer to another, as suggested
above, using a ring buffer is you most likely solution.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Tue Apr 7 00:15:01 2009

This archive was generated by hypermail 2.1.8 : Tue Apr 07 2009 - 00:15:02 EEST