Enum rrise::AkCallbackInfo
source · [−]pub enum AkCallbackInfo {
Default {
game_obj_id: AkGameObjectID,
},
MusicSync {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
segment_info: AkSegmentInfo,
music_sync_type: AkCallbackType,
user_cue_name: String,
},
DynamicSequenceItem {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
audio_node_id: AkUniqueID,
},
Event {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
event_id: AkUniqueID,
},
Duration {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
event_id: AkUniqueID,
duration: AkReal32,
estimated_duration: AkReal32,
audio_node_id: AkUniqueID,
media_id: AkUniqueID,
streaming: bool,
},
Marker {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
event_id: AkUniqueID,
identifier: AkUniqueID,
position: AkUInt32,
label: String,
},
Midi {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
event_id: AkUniqueID,
midi_event: AkMIDIEvent,
},
MusicPlaylist {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
event_id: AkUniqueID,
playlist_id: AkUniqueID,
num_playlist_items: AkUInt32,
playlist_selection: AkUInt32,
playlist_item_done: AkUInt32,
},
SpeakerMatrixVolume {
game_obj_id: AkGameObjectID,
playing_id: AkPlayingID,
event_id: AkUniqueID,
input_config: AkChannelConfig,
output_config: AkChannelConfig,
},
}Expand description
Callback information used for all notifications sent from Wwise.
Variants
Default
Fields
game_obj_id: AkGameObjectIDBasic information structure returned for notifications that are not handled by another variant.
MusicSync
Fields
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
segment_info: AkSegmentInfoSegment information corresponding to the segment triggering this callback
music_sync_type: AkCallbackTypeuser_cue_name: StringCue name. Set for notifications AkCallbackType::AK_MusicSyncUserCue. Empty if cue has no name.
Callback information structure corresponding to AkCallbackType::AK_MusicSyncEntry, AkCallbackType::AK_MusicSyncBeat, AkCallbackType::AK_MusicSyncBar, AkCallbackType::AK_MusicSyncExit, AkCallbackType::AK_MusicSyncGrid, AkCallbackType::AK_MusicSyncPoint and AkCallbackType::AK_MusicSyncUserCue.
If you need the Tempo, you can compute it using the fBeatDuration:
Tempo (beats per minute) = 60/fBeatDuration
DynamicSequenceItem
Fields
This variant is marked as non-exhaustive
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Dynamic Sequence, returned by DynamicSequence::Open()
audio_node_id: AkUniqueIDAudio Node ID of finished item
Callback information structure corresponding to AkCallbackType::AK_EndOfDynamicSequenceItem.
Event
Fields
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
event_id: AkUniqueIDUnique ID of Event, passed to PostEvent::new()
Callback information structure corresponding to AkCallbackType::AK_EndOfEvent, AkCallbackType::AK_MusicPlayStarted and AkCallbackType::AK_Starvation.
Duration
Fields
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
event_id: AkUniqueIDUnique ID of Event, passed to PostEvent::new()
duration: AkReal32Duration of the sound (unit: milliseconds)
estimated_duration: AkReal32Estimated duration of the sound depending on source settings such as pitch. (unit: milliseconds)
audio_node_id: AkUniqueIDAudio Node ID of playing item
media_id: AkUniqueIDMedia ID of playing item. (corresponds to ‘ID’ attribute of ‘File’ element in SoundBank metadata file)
streaming: boolTrue if source is streaming, false otherwise
Callback information structure corresponding to AkCallbackType::AK_Duration.
Marker
Fields
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
event_id: AkUniqueIDUnique ID of Event, passed to PostEvent::new()
identifier: AkUniqueIDCue point identifier
position: AkUInt32Position in the cue point (unit: sample frames)
label: StringLabel of the marker, read from the file
Callback information structure corresponding to AkCallbackType::AK_Marker.
Midi
Fields
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
event_id: AkUniqueIDUnique ID of Event, passed to PostEvent::new()
midi_event: AkMIDIEventMIDI event triggered by event
Callback information structure corresponding to AkCallbackType::AK_MIDIEvent.
MusicPlaylist
Fields
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
event_id: AkUniqueIDUnique ID of Event, passed to PostEvent::new()
playlist_id: AkUniqueIDID of playlist node
num_playlist_items: AkUInt32Number of items in playlist node (may be segments or other playlists)
playlist_selection: AkUInt32Selection: set by sound engine
playlist_item_done: AkUInt32Playlist node done: set by sound engine
Callback information structure corresponding to AkCallbackType::AK_MusicPlaylistSelect.
Called when a music playlist container must select its next item to play.
The members playlist_selection and playlist_item_done are set by the sound
engine before the callback function call. They are set to the next item
selected by the sound engine.
SpeakerMatrixVolume
Fields
This variant is marked as non-exhaustive
game_obj_id: AkGameObjectIDplaying_id: AkPlayingIDPlaying ID of Event, returned by PostEvent::post()
event_id: AkUniqueIDUnique ID of Event, passed to PostEvent::new()
input_config: AkChannelConfigChannel configuration of the voice/bus
output_config: AkChannelConfigChannel configuration of the output bus
Callback information structure corresponding to AkCallbackType::AK_SpeakerVolumeMatrix, and passed to callbacks registered in [RegisterBusVolumeCallback()] or PostEvent with AkCallbackType::AK_SpeakerVolumeMatrix.
These callbacks are called at every audio frame for every connection from an input (voice or bus) to an output bus (standard or auxiliary), at the point when an input signal is about to be mixed into a mixing bus, but just before having been scaled in accordance to volumes authored in Wwise. The volumes are passed via this structure as pointers because they can be modified in the callbacks. They are factored into two linear values ([0..1]): a common base value (pfBaseVolume), that is channel-agnostic and represents the collapsed gain of all volume changes in Wwise (sliders, actions, RTPC, attenuations, …), and a matrix of gains per input/output channel, which depends on spatialization. Use the methods of AK::SpeakerVolumes::Matrix, defined in AkCommonDefs.h, to perform operations on them. Access each input channel of the volumes matrix with AK::SpeakerVolumes::Matrix::GetChannel(), passing it the input and output channel configuration. Then, you may access each element of the output vector using the standard bracket [] operator. See AK::SpeakerVolumes for more details. It is crucial that the processing done in the callback be lightweight and non-blocking.
Trait Implementations
sourceimpl Clone for AkCallbackInfo
impl Clone for AkCallbackInfo
sourcefn clone(&self) -> AkCallbackInfo
fn clone(&self) -> AkCallbackInfo
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
Auto Trait Implementations
impl RefUnwindSafe for AkCallbackInfo
impl Send for AkCallbackInfo
impl Sync for AkCallbackInfo
impl Unpin for AkCallbackInfo
impl UnwindSafe for AkCallbackInfo
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