Audio sample formats
The bit layout of the audio data.
LE = Little Endian, BE = Big Endian, NE = Native Endian
For planar sample formats, each audio channel is in a separate data plane, and linesize is the buffer size, in bytes, for a single plane. All data planes must be the same size. For packed sample formats, only the first data plane is used, and samples for each channel are interleaved. In this case, linesize is the buffer size, in bytes, for the 1 plane.
- Note
- This is ordered from the worst to best preferred formats
Usage example:
◆ AudioEngineDataFormat
Enumerator |
---|
AUDIOENGINE_FMT_INVALID | To define format as invalid.
|
AUDIOENGINE_FMT_U8 | Unsigned integer 8 bit.
|
AUDIOENGINE_FMT_S16BE | Big Endian signed integer 16 bit.
|
AUDIOENGINE_FMT_S16LE | Little Endian signed integer 16 bit.
|
AUDIOENGINE_FMT_S16NE | Native Endian signed integer 16 bit.
|
AUDIOENGINE_FMT_S32BE | Big Endian signed integer 32 bit.
|
AUDIOENGINE_FMT_S32LE | Little Endian signed integer 32 bit.
|
AUDIOENGINE_FMT_S32NE | Native Endian signed integer 32 bit.
|
AUDIOENGINE_FMT_S24BE4 | Big Endian signed integer 24 bit (in 4 bytes)
|
AUDIOENGINE_FMT_S24LE4 | Little Endian signed integer 24 bit (in 4 bytes)
|
AUDIOENGINE_FMT_S24NE4 | Native Endian signed integer 24 bit (in 4 bytes)
|
AUDIOENGINE_FMT_S24NE4MSB | S32 with bits_per_sample < 32.
|
AUDIOENGINE_FMT_S24BE3 | Big Endian signed integer 24 bit (3 bytes)
|
AUDIOENGINE_FMT_S24LE3 | Little Endian signed integer 24 bit (3 bytes)
|
AUDIOENGINE_FMT_S24NE3 | Native Endian signed integer 24 bit (3 bytes)
|
AUDIOENGINE_FMT_DOUBLE | Double floating point.
|
AUDIOENGINE_FMT_FLOAT | Floating point.
|
AUDIOENGINE_FMT_RAW | Bitstream
RAW Audio format
|
AUDIOENGINE_FMT_U8P | Planar format
Unsigned byte
|
AUDIOENGINE_FMT_S16NEP | Planar format
Native Endian signed 16 bit
|
AUDIOENGINE_FMT_S32NEP | Planar format
Native Endian signed 32 bit
|
AUDIOENGINE_FMT_S24NE4P | Planar format
Native Endian signed integer 24 bit (in 4 bytes)
|
AUDIOENGINE_FMT_S24NE4MSBP | Planar format
S32 with bits_per_sample < 32
|
AUDIOENGINE_FMT_S24NE3P | Planar format
Native Endian signed integer 24 bit (in 3 bytes)
|
AUDIOENGINE_FMT_DOUBLEP | Planar format
Double floating point
|
AUDIOENGINE_FMT_FLOATP | Planar format
Floating point
|
AUDIOENGINE_FMT_MAX | Amount of sample formats.
|