3ebb27e4bb
- decoder: s16 PCM -> stereo int32 -> esp_ae_rate_cvt 44.1 -> 48 kHz (32-bit, complexity 3; bypassed at 48 kHz; mono duplicated) -> ring. esp_audio_effects pinned to ~1.3.0 (1.4+ needs P4 rev >= 3). - hls: each segment is downloaded completely into PSRAM (max 4 MB), then decoded; the connection is not held open while the decoder waits for ring space at playback speed. - player: player_write() blocks while the ring is full and gives up when the source changes; the temporary 440 Hz producer is removed. - Verified with Triple J Hottest: 441344 -> 480375 frames (10.008 s) and 440320 -> 479260 (9.985 s) per segment; RTP 15000 packets, 0 gaps, peak -10 dBFS / RMS -22 dBFS; ring ~4.0 s, 0 underruns over ~50 s; heap 422 KB, PSRAM 27.5 MB free. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
441 B
C
15 lines
441 B
C
// Project player: picks the audio source for AES67 TX (test tone, silence, HLS, Spotify).
|
|
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#include "cJSON.h"
|
|
#include "esp_err.h"
|
|
|
|
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.
|
|
size_t player_write(const int32_t *frames, size_t n);
|