What attributes are retrieved with ALC_ALL_ATTRIBUTES?
Troy Watson <[email protected]> Tue, 8 Jan 2013 18:35:46 +1000
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <CAFGK7-GTj1w1bhSxnOuHrAf2vtZxDM7=mNMrxMy+UhWjBW9wsw@mail.gmail.com> |
--===============1982912287== Content-Type: multipart/alternative; boundary=f46d04447fb10e8a9404d2c2d5cc --f46d04447fb10e8a9404d2c2d5cc Content-Type: text/plain; charset=ISO-8859-1 Table 6.1 in the spec lists five attributes used in context creation: ALC_FREQUENCY, ALC_REFRESH, ALC_SYNC, ALC_MONO_SOURCES and ALC_STEREO_SOURCES. However, after context creation there appears to be one extra attribute you can query for: // Size of the array required to hold the key/value pairs plus terminating 0 ALCint attributes_size; alcGetIntegerv( device, ALC_ATTRIBUTES_SIZE, 1, &attributes_size ); std::vector< ALCint > attributes( attributes_size ); alcGetIntegerv( device, ALC_ALL_ATTRIBUTES, attributes_size, &attributes[ 0 ] ); On my OpenAL Soft 1.14 install attributes_size is 13 which implies room for six attribute key/value pairs, plus the terminating zero. What (if any) is the sixth attribute returned by ALC_ALL_ATTRIBUTES? Iterating over the values returned, it seems there probably isn't one as the values for the sixth are always random, but I just want to be sure I'm not missing something. Thanks! --f46d04447fb10e8a9404d2c2d5cc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Table 6.1 in the spec lists five attributes used in c= ontext creation:=A0ALC_FREQUENCY, ALC_REFRESH, ALC_SYNC, ALC_MONO_SOURCES a= nd ALC_STEREO_SOURCES.<br></div><div><br></div><div>However, after context = creation there appears to be one extra attribute you can query for:</div> <div><br></div><div>// Size of the array required to hold the key/value pai= rs plus terminating 0</div><div>ALCint attributes_size;</div><div>alcGetInt= egerv( device, ALC_ATTRIBUTES_SIZE, 1, &attributes_size );</div><div> <div>std::vector< ALCint > attributes( attributes_size );</div><div>a= lcGetIntegerv( device, ALC_ALL_ATTRIBUTES, attributes_size, &attributes= [ 0 ] );</div></div><div><br></div><div>On my OpenAL Soft 1.14 install attr= ibutes_size is 13 which implies room for six attribute key/value pairs, plu= s the terminating zero.<br> </div><div><br></div><div>What (if any) is the sixth attribute returned by = ALC_ALL_ATTRIBUTES? Iterating over the values returned, it seems there prob= ably isn't one as the values for the sixth are always random, but I jus= t want to be sure I'm not missing something.</div> <div><br></div><div>Thanks!</div></div> --f46d04447fb10e8a9404d2c2d5cc-- --===============1982912287== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal --===============1982912287==--