Files
songbird/src/input/container/frame.rs
Kyle Simpson 7e4392ae68 Voice Rework -- Events, Track Queues (#806)
This implements a proof-of-concept for an improved audio frontend. The largest change is the introduction of events and event handling: both by time elapsed and by track events, such as ending or looping. Following on from this, the library now includes a basic, event-driven track queue system (which people seem to ask for unusually often). A new sample, `examples/13_voice_events`, demonstrates both the `TrackQueue` system and some basic events via the `~queue` and `~play_fade` commands.

Locks are removed from around the control of `Audio` objects, which should allow the backend to be moved to a more granular futures-based backend solution in a cleaner way.
2020-10-31 12:19:07 +01:00

9 lines
234 B
Rust

/// Information used in audio frame detection.
#[derive(Clone, Copy, Debug)]
pub struct Frame {
/// Length of this frame's header, in bytes.
pub header_len: usize,
/// Payload length, in bytes.
pub frame_len: usize,
}