[SDL] SDL[audio]:XAudio2: XAudio2Create() failed at initialization

Jonathan Dearborn grimfang4 at gmail.com
Sun Sep 14 09:36:03 PDT 2014


All SDL functions that set error messages have a way to signal that an
error has occured (e.g. returning a NULL pointer or non-zero int).

So you should not be calling SDL_GetError() just to see if an error has
occurred.  Call it to get more info for an error that you've already
detected.

If you really do want to use SDL_GetError() to detect errors, you must call
SDL_ClearError() to reset the error status before you make the calls that
might generate the errors.

See:
https://wiki.libsdl.org/SDL_GetError

Jonny D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140914/0344810f/attachment-0002.htm>


More information about the SDL mailing list