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

From: james morris <james@email-addr-hidden-art.net>
Date: Mon Apr 06 2009 - 18:44:37 EEST

Hi,

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
examples) ?

Regards,
James.

On 3/4/2009, "Paul Davis" <paul@email-addr-hidden> wrote:

>On Fri, Apr 3, 2009 at 6:13 PM, james morris <james@email-addr-hidden-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.
>
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Mon Apr 6 20:15:02 2009

This archive was generated by hypermail 2.1.8 : Mon Apr 06 2009 - 20:15:02 EEST