Struct alto::Context
[−]
[src]
pub struct Context<'d> { /* fields omitted */ }
Methods
impl<'d> Context<'d>
[src]
fn device(&self) -> &DeviceTrait + 'd
The device from which this context was created.
fn raw_context(&self) -> *mut ALCcontext
Raw context pointer as provided by OpenAL.
fn is_extension_present(&self, ext: Al) -> bool
Query presence of an extension.
fn distance_model(&self) -> AltoResult<DistanceModel>
Distance model applied to all sources from this context.
fn set_distance_model(&self, model: DistanceModel) -> AltoResult<()>
fn using_source_distance_model(&self) -> AltoResult<bool>
Using per-source distance model settings.
Requires AL_EXT_source_distance_model
.
fn use_source_distance_model(&self, enable: bool) -> AltoResult<()>
fn doppler_factor(&self) -> AltoResult<f32>
Doppler factor applied based on relative velocities.
fn set_doppler_factor(&self, doppler: f32) -> AltoResult<()>
fn speed_of_sound(&self) -> AltoResult<f32>
Speed of sound, used for doppler calculations.
fn set_speed_of_sound(&self, speed: f32) -> AltoResult<()>
fn gain(&self) -> AltoResult<f32>
Global gain.
fn set_gain(&self, gain: f32) -> AltoResult<()>
fn position<V: From<[f32; 3]>>(&self) -> AltoResult<V>
Position of the listener.
fn set_position<V: Into<[f32; 3]>>(&self, pos: V) -> AltoResult<()>
fn velocity<V: From<[f32; 3]>>(&self) -> AltoResult<V>
Velocity of the listener.
fn set_velocity<V: Into<[f32; 3]>>(&self, vel: V) -> AltoResult<()>
fn orientation<V: From<[f32; 3]>>(&self) -> AltoResult<(V, V)>
Orientation of the listener, consisting of a forward vector and an up vector.
fn set_orientation<V: Into<[f32; 3]>>(&self, at: V, up: V) -> AltoResult<()>
fn new_buffer<'c>(&'c self) -> AltoResult<Buffer<'d, 'c>>
Create a new, empty buffer object.
fn new_static_source(&self) -> AltoResult<StaticSource>
Create a new static source.
fn new_streaming_source(&self) -> AltoResult<StreamingSource>
Create a new streaming source.
fn play_all<S, I>(&self, srcs: I) -> AltoResult<()> where S: SourceTrait<'d>, I: Iterator, I::Item: AsRef<S> + AsMut<S>
Begin playing all specified sources simultaneously.
fn pause_all<S, I>(&self, srcs: I) -> AltoResult<()> where S: SourceTrait<'d>, I: Iterator, I::Item: AsRef<S> + AsMut<S>
Pause all specified sources simultaneously.
fn stop_all<S, I>(&self, srcs: I) -> AltoResult<()> where S: SourceTrait<'d>, I: Iterator, I::Item: AsRef<S> + AsMut<S>
Stop all specified sources simultaneously.
fn rewind_all<S, I>(&self, srcs: I) -> AltoResult<()> where S: SourceTrait<'d>, I: Iterator, I::Item: AsRef<S> + AsMut<S>
Rewind all specified sources simultaneously.
fn suspend<'c>(&'c self) -> AltoResult<SuspendLock<'d, 'c>>
Suspend state updates for the context, returning a guard object. Until the guard object is dropped, any state changes for the context are deferred. After the guard is dropped, all pending changes will be applied simultaneously.
Trait Implementations
impl<'d> PartialEq for Context<'d>
[src]
fn eq(&self, other: &Context<'d>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.