The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Re: Audio Engine question
Denis
Guest

Ryan C. Gordon <icculus <at> icculus.org> writes:

Quote:


Quote:
What would be the advice of the experts ? Is SDL up the part ? Since I am
doing all processing & mixing myself, all I need it the ability to queue
buffers (preferably of variable sizes) and know which buffer is currently
played...

You can't know in the SDL API, but you can estimate fairly well, based
on how often the callback is triggered and how much you are feeding it
per callback iteration.

SDL should be using DirectSound by default, though (and waveout as a
fallback).

--ryan.



I got pretty much the same problem as I wanted to do
MIDI playback (which works) and in another thread I
tried to do a graphic equilyzer, that is updated every 20 ms
or so.

I also use the raw audio playback function, but unfortunately on
some computers it requests about 16000 bytes per call @ 16 kHz,
on other systems it only requests 4000 samples or even only 2048
(so the buffersize that you can set at initialisation does not
work on all computers with all cards).

I wonder if the number of audio blocks that is send to the audio
driver via the callback function before you hear anything in the
lsp is also dependend on the hardware/driver below SDL, does
anybody know that?

/BR

(Denis)

-----