pub struct Source(_);
Expand description
Represents the source “base class”. It is possible to convert to this type from any source, in order to use source-common functionality.
Implementations§
source§impl Source
impl Source
pub fn gain(&self) -> DoubleProperty<'_>
pub fn get_filter(&self) -> Result<BiquadConfig>
pub fn set_filter(&self, cfg: &BiquadConfig) -> Result<()>
pub fn get_filter_direct(&self) -> Result<BiquadConfig>
pub fn set_filter_direct(&self, cfg: &BiquadConfig) -> Result<()>
pub fn get_filter_effects(&self) -> Result<BiquadConfig>
pub fn set_filter_effects(&self, cfg: &BiquadConfig) -> Result<()>
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<()>
pub fn add_generator<T: IsGenerator>(&self, generator: &T) -> Result<()>
pub fn remove_generator<T: IsGenerator>(&self, generator: &T) -> Result<()>
Trait Implementations§
source§impl From<&AngularPannedSource> for Source
impl From<&AngularPannedSource> for Source
source§fn from(other: &AngularPannedSource) -> Source
fn from(other: &AngularPannedSource) -> Source
Converts to this type from the input type.
source§impl From<&DirectSource> for Source
impl From<&DirectSource> for Source
source§fn from(other: &DirectSource) -> Source
fn from(other: &DirectSource) -> Source
Converts to this type from the input type.
source§impl From<&ScalarPannedSource> for Source
impl From<&ScalarPannedSource> for Source
source§fn from(other: &ScalarPannedSource) -> Source
fn from(other: &ScalarPannedSource) -> Source
Converts to this type from the input type.
source§impl From<AngularPannedSource> for Source
impl From<AngularPannedSource> for Source
source§fn from(input: AngularPannedSource) -> Source
fn from(input: AngularPannedSource) -> Source
Converts to this type from the input type.
source§impl From<DirectSource> for Source
impl From<DirectSource> for Source
source§fn from(input: DirectSource) -> Source
fn from(input: DirectSource) -> Source
Converts to this type from the input type.
source§impl From<ScalarPannedSource> for Source
impl From<ScalarPannedSource> for Source
source§fn from(input: ScalarPannedSource) -> Source
fn from(input: ScalarPannedSource) -> Source
Converts to this type from the input type.
source§impl Ord for Source
impl Ord for Source
source§impl PartialEq<Source> for Source
impl PartialEq<Source> for Source
source§impl PartialOrd<Source> for Source
impl PartialOrd<Source> for Source
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