rustpat

Crates.iorustpat
lib.rsrustpat
version0.6.1
sourcesrc
created_at2020-11-08 03:44:02.577491
updated_at2021-05-21 02:48:38.101845
descriptionrustpat is a Rust library that makes playing audio simple.
homepage
repositoryhttps://github.com/tnewman/pat
max_upload_size
id309795
size91,456
Thomas Newman (tnewman)

documentation

README

rustpat

crates.io cicd

rustpat is a Rust library that makes playing audio simple. rustpat uses FFmpeg to provide robust support for virtually any audio format and SDL2 to play back audio.

Prerequisites

Install Prerequisites before installing.

Example

extern crate rustpat;

fn main() {
    let pat = rustpat::PAT::new().unwrap();

    // Play a file
    pat.play("amerika.mpga").unwrap();

    // Skip the current file
    pat.skip().unwrap();

    // Pause audio playback
    pat.pause().unwrap();

    // Resume audio playback
    pat.resume().unwrap();
}
Commit count: 338

cargo fmt