1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # OggMux
//!
//! OggMux is a library for muxing Ogg audio streams with clean silence gaps,
//! suitable for streaming applications like Icecast.
//!
//! It automatically inserts silence when real audio data is not available,
//! maintains proper timing across stream transitions, and provides configurable
//! buffering to handle network jitter.
//!
//! ## Example
//! ```rust,no_run
//! use oggmux::{OggMux, VorbisBitrateMode, VorbisConfig};
//! use bytes::Bytes;
//!
//! #[tokio::main]
//! async fn main() {
//! // Create a new OggMux with custom configuration
//! let mux = OggMux::new().with_vorbis_config(VorbisConfig {
//! sample_rate: 44100,
//! bitrate: VorbisBitrateMode::CBR(192),
//! });
//!
//! // Spawn the muxer and get the channels
//! let (input_tx, mut output_rx) = mux.spawn();
//!
//! // Feed some Ogg data (e.g., from a file or network stream)
//! let ogg_data = Bytes::from_static(&[/* Ogg data here */]);
//! let _ = input_tx.send(ogg_data).await;
//!
//! // Read the processed output (e.g., send to Icecast)
//! while let Some(output) = output_rx.recv().await {
//! println!("Got {} bytes of output", output.len());
//! }
//! }
//! ```
// Re-export public API
pub use ;