pub struct Context(_);
Expand description
The Context
represents an audio device.
Implementations§
source§impl Context
impl Context
pub fn new() -> Result<Context>
pub fn enable_events(&self) -> Result<()>
sourcepub fn get_events<'a>(&'a self) -> impl Iterator<Item = Result<Event>> + 'a
pub fn get_events<'a>(&'a self) -> impl Iterator<Item = Result<Event>> + 'a
Get any pending events. The returned iterator will not block, and
iterates over any pending events until the first error. This is lazy:
to limit the number of events received, use .take
.
pub fn config_route( &self, output: &dyn RouteOutput, input: &dyn RouteInput, config: &RouteConfig ) -> Result<()>
sourcepub fn config_route_simple(
&self,
output: &dyn RouteOutput,
input: &dyn RouteInput
) -> Result<()>
pub fn config_route_simple( &self, output: &dyn RouteOutput, input: &dyn RouteInput ) -> Result<()>
Configure a route with the default settings.
pub fn remove_route( &self, output: &dyn RouteOutput, input: &dyn RouteInput, fade_out: f64 ) -> Result<()>
pub fn remove_all_routes( &self, output: &dyn RouteOutput, fade_out: f64 ) -> Result<()>
pub fn gain(&self) -> DoubleProperty<'_>
pub fn default_panner_strategy(&self) -> EnumProperty<'_, PannerStrategy>
pub fn default_distance_model(&self) -> EnumProperty<'_, DistanceModel>
pub fn default_distance_ref(&self) -> DoubleProperty<'_>
pub fn default_distance_max(&self) -> DoubleProperty<'_>
pub fn default_rolloff(&self) -> DoubleProperty<'_>
pub fn default_closeness_boost(&self) -> DoubleProperty<'_>
pub fn default_closeness_boost_distance(&self) -> DoubleProperty<'_>
pub fn position(&self) -> Double3Property<'_>
pub fn orientation(&self) -> Double6Property<'_>
pub fn handle(&self) -> &Handle
pub fn into_handle(self) -> Handle
pub fn get_type(&self) -> Result<ObjectType>
sourcepub fn cast_to<T: CastTarget>(&self) -> Result<Option<T>>
pub fn cast_to<T: CastTarget>(&self) -> Result<Option<T>>
Try to cast this object to another object type. Will return
Ok(None)
if this is because of a type mismatch, otherwise Err
.
Clones self
on success in order to prevent throwing the object
away on error.
pub fn get_userdata(&self) -> Result<Option<Arc<dyn Any + Send + Sync>>>
pub fn set_userdata( &self, userdata: Option<impl Any + Send + Sync> ) -> Result<()>
pub fn config_delete_behavior(&self, config: &DeleteBehaviorConfig) -> Result<()>
pub fn current_time(&self) -> DoubleProperty<'_>
pub fn suggested_automation_time(&self) -> DoubleProperty<'_>
pub fn pause(&self) -> Result<()>
pub fn play(&self) -> Result<()>
Trait Implementations§
source§impl Ord for Context
impl Ord for Context
source§impl PartialEq<Context> for Context
impl PartialEq<Context> for Context
source§impl PartialOrd<Context> for Context
impl PartialOrd<Context> for Context
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more