use crate::core::{AudioFrame, AudioSpec};
#[allow(dead_code)]
#[derive(Debug, Clone)]
pub struct AudioBlock {
pub samples: Vec<f32>,
pub spec: AudioSpec,
}
#[allow(dead_code)]
impl AudioBlock {
pub fn new(samples: Vec<f32>, spec: AudioSpec) -> Self {
Self { samples, spec }
}
}
impl From<AudioFrame> for AudioBlock {
fn from(frame: AudioFrame) -> Self {
Self {
samples: frame.samples,
spec: frame.spec,
}
}
}
impl From<AudioBlock> for AudioFrame {
fn from(block: AudioBlock) -> Self {
Self {
samples: block.samples,
spec: block.spec,
}
}
}
#[allow(dead_code)]
#[derive(Debug, Clone, Copy)]
pub struct ProcessContext {
pub spec: AudioSpec,
pub frame_size: usize,
pub frame_index: u64,
}
#[allow(dead_code)]
#[derive(Debug, Clone, Copy, Default)]
pub struct ProcessorInfo {
pub latency_samples: usize,
}
#[allow(dead_code)]
#[derive(Debug, Clone, Copy, Default)]
pub struct SinkReport {
pub frames_written: u64,
}