Struct rustpat::PAT [−][src]
pub struct PAT {}
Expand description
PAT Audio Technician (PAT)
Implementations
impl PAT
[src]
impl PAT
[src]pub fn new() -> Result<PAT, PATError>
[src]
pub fn new() -> Result<PAT, PATError>
[src]Creates a new PAT instance and initializes PAT if it has already been initialized.
Examples
rustpat::PAT::new().unwrap();
pub fn play(&self, pat_audio_path: &str) -> Result<(), PATError>
[src]
pub fn play(&self, pat_audio_path: &str) -> Result<(), PATError>
[src]Play an audio file.
The audio file can be a local file or remote file (http:// or https://).
Examples
let pat = rustpat::PAT::new().unwrap(); let test_audio = format!("{}/src/libpat/test/test.ogg", env!("CARGO_MANIFEST_DIR")); pat.play(&test_audio).unwrap();
pub fn skip(&self) -> Result<(), PATError>
[src]
pub fn skip(&self) -> Result<(), PATError>
[src]Skip playback of the current audio file.
This method does nothing if there is not an audio file playing.
Examples
let pat = rustpat::PAT::new().unwrap(); pat.skip().unwrap();