[SDL] How does SDL sound operate?

Sam Lantinga slouken at devolution.com
Tue Apr 11 18:56:33 PDT 2000


> Hi,
> 	Still hacking away at this audio application...it was taking
> absurd amounts of CPU, until someone recommended that I run the EsounD esd
> program. Now it takes much, much less CPU. Usually. At first, I thought I
> had to have esd installed and running in order to install SDL; was I
> wrong? Is SDL able to fall back on, say, OSS drivers?

SDL is using the OSS drivers, but it sounds like they are broken with your
sound card..

SDL runs a thread in a loop that calls select on the /dev/dsp file descriptor,
and calls your callback when data is ready for writing.  To make this happen
with the minimum latency, SDL does a bunch of tricks in the driver.  See
SDL_dspaudio.c for details.

See ya!
	-Sam Lantinga, Lead Programmer, Loki Entertainment Software



More information about the SDL mailing list