[LAD] SDL_mixer+LADSPA was:basic in-game audio synthesis api?
james at jwm-art.net
Mon Apr 6 15:44:37 UTC 2009
My experiment so far has yielded a WAV played via SDL_mixer and by
registering a callback through Mix_RegisterEffect it is processed by the
following LADSPA filters: 4x4allpass and Gverb.
There might be some problems here though so I am asking if anybody can
advise upon using SDL for audio.
The problems with SDL_mixer are as follows:
1) The callback registered with Mix_RegisterEffect has a len parameter
which is the length of the stream passed to the callback. It's value
however seems mysteriously derived and it would be helpful to know in
advance, it's precise value or expected ranges so I can create the IO
buffers for the LADSPA effects only as large as they need be (rather
than excessively large) before the fx call back is registered. ( is it
always 1880 samples? )
2) Currently, I have a mono stream (i think, not entirely sure) and it
goes to the FX callback, processed by 4x4allpass, and then by Gverb. I
discard one of the output channels from Gverb because, what else can I
do with it? Nothing AFAICT. (No buses :( )
Are there solutions to this while still using SDL_mixer? Or should I
write a custom mixer, (probably start coding from David Olofson's
On 3/4/2009, "Paul Davis" <paul at linuxaudiosystems.com> wrote:
>On Fri, Apr 3, 2009 at 6:13 PM, james morris <james at jwm-art.net> wrote:
>> Allowing the game to connect to JACK, and using LADSPA plugins for the
>> effects was just one option I thought of, but it would be a little
>> unusual for a game. But still, it might be interesting to try.
>i wasn't suggesting JACK. just ladspa.
More information about the Linux-audio-dev