123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- #ifndef _AK_CALLBACK_H_
- #define _AK_CALLBACK_H_
- #include <AK/SoundEngine/Common/AkCommonDefs.h>
- #include <AK/SoundEngine/Common/AkMidiTypes.h>
- namespace AK
- {
- class IAkGlobalPluginContext;
- class IAkMixerInputContext;
- class IAkMixerPluginContext;
- }
- enum AkCallbackType
- {
- AK_EndOfEvent = 0x0001,
- AK_EndOfDynamicSequenceItem = 0x0002,
- AK_Marker = 0x0004,
- AK_Duration = 0x0008,
- AK_SpeakerVolumeMatrix = 0x0010,
- AK_Starvation = 0x0020,
- AK_MusicPlaylistSelect = 0x0040,
- AK_MusicPlayStarted = 0x0080,
- AK_MusicSyncBeat = 0x0100,
- AK_MusicSyncBar = 0x0200,
- AK_MusicSyncEntry = 0x0400,
- AK_MusicSyncExit = 0x0800,
- AK_MusicSyncGrid = 0x1000,
- AK_MusicSyncUserCue = 0x2000,
- AK_MusicSyncPoint = 0x4000,
- AK_MusicSyncAll = 0x7f00,
- AK_MIDIEvent = 0x10000,
- AK_CallbackBits = 0xfffff,
-
- AK_EnableGetSourcePlayPosition = 0x100000,
- AK_EnableGetMusicPlayPosition = 0x200000,
- AK_EnableGetSourceStreamBuffering = 0x400000
- };
- struct AkCallbackInfo
- {
- void * pCookie;
- AkGameObjectID gameObjID;
- };
- struct AkEventCallbackInfo : public AkCallbackInfo
- {
- AkPlayingID playingID;
- AkUniqueID eventID;
- };
- struct AkMIDIEventCallbackInfo : public AkEventCallbackInfo
- {
- AkMIDIEvent midiEvent;
- };
- struct AkMarkerCallbackInfo : public AkEventCallbackInfo
- {
- AkUInt32 uIdentifier;
- AkUInt32 uPosition;
- const char* strLabel;
- AkUInt32 uLabelSize;
- };
- struct AkDurationCallbackInfo : public AkEventCallbackInfo
- {
- AkReal32 fDuration;
- AkReal32 fEstimatedDuration;
- AkUniqueID audioNodeID;
- AkUniqueID mediaID;
- bool bStreaming;
- };
- struct AkDynamicSequenceItemCallbackInfo : public AkCallbackInfo
- {
- AkPlayingID playingID;
- AkUniqueID audioNodeID;
- void* pCustomInfo;
- };
- struct AkSpeakerVolumeMatrixCallbackInfo : public AkEventCallbackInfo
- {
- AK::SpeakerVolumes::MatrixPtr pVolumes;
- AkChannelConfig inputConfig;
- AkChannelConfig outputConfig;
- AkReal32 * pfBaseVolume;
- AkReal32 * pfEmitterListenerVolume;
- AK::IAkMixerPluginContext * pMixerContext;
- };
- struct AkBusMeteringCallbackInfo : public AkCallbackInfo
- {
- AK::AkMetering* pMetering;
- AkChannelConfig channelConfig;
- AkMeteringFlags eMeteringFlags;
- };
- struct AkOutputDeviceMeteringCallbackInfo : public AkCallbackInfo
- {
- AK::AkMetering * pMainMixMetering;
- AkChannelConfig mainMixConfig;
- AK::AkMetering * pPassthroughMetering;
- AkChannelConfig passthroughMixConfig;
- AkUInt32 uNumSystemAudioObjects;
- AK::AkMetering ** ppSystemAudioObjectMetering;
- AkMeteringFlags eMeteringFlags;
- };
- struct AkMusicPlaylistCallbackInfo : public AkEventCallbackInfo
- {
- AkUniqueID playlistID;
- AkUInt32 uNumPlaylistItems;
- AkUInt32 uPlaylistSelection;
- AkUInt32 uPlaylistItemDone;
- };
- struct AkSegmentInfo
- {
- AkTimeMs iCurrentPosition;
- AkTimeMs iPreEntryDuration;
- AkTimeMs iActiveDuration;
- AkTimeMs iPostExitDuration;
- AkTimeMs iRemainingLookAheadTime;
- AkReal32 fBeatDuration;
- AkReal32 fBarDuration;
- AkReal32 fGridDuration;
- AkReal32 fGridOffset;
- };
- struct AkMusicSyncCallbackInfo : public AkCallbackInfo
- {
- AkPlayingID playingID;
- AkSegmentInfo segmentInfo;
- AkCallbackType musicSyncType;
- char * pszUserCueName;
- };
- struct AkResourceMonitorDataSummary
- {
- AkReal32 totalCPU;
- AkReal32 pluginCPU;
- AkUInt32 physicalVoices;
- AkUInt32 virtualVoices;
- AkUInt32 totalVoices;
- AkUInt32 nbActiveEvents;
- };
- AK_CALLBACK( void, AkCallbackFunc )(
- AkCallbackType in_eType,
- AkCallbackInfo* in_pCallbackInfo
- );
- AK_CALLBACK( void, AkBusCallbackFunc )(
- AkSpeakerVolumeMatrixCallbackInfo* in_pCallbackInfo
- );
- AK_CALLBACK( void, AkBusMeteringCallbackFunc )(
- AkBusMeteringCallbackInfo * in_pCallbackInfo
- );
- AK_CALLBACK( void, AkOutputDeviceMeteringCallbackFunc )(
- AkOutputDeviceMeteringCallbackInfo * in_pCallbackInfo
- );
- AK_CALLBACK( void, AkBankCallbackFunc )(
- AkUInt32 in_bankID,
- const void * in_pInMemoryBankPtr,
- AKRESULT in_eLoadResult,
- void * in_pCookie
- );
- enum AkGlobalCallbackLocation
- {
- AkGlobalCallbackLocation_Register = (1 << 0),
- AkGlobalCallbackLocation_Begin = (1 << 1),
- AkGlobalCallbackLocation_PreProcessMessageQueueForRender = (1 << 2),
- AkGlobalCallbackLocation_PostMessagesProcessed = (1 << 3),
- AkGlobalCallbackLocation_BeginRender = (1 << 4),
- AkGlobalCallbackLocation_EndRender = (1 << 5),
- AkGlobalCallbackLocation_End = (1 << 6),
- AkGlobalCallbackLocation_Term = (1 << 7),
- AkGlobalCallbackLocation_Monitor = (1 << 8),
- AkGlobalCallbackLocation_MonitorRecap = (1 << 9),
- AkGlobalCallbackLocation_Init = (1 << 10),
- AkGlobalCallbackLocation_Suspend = (1 << 11),
- AkGlobalCallbackLocation_WakeupFromSuspend = (1 << 12),
-
- AkGlobalCallbackLocation_Num = 13
- };
- AK_CALLBACK( void, AkGlobalCallbackFunc )(
- AK::IAkGlobalPluginContext * in_pContext,
- AkGlobalCallbackLocation in_eLocation,
- void * in_pCookie
- );
- AK_CALLBACK( void, AkResourceMonitorCallbackFunc )(
- const AkResourceMonitorDataSummary * in_pdataSummary
- );
- namespace AK
- {
- enum AkAudioDeviceEvent
- {
- AkAudioDeviceEvent_Initialization,
- AkAudioDeviceEvent_Removal,
- AkAudioDeviceEvent_SystemRemoval
- };
-
-
- AK_CALLBACK(void, AkDeviceStatusCallbackFunc)(
- AK::IAkGlobalPluginContext * in_pContext,
- AkUniqueID in_idAudioDeviceShareset,
- AkUInt32 in_idDeviceID,
- AkAudioDeviceEvent in_idEvent,
- AKRESULT in_AkResult
- );
- }
- AK_CALLBACK(void, AkCaptureCallbackFunc)(
- AkAudioBuffer& in_CaptureBuffer,
- AkOutputDeviceID in_idOutput,
- void* in_pCookie
- );
- #endif
|