// Project player: picks the audio source for AES67 TX (test tone, silence, HLS, Spotify). #pragma once #include #include #include "cJSON.h" #include "esp_err.h" typedef enum { PLAYER_SRC_TONE, PLAYER_SRC_OFF, PLAYER_SRC_HLS, PLAYER_SRC_SPOTIFY } player_src_t; esp_err_t player_init(void); // Apply the "source" config group (mode etc.). void player_apply(const cJSON *source); // Source side: write 48 kHz stereo int32 frames, blocking while the ring is full. // Frames from a source that is not the active one are dropped (returns n). size_t player_write(player_src_t src, const int32_t *frames, size_t n);