00001 00002 // 00003 // Copyright (c) 2006 Audiokinetic Inc. / All Rights Reserved 00004 // 00006 00007 // AkCallback.h 00008 00011 00012 00013 #ifndef _AK_CALLBACK_H_ 00014 #define _AK_CALLBACK_H_ 00015 00016 #include <AK/SoundEngine/Common/AkCommonDefs.h> 00017 #include <AK/SoundEngine/Common/AkMidiTypes.h> 00018 00019 namespace AK 00020 { 00021 class IAkMixerInputContext; 00022 class IAkMixerPluginContext; 00023 } 00024 00026 enum AkCallbackType 00027 { 00028 AK_EndOfEvent = 0x0001, 00029 AK_EndOfDynamicSequenceItem = 0x0002, 00030 AK_Marker = 0x0004, 00031 AK_Duration = 0x0008, 00032 00033 AK_SpeakerVolumeMatrix = 0x0010, 00034 00035 AK_Starvation = 0x0020, 00036 00037 AK_MusicPlaylistSelect = 0x0040, 00038 AK_MusicPlayStarted = 0x0080, 00039 00040 AK_MusicSyncBeat = 0x0100, 00041 AK_MusicSyncBar = 0x0200, 00042 AK_MusicSyncEntry = 0x0400, 00043 AK_MusicSyncExit = 0x0800, 00044 AK_MusicSyncGrid = 0x1000, 00045 AK_MusicSyncUserCue = 0x2000, 00046 AK_MusicSyncPoint = 0x4000, 00047 AK_MusicSyncAll = 0x7f00, 00048 00049 AK_MidiEvent = 0x10000, 00050 00051 AK_CallbackBits = 0xfffff, 00052 00053 // Not callback types, but need to be part of same bitfield for AK::SoundEngine::PostEvent(). 00054 AK_EnableGetSourcePlayPosition = 0x100000, 00055 AK_EnableGetMusicPlayPosition = 0x200000, 00056 AK_EnableGetSourceStreamBuffering = 0x400000 00057 }; 00058 00063 struct AkCallbackInfo 00064 { 00065 void * pCookie; 00066 AkGameObjectID gameObjID; 00067 }; 00068 00073 struct AkEventCallbackInfo : public AkCallbackInfo 00074 { 00075 AkPlayingID playingID; 00076 AkUniqueID eventID; 00077 }; 00078 00083 struct AkMidiEventCallbackInfo : public AkEventCallbackInfo 00084 { 00085 AkMidiEvent midiEvent; 00086 }; 00087 00088 00094 struct AkMarkerCallbackInfo : public AkEventCallbackInfo 00095 { 00096 AkUInt32 uIdentifier; 00097 AkUInt32 uPosition; 00098 const char* strLabel; 00099 }; 00100 00105 struct AkDurationCallbackInfo : public AkEventCallbackInfo 00106 { 00107 AkReal32 fDuration; 00108 AkReal32 fEstimatedDuration; 00109 AkUniqueID audioNodeID; 00110 bool bStreaming; 00111 }; 00112 00118 struct AkDynamicSequenceItemCallbackInfo : public AkCallbackInfo 00119 { 00120 AkPlayingID playingID; 00121 AkUniqueID audioNodeID; 00122 void* pCustomInfo; 00123 }; 00124 00140 struct AkSpeakerVolumeMatrixCallbackInfo : public AkEventCallbackInfo 00141 { 00142 AK::SpeakerVolumes::MatrixPtr pVolumes; 00143 AkChannelConfig inputConfig; 00144 AkChannelConfig outputConfig; 00145 AkReal32 * pfBaseVolume; 00146 AkReal32 * pfEmitterListenerVolume; 00147 AK::IAkMixerInputContext * pContext; 00148 AK::IAkMixerPluginContext * pMixerContext; 00149 }; 00150 00161 struct AkMusicPlaylistCallbackInfo : public AkEventCallbackInfo 00162 { 00163 AkUniqueID playlistID; 00164 AkUInt32 uNumPlaylistItems; 00165 AkUInt32 uPlaylistSelection; 00166 AkUInt32 uPlaylistItemDone; 00167 }; 00168 00176 struct AkMusicSyncCallbackInfo : public AkCallbackInfo 00177 { 00178 AkPlayingID playingID; 00179 AkCallbackType musicSyncType; 00180 AkReal32 fBeatDuration; 00181 AkReal32 fBarDuration; 00182 AkReal32 fGridDuration; 00183 AkReal32 fGridOffset; 00184 char * pszUserCueName; 00185 }; 00186 00200 AK_CALLBACK( void, AkCallbackFunc )( 00201 AkCallbackType in_eType, 00202 AkCallbackInfo* in_pCallbackInfo 00203 ); 00204 00210 AK_CALLBACK( void, AkBusCallbackFunc )( 00211 AkSpeakerVolumeMatrixCallbackInfo* in_pCallbackInfo 00212 ); 00213 00219 AK_CALLBACK( void, AkBusMeteringCallbackFunc )( 00220 AK::IAkMetering * in_pMetering, 00221 AkChannelConfig in_channelConfig, 00222 AkMeteringFlags in_eMeteringFlags 00223 ); 00224 00254 AK_CALLBACK( void, AkBankCallbackFunc )( 00255 AkUInt32 in_bankID, 00256 const void * in_pInMemoryBankPtr, 00257 AKRESULT in_eLoadResult, 00258 AkMemPoolId in_memPoolId, 00259 void * in_pCookie 00260 ); 00261 00267 AK_CALLBACK( void, AkGlobalCallbackFunc )( 00268 bool in_bLastCall 00269 ); 00270 00271 #endif // _AK_CALLBACK_H_ 00272
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise