SDL_Init

Gents,
Can I expect SDL_Init() to return an error code if I try to execute this on a machine which has NO audio devices attached?
I ran my stuff on a linux box that has no /dev/sdp device and SDL_Init(SDL_AUDIO) seemed to return a good status (0); the program failed later when it tried to open the audio device but I would have thought the initialise should have caulked first…?
-Chris

Chris Dobbs wrote:

Gents,
Can I expect SDL_Init() to return an error code if I try to execute this
on a machine which has NO audio devices attached?
I ran my stuff on a linux box that has no /dev/sdp device and
SDL_Init(SDL_AUDIO) seemed to return a good status (0); the program
failed later when it tried to open the audio device but I would have
thought the initialise should have caulked first…?

Is it possible that SDL found an arts or esound daemon that accepts
connections but can’t actually play sound?

–ryan.

Bingo ! - that’s what it is , removed them and SDL_Init() fails as
expected.
I tried it also on a win32 box with no sound card and SDL_Init() failed .
I’m Happy now.
Many thanks for reply
-Chris> ----- Original Message -----

From: icculus@icculus.org (icculus)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Friday, March 02, 2007 11:55 PM
Subject: Re: [SDL] SDL_Init

Chris Dobbs wrote:

Gents,
Can I expect SDL_Init() to return an error code if I try to execute this
on a machine which has NO audio devices attached?
I ran my stuff on a linux box that has no /dev/sdp device and
SDL_Init(SDL_AUDIO) seemed to return a good status (0); the program
failed later when it tried to open the audio device but I would have
thought the initialise should have caulked first…?

Is it possible that SDL found an arts or esound daemon that accepts
connections but can’t actually play sound?

–ryan.


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