Struct rrise::game_syncs::SetRtpcValue
source · [−]pub struct SetRtpcValue<'a> { /* private fields */ }Expand description
Helper to set or reset RTPCs.
Use SetRtpcValue::set or SetRtpcValue::reset to post the change to Wwise.
Implementations
sourceimpl<'a> SetRtpcValue<'a>
impl<'a> SetRtpcValue<'a>
pub fn new<T: Into<AkID<'a>>>(rtpc_id: T, value: AkRtpcValue) -> Self
sourcepub fn with_value(&mut self, value: AkRtpcValue) -> &mut Self
pub fn with_value(&mut self, value: AkRtpcValue) -> &mut Self
Value to set.
Note Doesn’t consume self so that it’s easier to reuse the same SetRTPCValue struct with different values over time.
sourcepub fn for_target(self, game_obj_id: AkGameObjectID) -> Self
pub fn for_target(self, game_obj_id: AkGameObjectID) -> Self
Associated game object ID.
With this function, you may set a game parameter value with global scope (default) or with game object scope. Game object scope superseeds global scope. (Once a value is set for the game object scope, it will not be affected by changes to the global scope value.) Game parameter values set with global scope are applied to all game objects that not yet registered, or already registered but not overridden with a value with game object scope. To set a game parameter value with global scope, leave the default or pass AK_INVALID_GAME_OBJECT as the game object.
Default: AK_INVALID_GAME_OBJECT
sourcepub fn for_playing_id(self, playing_id: AkPlayingID) -> Self
pub fn for_playing_id(self, playing_id: AkPlayingID) -> Self
Associated playing ID.
With this function, you may set a game parameter value on playing ID scope. Playing id scope superseeds both game object scope and global scope. Ignores any target game object set with for_target.
Default: AK_INVALID_PLAYING_ID
sourcepub fn with_interp_millis(self, ms: AkTimeMs) -> Self
pub fn with_interp_millis(self, ms: AkTimeMs) -> Self
Duration during which the game parameter is interpolated towards in_value.
With this function, you may change the value of a game parameter over time. To do so, specify a non-zero
value for ms. At each audio frame, the game parameter value will be updated internally
according to the interpolation curve (set with with_interp_curve).
If you call set with ms = 0 in the middle of an interpolation, the interpolation stops and
the new value is set directly. Thus, if you call set at every game frame, you
should not use with_interp_millis, as it would have no effect and it is less efficient.
Default: 0
sourcepub fn with_interp_curve(self, curve: AkCurveInterpolation) -> Self
pub fn with_interp_curve(self, curve: AkCurveInterpolation) -> Self
When with_interp_millis is used and non-zero, describes the Curve type to be used for the game parameter interpolation.
sourcepub fn should_bypass_designer_interp(self, should: bool) -> Self
pub fn should_bypass_designer_interp(self, should: bool) -> Self
True if you want to bypass the internal “slew rate” or “over time filtering” specified by the sound designer.
This is meant to be used when for example loading a level and you dont want the values to interpolate.
Default: false
sourcepub fn reset(&self) -> Result<(), AkResult>
pub fn reset(&self) -> Result<(), AkResult>
Post a reset of this RTPC configuration to Wwise.
Resets the value of the game parameter to its default value, as specified in the Wwise project.
Incompatible with for_playing_id; only works at global or game object scope, set with for_target.
Trait Implementations
sourceimpl<'a> Clone for SetRtpcValue<'a>
impl<'a> Clone for SetRtpcValue<'a>
sourcefn clone(&self) -> SetRtpcValue<'a>
fn clone(&self) -> SetRtpcValue<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a> Debug for SetRtpcValue<'a>
impl<'a> Debug for SetRtpcValue<'a>
impl<'a> Copy for SetRtpcValue<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for SetRtpcValue<'a>
impl<'a> Send for SetRtpcValue<'a>
impl<'a> Sync for SetRtpcValue<'a>
impl<'a> Unpin for SetRtpcValue<'a>
impl<'a> UnwindSafe for SetRtpcValue<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more