MPD  0.20.6
Enumerations | Functions
SampleFormat.hxx File Reference
#include "Compiler.h"
#include <stdint.h>
Include dependency graph for SampleFormat.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  SampleFormat : uint8_t {
  SampleFormat::UNDEFINED = 0, SampleFormat::S8, SampleFormat::S16, SampleFormat::S24_P32,
  SampleFormat::S32, SampleFormat::FLOAT, SampleFormat::DSD
}
 

Functions

static constexpr bool audio_valid_sample_format (SampleFormat format)
 Checks whether the sample format is valid. More...
 
static constexpr unsigned sample_format_size (SampleFormat format)
 
gcc_pure gcc_malloc const char * sample_format_to_string (SampleFormat format)
 Renders a SampleFormat enum into a string, e.g. More...
 

Enumeration Type Documentation

enum SampleFormat : uint8_t
strong
Enumerator
UNDEFINED 
S8 
S16 
S24_P32 

Signed 24 bit integer samples, packed in 32 bit integers (the most significant byte is filled with the sign bit).

S32 
FLOAT 

32 bit floating point samples in the host's format.

The range is -1.0f to +1.0f.

DSD 

Direct Stream Digital.

1-bit samples; each frame has one byte (8 samples) per channel.

Definition at line 33 of file SampleFormat.hxx.

Function Documentation

static constexpr bool audio_valid_sample_format ( SampleFormat  format)
inlinestatic

Checks whether the sample format is valid.

Definition at line 71 of file SampleFormat.hxx.

static constexpr unsigned sample_format_size ( SampleFormat  format)
inlinestatic

Definition at line 93 of file SampleFormat.hxx.

gcc_pure gcc_malloc const char* sample_format_to_string ( SampleFormat  format)

Renders a SampleFormat enum into a string, e.g.

for printing it in a log file.

Parameters
formata SampleFormat enum value
Returns
the string