Signal processing and SDL

Hello all,

I would like to use the SDL library for audio signal processing … more
specificly I would like to incorperate WSOLA and SDL to make an audio
speed change library.

OK … so I am wondering whether anyone knows of any examples which have
the following properties :
a] an init function
b] a play CALLBACK function which :
loads data from an audio file
signal processes the data
writes the new processed data to the sound device.

It is important that the play function gets called from an SDL operated
thread when need be to read a certain ammount of data for the sound
device to play …

thanks
Matt–
http://www.flatmax.org

Public Projects :
http://sourceforge.net/search/?type_of_search=soft&words=mffm

Matt Flax wrote:

Hello all,

I would like to use the SDL library for audio signal processing … more
specificly I would like to incorperate WSOLA
and SDL to make an audio
speed change library.

The current speed change code in SDL is no good at all, it would be nice
if you actually replaced it with something that worked for any ratio.>

OK … so I am wondering whether anyone knows of any examples which have
the following properties :
a] an init function
b] a play CALLBACK function which :
loads data from an audio file
signal processes the data
writes the new processed data to the sound device.

It is important that the play function gets called from an SDL operated
thread when need be to read a certain ammount of data for the sound
device to play …

thanks
Matt


Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:@Michel_Bardiaux

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/

Hi,

I have thought of another way to describe the example I am after …
for all the video heads out there, think of how you would sync. your
video frames to the audio clock.

Something like a thread capable library which synchronises callback
operation on the sound card clock.

In other words,

  • a method to interface to SDL audio using multiple buffers (totalling
    to a delay of about maximum 40 ms).
  • each buffer requests filling through the user specified callback.

the buffer could be an audio block, a video frame, or perhaps both ?

It must have already been done … perhaps for video too ???

Any geeks freaked with et ?

MattOn Thu, Sep 01, 2005 at 03:34:29PM +1000, Matt Flax wrote:

Hello all,

I would like to use the SDL library for audio signal processing … more
specificly I would like to incorperate WSOLA and SDL to make an audio
speed change library.

OK … so I am wondering whether anyone knows of any examples which have
the following properties :
a] an init function
b] a play CALLBACK function which :
loads data from an audio file
signal processes the data
writes the new processed data to the sound device.

It is important that the play function gets called from an SDL operated
thread when need be to read a certain ammount of data for the sound
device to play …

thanks
Matt


http://www.flatmax.org

Public Projects :
http://sourceforge.net/search/?type_of_search=soft&words=mffm


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


http://www.flatmax.org

Public Projects :
http://sourceforge.net/search/?type_of_search=soft&words=mffm

So audio all happens through :
SDL_AudioSpec->callback

Nice ! Callout to callback.

I have now found the example :
http://www.libsdl.org/cgi/docwiki.cgi/Audio_20Examples?action=highlight&value=SDL_AudioSpec

/* Our callback function */
desired->callback=example_mixaudio;

I guess that ‘SDL_PauseAudio(0);’ waits for all audio to stop playing or
somethign ?

MAttOn Thu, Sep 01, 2005 at 09:02:43PM +1000, Matt Flax wrote:

Hi,

I have thought of another way to describe the example I am after …
for all the video heads out there, think of how you would sync. your
video frames to the audio clock.

Something like a thread capable library which synchronises callback
operation on the sound card clock.

In other words,

  • a method to interface to SDL audio using multiple buffers (totalling
    to a delay of about maximum 40 ms).
  • each buffer requests filling through the user specified callback.

the buffer could be an audio block, a video frame, or perhaps both ?

It must have already been done … perhaps for video too ???

Any geeks freaked with et ?

Matt

On Thu, Sep 01, 2005 at 03:34:29PM +1000, Matt Flax wrote:

Hello all,

I would like to use the SDL library for audio signal processing … more
specificly I would like to incorperate WSOLA and SDL to make an audio
speed change library.

OK … so I am wondering whether anyone knows of any examples which have
the following properties :
a] an init function
b] a play CALLBACK function which :
loads data from an audio file
signal processes the data
writes the new processed data to the sound device.

It is important that the play function gets called from an SDL operated
thread when need be to read a certain ammount of data for the sound
device to play …

thanks
Matt


http://www.flatmax.org

Public Projects :
http://sourceforge.net/search/?type_of_search=soft&words=mffm


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


http://www.flatmax.org

Public Projects :
http://sourceforge.net/search/?type_of_search=soft&words=mffm


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


http://www.flatmax.org

Public Projects :
http://sourceforge.net/search/?type_of_search=soft&words=mffm