Refactor audio pipeline for multi-client streaming and improved error handling

Refactor the audio pipeline to support multi-client streaming with new OggFlacStreamHandle and StreamingOggFlacSink.

- Replace DirectOggFlacSink with StreamingOggFlacSink in pipeline
- Update documentation and comments to reflect multi-client support
- Add detailed warning logs for buffer underruns and client disconnections
- Remove TimerBufferNode from pipeline as it's no longer needed
- Update connect() calls to subscribe() for new streaming behavior

This change enables multiple clients to subscribe to the same audio stream, with each subscription getting a live feed from the current point in time.
This commit is contained in:
2026-02-26 20:41:57 +01:00
parent 6f8a80a58a
commit 6fe2f6be95
5 changed files with 40 additions and 22 deletions

View File

@@ -135,6 +135,14 @@ impl TimerBufferNodeLogic {
self.buffer.len()
);
if self.buffer.is_empty() && self.buffered_time_sec < self.capacity_sec * 0.1 {
tracing::warn!(
"TimerBufferNode: buffer underrun at ts={:.3}s (capacity={:.1}s) — source too slow or stalled",
segment.timestamp_sec,
self.capacity_sec,
);
}
send_to_children(std::any::type_name::<Self>(), output, segment).await?;
}
Ok(())