pub enum AkCallbackInfo {
    Default {
        game_obj_id: u64,
        callback_type: AkCallbackType,
    },
    MusicSync {
        game_obj_id: u64,
        playing_id: u32,
        segment_info: AkSegmentInfo,
        music_sync_type: AkCallbackType,
        user_cue_name: String,
    },
    DynamicSequenceItem {
        game_obj_id: u64,
        playing_id: u32,
        audio_node_id: u32,
    },
    Event {
        game_obj_id: u64,
        callback_type: AkCallbackType,
        playing_id: u32,
        event_id: u32,
    },
    Duration {
        game_obj_id: u64,
        playing_id: u32,
        event_id: u32,
        duration: f32,
        estimated_duration: f32,
        audio_node_id: u32,
        media_id: u32,
        streaming: bool,
    },
    Marker {
        game_obj_id: u64,
        playing_id: u32,
        event_id: u32,
        identifier: u32,
        position: u32,
        label: String,
    },
    Midi {
        game_obj_id: u64,
        playing_id: u32,
        event_id: u32,
        midi_event: AkMIDIEvent,
    },
    MusicPlaylist {
        game_obj_id: u64,
        playing_id: u32,
        event_id: u32,
        playlist_id: u32,
        num_playlist_items: u32,
        playlist_selection: u32,
        playlist_item_done: u32,
    },
    SpeakerMatrixVolume {
        game_obj_id: u64,
        playing_id: u32,
        event_id: u32,
        input_config: AkChannelConfig,
        output_config: AkChannelConfig,
    },
}
Expand description

Callback information used for all notifications sent from Wwise.

Variants

Default

Fields

game_obj_id: u64
callback_type: AkCallbackType

Basic information structure returned for notifications that are not handled by another variant.

MusicSync

Fields

game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

segment_info: AkSegmentInfo

Segment information corresponding to the segment triggering this callback

user_cue_name: String

Cue 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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
game_obj_id: u64
playing_id: u32

Playing ID of Dynamic Sequence, returned by DynamicSequence::Open()

audio_node_id: u32

Audio Node ID of finished item

Callback information structure corresponding to AkCallbackType::AK_EndOfDynamicSequenceItem.

Event

Fields

game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

event_id: u32

Unique ID of Event, passed to PostEvent::new()

Duration

Fields

game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

event_id: u32

Unique ID of Event, passed to PostEvent::new()

duration: f32

Duration of the sound (unit: milliseconds)

estimated_duration: f32

Estimated duration of the sound depending on source settings such as pitch. (unit: milliseconds)

audio_node_id: u32

Audio Node ID of playing item

media_id: u32

Media ID of playing item. (corresponds to ‘ID’ attribute of ‘File’ element in SoundBank metadata file)

streaming: bool

True if source is streaming, false otherwise

Callback information structure corresponding to AkCallbackType::AK_Duration.

Marker

Fields

game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

event_id: u32

Unique ID of Event, passed to PostEvent::new()

identifier: u32

Cue point identifier

position: u32

Position in the cue point (unit: sample frames)

label: String

Label of the marker, read from the file

Callback information structure corresponding to AkCallbackType::AK_Marker.

Midi

Fields

game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

event_id: u32

Unique ID of Event, passed to PostEvent::new()

midi_event: AkMIDIEvent

MIDI event triggered by event

Callback information structure corresponding to AkCallbackType::AK_MIDIEvent.

MusicPlaylist

Fields

game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

event_id: u32

Unique ID of Event, passed to PostEvent::new()

playlist_id: u32

ID of playlist node

num_playlist_items: u32

Number of items in playlist node (may be segments or other playlists)

playlist_selection: u32

Selection: set by sound engine

playlist_item_done: u32

Playlist 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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
game_obj_id: u64
playing_id: u32

Playing ID of Event, returned by PostEvent::post()

event_id: u32

Unique ID of Event, passed to PostEvent::new()

input_config: AkChannelConfig

Channel configuration of the voice/bus

output_config: AkChannelConfig

Channel 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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more