search for: gestaltpowerpcprocessorfeatures

Displaying 1 result from an estimated 1 matches for "gestaltpowerpcprocessorfeatures".

2003 Oct 12
1
Altivec-enabled libvorbis...
...t variable in a convenient place during initialization. Currently this variable exists in my AL implementation and not libvorbis. The code to detect an Altivec unit in MacOSX looks like this: #include <CoreServices/CoreServices.h> long cpufeature = 0; OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &cpufeature); if (err == noErr) { if ((1 << gestaltPowerPCHasVectorInstructions) & cpufeature) VectorUnitDetected = 1; } Using this code will need "-framework Carbon" on the gcc and ld commandline. Non-Mac platforms should already ha...