Struct ao::Device [] [src]

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

An output device.

Methods

impl<'a, S: Sample> Device<'a, S>
[src]

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:

my_device.play(&[[0, 0, 0, 0], [0, 0, 0, 0]]);

Trait Implementations

impl<'a, S> Drop for Device<'a, S>
[src]

A method called when the value goes out of scope. Read more