Struct ao::Driver [-] [+] [src]

pub struct Driver<'a> {
    // some fields omitted
}

An output driver.

This is an opaque handle.

Methods

impl<'a> Driver<'a>

fn get_info(&self) -> Option<DriverInfo<'a>>

Get the DriverInfo corresponding to this Driver.

fn open_live<T: Sample, S: AsRef<str>>(&self, format: &SampleFormat<T, S>) -> AoResult<Device<'a, T>>

Open a live output device.

Returns NotLive if the specified driver is not a live output driver. In this case, open the device as a file output instead.

fn open_file<T: Sample, S: AsRef<str>>(&self, format: &SampleFormat<T, S>, file: &Path, overwrite: bool) -> AoResult<Device<'a, T>>

Open a file output device.

path specifies the file to write to, and overwrite will automatically replace any existing file if true.

Returns NotFile if the requested driver is not a file output driver.