[Openal] 2D and 3D

Sven Panne Sven.Panne at BenQ.com
Thu Oct 5 04:47:21 PDT 2006


> -----Original Message-----
> From: openal-bounces at opensource.creative.com 
> [mailto:openal-bounces at opensource.creative.com] On Behalf Of 
> Flavio Oliveira
> Sent: Mittwoch, 4. Oktober 2006 15:16
> To: garinh at cheesetoast.net
> Cc: openal at opensource.creative.com
> Subject: Re: [Openal] 2D and 3D
> 
> Hm, easy! Thanks!
> 
> If I understood to play 5.1 audio, I just need to check if 
> the implementation supports multi-channel formats, and 
> nothing more! I can have one source and 2 buffers, i.e. It 
> doesn't matter! Right?
> 
> I.E:
> 
> eBufferFormat = alGetEnumValue("AL_FORMAT_51CHN16");
> if (!eBufferFormat) {
>   return NOT_SUPPORTED;
> }

This is not guaranteed to work, because it can give false positives. In
general: alGetEnumValue and alGetProcAddress might return a non-0/NULL
value, even if the related extension is not present. The only correct
way to check for an extension is (not surprisingly :-)
alIsExtensionPresent. The same holds for the corresponding alc API
entries. This is at least my interpretation of the spec...

Cheers,
   S.



More information about the Openal mailing list