esp32-audio-player 0.1.0
Audio player engine for ESP32
Loading...
Searching...
No Matches
sink.h File Reference

Audio output interface. More...

Include dependency graph for sink.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  audio_sink_t
 

Enumerations

enum  {
  SINK_CAP_HW_VOLUME = 1u << 0 , SINK_CAP_DOP = 1u << 1 , SINK_CAP_BITPERFECT = 1u << 2 , SINK_CAP_RATE_SWITCH = 1u << 3 ,
  SINK_CAP_DITHERS = 1u << 4
}
 Output resolution. More...
 

Detailed Description

Audio output interface.

Implemented by the ESP32 port (I2S DAC, Bluetooth through esp32-a2dp-xq), by tests (memory/WAV writer) or by the application (any other output).

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Output resolution.

The negotiated bits describe the format for the bit-perfect check; the capabilities say how many bits of each Q31 sample really reach the DAC, which sets the DSP dither: SINK_CAP_DITHERS -> no DSP dither (Q31 out), SINK_CAP_BITPERFECT -> at least 24 bits, neither -> the negotiated bits.

Enumerator
SINK_CAP_HW_VOLUME 

set_volume_db works; DSP software volume stays off

SINK_CAP_DOP 

accepts DoP frames

SINK_CAP_BITPERFECT 

Passes the Q31 samples unchanged (at least their top 24 bits, e.g.

32-bit I2S slots) whatever the negotiated bits, so it is bit-perfect when the rates match.

SINK_CAP_RATE_SWITCH 

can change sample rate between tracks

SINK_CAP_DITHERS 

the sink reduces Q31 to its bit depth with its own TPDF dither