vpr-audio-analyzer

Crates.iovpr-audio-analyzer
lib.rsvpr-audio-analyzer
version0.1.1
sourcesrc
created_at2023-09-11 21:18:37.247078
updated_at2024-08-07 07:44:53.945611
descriptionAudio file analyzer
homepage
repository
max_upload_size
id970134
size55,912
Pietro Alberti (PTRRR)

documentation

README

Vpr Audio Analyzer

The Vpr Audio Analyzer, pronounced "Vapor Audio Analyzer," is an asynchronous toolkit for working with audio files. It offers three key functions:

Retrieve Audio Frames:

Extracts audio frames from an audio file and presents them as an array.

let file = File::open(path).unwrap();
let reader = BufReader::new(file);
let analyzer = Analyzer::new(reader);

let frames = analyzer.get_audio_frames().await.unwrap();

Calculate Duration:

Quickly finds the duration of an audio file. If there's a XING header, it uses that for a faster calculation; otherwise, it sums up audio frame durations.

let file = File::open(path).unwrap();
let reader = BufReader::new(file);
let analyzer = Analyzer::new(reader);

let duration = analyzer.get_duration().await.unwrap();

Generate Seek Index:

Creates a timestamp and byte offset index for precise navigation within an audio file, useful for accurate seeking during playback.

let file = File::open(path).unwrap();
let reader = BufReader::new(file);
let analyzer = Analyzer::new(reader);

let seek_index = analyzer.get_seek_index().await.unwrap();
Commit count: 0

cargo fmt