[−][src]Struct libpulse_simple_binding::Simple
An opaque simple connection object.
Implementations
impl Simple[src]
pub fn new(
server: Option<&str>,
name: &str,
dir: Direction,
dev: Option<&str>,
stream_name: &str,
ss: &Spec,
map: Option<&Map>,
attr: Option<&BufferAttr>
) -> Result<Self, PAErr>[src]
server: Option<&str>,
name: &str,
dir: Direction,
dev: Option<&str>,
stream_name: &str,
ss: &Spec,
map: Option<&Map>,
attr: Option<&BufferAttr>
) -> Result<Self, PAErr>
Creates a new connection to the server.
Params
server: Server name, orNonefor default.name: A descriptive name for this client (application name, ...).dir: Open this stream for recording or playback?dev: Sink (resp. source) name, orNonefor default.stream_name: A descriptive name for this stream (application name, song title, ...).ss: The sample type to use.map: The channel map to use, orNonefor default.attr: Buffering attributes, orNonefor default.
pub fn write(&self, data: &[u8]) -> Result<(), PAErr>[src]
Writes some data to the server.
pub fn drain(&self) -> Result<(), PAErr>[src]
Waits until all data already written is played by the daemon.
pub fn read(&self, data: &mut [u8]) -> Result<(), PAErr>[src]
Reads some data from the server.
This function blocks until data.len() amount of data has been received from the server,
or until an error occurs.
pub fn get_latency(&self) -> Option<MicroSeconds>[src]
Gets the playback or record latency.
pub fn flush(&self) -> Result<(), PAErr>[src]
Flushes the playback or record buffer.
This discards any audio in the buffer.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,