Skip to main content

start_decode_file

Function start_decode_file 

Source
pub fn start_decode_file<N, F>(
    initial_id: QueueItemId,
    path: &Path,
    producer: Producer<f32>,
    seek_ms: u64,
    next_track: N,
    timeline: Arc<PlaybackTimeline>,
    viz_buffer: Option<Arc<VizBuffer>>,
    rg_mode: ReplayGainMode,
    pre_amp_db: f64,
    on_finished: F,
) -> Result<(StreamInfo, DecodeHandle), DecodeError>
where N: Fn() -> Option<(QueueItemId, PathBuf)> + Send + 'static, F: FnOnce() + Send + 'static,
Expand description

Start decoding a file into the ring buffer (convenience wrapper).

initial_id — the QueueItemId of the first track. seek_ms — if > 0, seek to this position before decoding the first track. next_track — closure returning the next (id, path) for gapless playback.