Bug 3777 - qalcGetString called with incorrect parameters
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Sound
Version: GIT MASTER
Hardware: PC Linux
: P3 minor
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2008-09-12 19:57 EDT by Ben Millwood
Modified: 2008-11-02 12:32:46 EST
0 users

See Also:


Attachments
specify alDevice instead of NULL (728 bytes, patch)
2008-09-12 20:20 EDT, Ben Millwood

Description Ben Millwood 2008-09-12 19:57:51 EDT
In S_AL_SoundInfo, the following line appears:

Com_Printf( "  ALC Extensions: %s\n", qalcGetString( NULL, ALC_EXTENSIONS ) );

In my copy of the OpenAL Programmer's Guide, no behaviour is specified for ALC_EXTENSIONS with a NULL device: on ubuntu I get nothing printed, on Mac I get (null). On the latter it is especially problematic as it triggers an error which is remembered and then erroneously reported as a failure much later on the first time a sound is registered (see bug 3776).

I'm not sure what actual value device should have in this case.
Comment 1 Ben Millwood 2008-09-12 20:20:20 EDT
Created attachment 1863 [details]
specify alDevice instead of NULL

It looks like alDevice points to the only device that is used, and passing it does seem to get an extension list on my mac. This ubuntu machine still doesn't print anything in the list, but it doesn't seem to think this is an error so I'm not going to complain (interestingly, the AL Extensions list includes ALC_EXT_capture, whereas on the Mac that's in the ALC Extenstions list... probably not important).

Very simple patch, then.
Comment 2 Ludwig Nussel 2008-11-02 12:32:46 EST
works fine with openal-soft but the patch doesn't seem to harm either. applied.