logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Format Ambiguities in OAL: msg#00047

Subject: Format Ambiguities in OAL
So OAL defines the following format constants for the format of the buffers it uses:
#define AL_FORMAT_MONO8                          0x1100
#define AL_FORMAT_MONO16                         0x1101
#define AL_FORMAT_STEREO8                        0x1102
#define AL_FORMAT_STEREO16                       0x1103

The endianess of the 16bit formats are not defined, and we can only surmise that the assumption for the implementation is that the endian- ness is native endian.

Now, the problem of course is that up until now, this has also meant - Windows, little endian: Mac, big endian: Linux/Play Station/etc...

So, the first thing I wanted to make sure is that we are correct to continue to assume that these are native endian to the execution environment.

Secondly, we also wanted to raise this to this list, as we can imagine code that might look like this (this is in the context of any utility code, like alut, that is being used to read data from files into the OAL Buffers for OAL to render).

#if TARGET_OS_MAC
        // convert to big endian
#elif TARGET_OS_WIN
        // convert to little endian
#elif
        //....
#endif

When really the code needs to be at a lower level of discrimination:

#if TARGET_CPU_PPC
        // convert to big endian
#elif TARGET_CPU_X86
        // convert to little endian
#elif
        ...
#endif

We'll be updating the developer branch of OAL's X sources to reflect these changes (both the utility and main code) shortly.

Thanks

Bill

--
mailto:bills@xxxxxxxxx
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


<Prev in Thread] Current Thread [Next in Thread>