Open Sound System |
Do you have problems with sound/audio application development? Don't panic! Click here for help! |
AFMT_S16_NE is not a new sample format but just a convenience macro that is defined ad AFMT_S16_LE or AFMT_S16_BE depending on the endianess of the processor. It always maps to the native endianess of the system.
The AFMT_S16_NE format is the easiest sample format in all architectures because it always matches the native 16 bit integer (signed short). This is very comfortable because samples can always be handled as an array of short integers. Endianess is guaranteed to be correct and OSS will do the required byte swapping if its required.
AFMT_S16_NE is totally unsuitable to be used as a file or transport format of audio data. It must only be used for samples generated or used locally in the application. AFMT_S16_LE is the recommended external sample format for 16 bit audio data because it's the industry standard.