6#define SF3_FORMAT_ID_AUDIO 0x02
56 return audio->
format & 0x0F;
88 default:
return "Unknown";
sf3_audio_format
The possible audio sample formats.
@ SF3_SAMPLE_FLOAT64
The audio is stored as 64-bit IEEE double-precision floats.
@ SF3_SAMPLE_UINT16
The audio is stored as 16-bit unsigned PCM.
@ SF3_SAMPLE_INT32
The audio is stored as 32-bit signed PCM.
@ SF3_SAMPLE_ALAW
The audio is stored as bytes encoded in the "A-law" scheme.
@ SF3_SAMPLE_FLOAT16
The audio is stored as 16-bit IEEE half-precision floats.
@ SF3_SAMPLE_UINT64
The audio is stored as 64-bit unsigned PCM.
@ SF3_SAMPLE_INT64
The audio is stored as 64-bit signed PCM.
@ SF3_SAMPLE_INT16
The audio is stored as 16-bit signed PCM.
@ SF3_SAMPLE_FLOAT32
The audio is stored as 32-bit IEEE single-precision floats.
@ SF3_SAMPLE_UINT32
The audio is stored as 32-bit unsigned PCM.
@ SF3_SAMPLE_ULAW
The audio is stored as bytes encoded in the "u-law" scheme.
SF3_INLINE int sf3_audio_frame_size(const struct sf3_audio *audio)
Returns the number of bytes per audio frame.
SF3_INLINE float sf3_audio_duration(const struct sf3_audio *audio)
Returns the duration of the audio data in seconds.
SF3_INLINE int sf3_audio_sample_count(const struct sf3_audio *audio)
Returns the total number of samples of audio stored.
SF3_EXPORT size_t sf3_audio_size(const struct sf3_audio *audio)
Computes the size of the audio file in bytes.
SF3_INLINE int sf3_audio_sample_size(const struct sf3_audio *audio)
Returns the number of bytes per audio sample.
uint32_t samplerate
The samplerate of the audio in Hertz.
uint8_t channels
The number of audio channels per audio frame.
uint64_t frame_count
The total number of audio frames stored.
The basic header structure of every SF3 file.