// PCM from a source (s16, any rate/channels) -> 48 kHz stereo int32 -> player ring. // One converter per source: each keeps its own resampler state. #pragma once #include #include #include "player.h" typedef struct audio_conv audio_conv_t; audio_conv_t *audio_conv_create(player_src_t src, const char *name); // Blocks while the ring is full; dropped when src is not the active source. // Returns the 48 kHz frames produced. size_t audio_conv_write(audio_conv_t *c, const int16_t *pcm, uint32_t frames, int channels, uint32_t rate);