aes67_tx: mono sum; the source always delivers stereo
The pull callback's contract said "stream channels", but the player always delivers stereo, so a 1-channel stream went out as L,R,L,R at half speed. Sources now always deliver AES67_TX_SRC_CHANNELS (2); TX maps to the stream: 2 ch as is, 1 ch = (L+R)/2 in 64 bit with mono_sum (can't clip), else L. Checked: mono packets 156 B, 1000/s, 48 samples each, SDP L24/48000/1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
// Audio source: fill buf with frames x channels interleaved samples (full scale = INT32_MAX).
|
||||
// Audio source: fill buf with frames x AES67_TX_SRC_CHANNELS interleaved samples (stereo, full scale =
|
||||
// INT32_MAX), whatever the stream's channel count: TX maps it (mono stream: L, or (L+R)/2 with mono_sum).
|
||||
// Return the number of frames delivered; fewer than asked counts as an underrun (padded with silence).
|
||||
#define AES67_TX_SRC_CHANNELS 2
|
||||
typedef size_t (*aes67_tx_read_cb_t)(int32_t *buf, size_t frames);
|
||||
|
||||
// Registers the "aes67" config group and the TX status fields.
|
||||
|
||||
Reference in New Issue
Block a user