Struct alto::StaticSource
[−]
[src]
pub struct StaticSource<'d: 'c, 'c> { /* fields omitted */ }
A source that can play shared static buffer.
Methods
impl<'d: 'c, 'c> StaticSource<'d, 'c>
[src]
fn buffer(&self) -> Option<&Arc<Buffer<'d, 'c>>>
The shared buffer currently associated with this source.
fn set_buffer<B: Into<Option<Arc<Buffer<'d, 'c>>>>>(&mut self,
buf: B)
-> AltoResult<()>
buf: B)
-> AltoResult<()>
Associate a shared buffer with the source.
fn looping(&self) -> AltoResult<bool>
fn set_looping(&mut self, loop_: bool) -> AltoResult<()>
Trait Implementations
impl<'d: 'c, 'c> SourceTrait<'d> for StaticSource<'d, 'c>
[src]
fn context(&self) -> &Context<'d>
The context from which this source was created.
fn raw_source(&self) -> ALuint
Raw handle as provided by OpenAL.
fn state(&self) -> AltoResult<SourceState>
Current playback state of the source.
fn play(&mut self) -> AltoResult<()>
Begin playing audio, or resume playing if previously paused.
fn pause(&mut self) -> AltoResult<()>
Pause playback while retaining playback position.
fn stop(&mut self) -> AltoResult<()>
Stop playback and reset playback to the beginning of the audio data.
fn rewind(&mut self) -> AltoResult<()>
Reset playback to the beginning of the audio data.
fn relative(&self) -> AltoResult<bool>
Whether the source has a listener-relative position.
fn set_relative(&mut self, rel: bool) -> AltoResult<()>
fn min_gain(&self) -> AltoResult<f32>
Minimum gain that will be applied by the distance model.
fn set_min_gain(&mut self, gain: f32) -> AltoResult<()>
fn max_gain(&self) -> AltoResult<f32>
Maximum gain that will be applied by the distance model.
fn set_max_gain(&mut self, gain: f32) -> AltoResult<()>
fn reference_distance(&self) -> AltoResult<f32>
Distance at which the source will have unmodified gain.
fn set_reference_distance(&mut self, dist: f32) -> AltoResult<()>
fn rolloff_factor(&self) -> AltoResult<f32>
Rolloff factor of the distance model.
fn set_rolloff_factor(&mut self, rolloff: f32) -> AltoResult<()>
fn max_distance(&self) -> AltoResult<f32>
Distance beyond which the source will no longer attenuate.
fn set_max_distance(&mut self, dist: f32) -> AltoResult<()>
fn pitch(&self) -> AltoResult<f32>
Relative playback speed of the source.
fn set_pitch(&mut self, pitch: f32) -> AltoResult<()>
fn direction<V: From<[f32; 3]>>(&self) -> AltoResult<V>
Direction vector of the source.
fn set_direction<V: Into<[f32; 3]>>(&mut self, dir: V) -> AltoResult<()>
fn cone_inner_angle(&self) -> AltoResult<f32>
Angle from the direction vector within which the source will be fully heard.
fn set_cone_inner_angle(&mut self, angle: f32) -> AltoResult<()>
fn cone_outer_angle(&self) -> AltoResult<f32>
Angle from the direction vector within which the source will be heard at all.
fn set_cone_outer_angle(&mut self, angle: f32) -> AltoResult<()>
fn cone_outer_gain(&self) -> AltoResult<f32>
Gain factor to determine attenuation when the listener is within the outer cone but outiside the inner cone.
fn set_cone_outer_gain(&mut self, gain: f32) -> AltoResult<()>
fn sec_offset(&self) -> AltoResult<f32>
Read cursor position in seconds.
fn set_sec_offset(&mut self, offset: f32) -> AltoResult<()>
fn sample_offset(&self) -> AltoResult<ALint>
Read cursor position in samples.
fn set_sample_offset(&mut self, offset: ALint) -> AltoResult<()>
fn byte_offset(&self) -> AltoResult<ALint>
Read cursor position in bytes.
fn set_byte_offset(&mut self, offset: ALint) -> AltoResult<()>
fn soft_sec_offset_latency(&self) -> AltoResult<(f64, f64)>
A tuple of a playback position and the amount of time until that position is heard, in seconds. Requires AL_SOFT_source_latency
. Read more
fn soft_sample_offset_frac_latency(&self) -> AltoResult<(i32, i32, i64)>
A tuple of a fixed point playback position in samples, and the time until that position is heard, in nanoseconds. Requires AL_SOFT_source_latency
. Read more
fn soft_sec_length(&self) -> AltoResult<f32>
Total length of the queued audio data in seconds. Requires AL_SOFT_source_length
. Read more
fn soft_sample_length(&self) -> AltoResult<ALint>
Total length of the queued audio data in samples. Requires AL_SOFT_source_length
. Read more
fn soft_byte_length(&self) -> AltoResult<ALint>
Total length of the queued audio data in bytes. Requires AL_SOFT_source_length
. Read more
fn soft_direct_channels(&self) -> AltoResult<bool>
Whether the audio data will be directly output to the corresponding output channels, bypassing any processing. Requires AL_SOFT_direct_channels
. Read more
fn set_soft_direct_channels(&mut self, direct: bool) -> AltoResult<()>
fn distance_model(&self) -> AltoResult<DistanceModel>
Distance model specific to this source. Requires AL_EXT_source_distance_model
. Read more
fn set_distance_model(&mut self, model: DistanceModel) -> AltoResult<()>
impl<'d: 'c, 'c> PartialEq for StaticSource<'d, 'c>
[src]
fn eq(&self, other: &StaticSource<'d, 'c>) -> 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 !=
.