[Openal] [openAl Soft] alGetString returning NULL pointer?
Chris Robinson
chris.kcat at gmail.com
Sun May 18 14:34:49 PDT 2008
On Sunday 18 May 2008 06:22:34 am Andre Krause wrote:
> but i thought that alGetString shall return a description for every
> possible error number.
> so if the error is "no valid context" - why not spit out a message instead
> of a NULL pointer ?
Because there is no error code for "invalid context" that you can pass to
alGetString. The closest is AL_INVALID_OPERATION, but it wouldn't make sense
to return the string for that if the app passed, say, AL_NO_ERROR.
If there's no valid context, alGetString needs to fail. And if alGetString
fails, it returns NULL.
More information about the Openal
mailing list