Struct openal::Listener [] [src]

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

Represents the listener.

Only one Listener may be open at a time.

In OpenAL parlance a Listener contains both an OpenAL device and an OpenAL context, and that context is made current on creation. This is because there are some inconsistencies between implementations that make having multiple devices or contexts impossible.

Methods

impl<'a> Listener<'a>
[src]

fn process(&mut self)

Process the Listener. See OpenAL documentation for alcProcessContext.

fn suspend(&mut self)

Suspend the Listener. See OpenAL documentation for alcSuspendContext.

fn source<'b>(&self) -> Result<Source<'b>, Error> where 'a: 'b

Create a new Source.

fn buffer<'b, T: Sample>(&self, channels: u16, data: &[T], rate: u32) -> Result<Buffer<'b>, Error> where 'a: 'b

Create a new Buffer and fill it.

fn vendor(&self) -> &'static str

Get the vendor name.

fn version(&self) -> (&'static str, &'static str)

Get the OpenAL specification version and the context specific version.

fn renderer(&self) -> &'static str

Get the name of the renderer.

fn extensions(&self) -> Vec<&'static str>

Get a list of extensions supported.

fn doppler(&self) -> Doppler

Get the doppler factor and velocity.

fn set_doppler(&mut self, value: Doppler)

Set the doppler factor and velocity.

fn speed_of_sound(&self) -> f32

Get the speed of sound.

fn set_speed_of_sound(&mut self, value: f32)

Set the speed of sound.

fn gain(&self) -> f32

Get the listener gain.

fn set_gain(&mut self, value: f32)

Set the listener gain.

fn position(&self) -> Position

Get the listener position.

fn set_position(&mut self, value: &Position)

Set the listener position.

fn velocity(&self) -> Velocity

Get the listener velocity.

fn set_velocity(&mut self, value: &Velocity)

Set the listener velocity.

fn orientation(&self) -> Orientation

Get the listener orientation.

fn set_orientation(&mut self, value: &Orientation)

Set the listener orientation.

Trait Implementations

impl<'a> Send for Listener<'a>
[src]

impl<'a> Device for Listener<'a>
[src]

fn as_ptr(&self) -> *const ALCdevice

Return a *const pointer for the device.

fn as_mut_ptr(&mut self) -> *mut ALCdevice

Return a *mut pointer for the device.

impl<'a> Context for Listener<'a>
[src]

fn as_ptr(&self) -> *const ALCcontext

Return a *const pointer for the context.

fn as_mut_ptr(&mut self) -> *mut ALCcontext

Return a *mut pointer for the context.

impl<'a> Debug for Listener<'a>
[src]

fn fmt(&self, f: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl<'a> Drop for Listener<'a>
[src]

fn drop(&mut self)

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