Reggae common formats
From MorphOS Library
Grzegorz Kraszewski
Reggae common format or basic media format is the final result of media decoding, also intermediate format for processing (with filters) and input format for encoding and multiplexing. These formats are just raw PCM samples for audio and raw ARGB pixels for video. Stream description, like number of audio channels or video dimensions, are provided via attributes.
Audio common formats
All audio common formats are streams of linear PCM samples. Multichannel streams are interleaved. Stereo streams are intereleaved in [left, right] order. Interleaving for more channels is not yet defined. There are three sample formats defined:
- MMFC_AUDIO_INT16 - the most common format, samples are 16-bit signed integers. Best for realtime processing targetted at audio.output.
- MMFC_AUDIO_INT32 - very high quality, but slow processing. 32-bit signed integers. May be useful for non-realtime processing. Note that some filters may not support it.
- MMFC_AUDIO_FLOAT32 - some compromise between the two above. Samples are single precision IEEE 754 floats with range normalized to <−1.0, +1.0>. Using floats makes avoiding internal overflow easier, but rounding errors may be dangerous.