Mercurial > sdl-ios-xcode
diff src/audio/esd/SDL_esdaudio.c @ 3803:3decf9cdeb63 SDL-ryan-multiple-audio-device
Removed ESD cruft from the core...now the driver will use esound if there's
an ESPEAKER variable set for a remote host, or the daemon is already running
on the local host, but it won't spawn it. Hopefully this works out okay.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 04 Oct 2006 22:10:09 +0000 |
parents | c8b3d3d13ed1 |
children | 7852b5b78af5 |
line wrap: on
line diff
--- a/src/audio/esd/SDL_esdaudio.c Wed Oct 04 21:58:48 2006 +0000 +++ b/src/audio/esd/SDL_esdaudio.c Wed Oct 04 22:10:09 2006 +0000 @@ -126,10 +126,14 @@ static int Audio_Available(void) { - int connection; - int available; + const char *esd_no_spawn = SDL_getenv("ESD_NO_SPAWN"); + int connection = 0; + int available = 0; - available = 0; + if (esd_no_spawn == NULL) { + SDL_putenv("ESD_NO_SPAWN=1"); /* Don't start ESD if it's not running */ + } + if (LoadESDLibrary() < 0) { return available; } @@ -139,7 +143,7 @@ SDL_NAME(esd_close) (connection); } UnloadESDLibrary(); - return (available); + return available; } static void