41 int32_t (*
write)(audio_sink_t *s,
const int32_t *pcm, uint32_t frames, uint32_t timeout_ms);
42 void (*
pause)(audio_sink_t *s,
bool paused);
47 void (*
describe)(audio_sink_t *s,
char *out,
size_t out_size);
Audio formats and PCM conventions.
@ SINK_CAP_HW_VOLUME
set_volume_db works; DSP software volume stays off
Definition sink.h:18
@ SINK_CAP_DOP
accepts DoP frames
Definition sink.h:19
@ SINK_CAP_BITPERFECT
Passes the Q31 samples unchanged (at least their top 24 bits, e.g.
Definition sink.h:22
@ SINK_CAP_RATE_SWITCH
can change sample rate between tracks
Definition sink.h:23
@ SINK_CAP_DITHERS
the sink reduces Q31 to its bit depth with its own TPDF dither
Definition sink.h:24
void(* pause)(audio_sink_t *s, bool paused)
pause output without dropping data
Definition sink.h:42
void(* close)(audio_sink_t *s)
Definition sink.h:48
int(* set_volume_db)(audio_sink_t *s, float db)
hardware volume; -1 if unsupported
Definition sink.h:44
uint32_t caps
Definition sink.h:31
int32_t(* write)(audio_sink_t *s, const int32_t *pcm, uint32_t frames, uint32_t timeout_ms)
Write interleaved Q31 frames.
Definition sink.h:41
const char * name
"wired", "bluetooth", "null", "wav"
Definition sink.h:30
uint32_t(* buffered_frames)(audio_sink_t *s)
queued but not yet played
Definition sink.h:45
int(* open)(audio_sink_t *s, const audio_format_t *fmt)
Start or reconfigure for fmt. May mute and block briefly (clock switch).
Definition sink.h:38
void(* flush)(audio_sink_t *s)
drop queued audio (seek, skip)
Definition sink.h:43
int(* negotiate)(audio_sink_t *s, const audio_format_t *src, audio_format_t *out)
Given the decoded format, fill *out with the format the sink will accept.
Definition sink.h:36
void(* describe)(audio_sink_t *s, char *out, size_t out_size)
Human-readable detail for the status bar, e.g. "SBC-XQ 452 kbps" or "PCM5102A".
Definition sink.h:47
void * ctx
Definition sink.h:32