MPD: AudioFormat.hxx File Reference

MPD 0.20.18

Data Structures | Functions | Variables
AudioFormat.hxx File Reference
`#include "pcm/SampleFormat.hxx"`
`#include "Compiler.h"`
`#include <assert.h>`
`#include <stdint.h>`
`#include <stddef.h>`
Include dependency graph for AudioFormat.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
class | StringBuffer< CAPACITY >
struct | AudioFormat
| This structure describes the format of a raw PCM stream. More...

## Functions
static constexpr bool | audio_valid_sample_rate (unsigned sample_rate)
| Checks whether the sample rate is valid. More...
static constexpr bool | audio_valid_channel_count (unsigned channels)
| Checks whether the number of channels is valid. More...
gcc_const StringBuffer< 24 > | ToString (AudioFormat af) noexcept
| Renders the AudioFormat object into a string, e.g. More...

## Variables
static constexpr unsigned | MAX_CHANNELS = 8

## Function Documentation

## ◆ audio_valid_channel_count()

static constexpr bool audio_valid_channel_count | ( | unsigned | channels | ) |
| inlinestatic

Checks whether the number of channels is valid.

Definition at line 168 of file AudioFormat.hxx.

## ◆ audio_valid_sample_rate()

static constexpr bool audio_valid_sample_rate | ( | unsigned | sample_rate | ) |
| inlinestatic

Checks whether the sample rate is valid.

Parameters

  sample_rate | the sample rate in Hz

Definition at line 159 of file AudioFormat.hxx.

## ◆ ToString()

gcc_const StringBuffer<24> ToString | ( | AudioFormat | af | ) |
| noexcept

Renders the AudioFormat object into a string, e.g.

for printing it in a log file.

Parameters

  af | the AudioFormat object

Returns
  the string buffer

## Variable Documentation

## ◆ MAX_CHANNELS

constexpr unsigned MAX_CHANNELS = 8
| static

Definition at line 32 of file AudioFormat.hxx.