Fix ESP32 audio dropouts and improve streaming reliability
FLAC encoder now tracks frame numbers and reuses per-channel sample buffers to reduce allocations. Client dialer always frees the active slot on release so mDNS re-emissions can reconnect cleanly. Server send buffer uses drop-oldest instead of hard failure, with lateness tracking. Added engine stats logging (chunks/sec, kbps) and writer diagnostics. UI simplified to a single play/pause toggle that auto-starts playback on preset selection. Added --preset CLI flag for headless startup. Removed stale systemd service files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -186,9 +186,11 @@ func (m *Manager) SetActivePreset(id string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// On entry from off, default to paused; otherwise carry over.
|
||||
// On entry from off, auto-start playback so picking a preset is a
|
||||
// one-click action. Switching between presets carries over the
|
||||
// current playback state.
|
||||
if prev == "" {
|
||||
m.playback = Paused
|
||||
m.playback = Playing
|
||||
}
|
||||
|
||||
m.src.SetTarget(nextSource)
|
||||
|
||||
Reference in New Issue
Block a user