[SDL] callback issue

chris.2.dobbs at bt.com chris.2.dobbs at bt.com
Tue May 1 01:37:35 PDT 2007


Yes, that did it, I have crystal clear playback now!
As I said earilier this callback looks in two sources for playback data,
one contains captured microphone input, the other data received via
network; Both are not present all the time so do I need to call
SDL_MixAudio() if both are present? Or just memcpy both if and when they
are present?

Like this:

Got buff_A data?
        memcpy(stream...
Got buff_B data?
        memcpy (stream...

Regards,
-Chris

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org]
On Behalf Of Ryan C. Gordon
Sent: 30 April 2007 21:19
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] callback issue


> Call SDL_MixAudio(stream, (const Uint8*)data_p, len, 
> SDL_MIX_MAXVOLUME)

Don't do that...currently the stream is always silence (so you don't
have to mix against it, just memcpy), but since you're expected to
completely fill the stream (with silence if nothing else), we're
probably going to stop initializing the buffer before calling your
callback...in which case you'd be mixing against random noise.

--ryan.

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


More information about the SDL mailing list