Struct ao::Device [] [src]

pub struct Device<'a, S> {
    // some fields omitted

An output device.


impl<'a, S: Sample> Device<'a, S>

fn play(&self, samples: &[S])

Plays packed samples through a device.

For multi-channel output, channels are interleaved, such that positions in the samples slice for four ouput channels would be as so:

[c1, c2, c3, c4,    <-- time 1
 c1, c2, c3, c4]    <-- time 2

In most cases this layout can be achieved as either an array or tuple. Again with 4 channels:[[0, 0, 0, 0], [0, 0, 0, 0]]);

Trait Implementations

impl<'a, S> Drop for Device<'a, S>

fn drop(&mut self)