MPD
Data Fields
audio_format Struct Reference

This structure describes the format of a raw PCM stream. More...

#include <audio_format.h>

Data Fields

uint32_t sample_rate
 The sample rate in Hz.
 
uint8_t format
 The format samples are stored in.
 
uint8_t channels
 The number of channels.
 
uint8_t reverse_endian
 If zero, then samples are stored in host byte order.
 

Detailed Description

This structure describes the format of a raw PCM stream.

Definition at line 50 of file audio_format.h.

Field Documentation

uint8_t audio_format::channels

The number of channels.

Only mono (1) and stereo (2) are fully supported currently.

Definition at line 68 of file audio_format.h.

uint8_t audio_format::format

The format samples are stored in.

See the sample_format enum for valid values.

Definition at line 62 of file audio_format.h.

uint8_t audio_format::reverse_endian

If zero, then samples are stored in host byte order.

If nonzero, then samples are stored in the reverse host byte order.

Definition at line 75 of file audio_format.h.

uint32_t audio_format::sample_rate

The sample rate in Hz.

A better name for this attribute is "frame rate", because technically, you have two samples per frame in stereo sound.

Definition at line 56 of file audio_format.h.


The documentation for this struct was generated from the following file: