バージョン
00001 /******************************************************************************* 00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology 00003 released in source code form as part of the SDK installer package. 00004 00005 Commercial License Usage 00006 00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology 00008 may use this file in accordance with the end user license agreement provided 00009 with the software or, alternatively, in accordance with the terms contained in a 00010 written agreement between you and Audiokinetic Inc. 00011 00012 Apache License Usage 00013 00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 00015 "Apache License"); you may not use this file except in compliance with the 00016 Apache License. You may obtain a copy of the Apache License at 00017 http://www.apache.org/licenses/LICENSE-2.0. 00018 00019 Unless required by applicable law or agreed to in writing, software distributed 00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for 00022 the specific language governing permissions and limitations under the License. 00023 00024 Version: <VERSION> Build: <BUILDNUMBER> 00025 Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc. 00026 *******************************************************************************/ 00027 00028 // AkCallback.h 00029 00032 00033 00034 #ifndef _AK_CALLBACK_H_ 00035 #define _AK_CALLBACK_H_ 00036 00037 #include <AK/SoundEngine/Common/AkCommonDefs.h> 00038 #include <AK/SoundEngine/Common/AkMidiTypes.h> 00039 00040 namespace AK 00041 { 00042 class IAkGlobalPluginContext; 00043 class IAkMixerInputContext; 00044 class IAkMixerPluginContext; 00045 } 00046 00048 enum AkCallbackType 00049 { 00050 AK_EndOfEvent = 0x0001, 00051 AK_EndOfDynamicSequenceItem = 0x0002, 00052 AK_Marker = 0x0004, 00053 AK_Duration = 0x0008, 00054 00055 AK_SpeakerVolumeMatrix = 0x0010, 00056 00057 AK_Starvation = 0x0020, 00058 00059 AK_MusicPlaylistSelect = 0x0040, 00060 AK_MusicPlayStarted = 0x0080, 00061 00062 AK_MusicSyncBeat = 0x0100, 00063 AK_MusicSyncBar = 0x0200, 00064 AK_MusicSyncEntry = 0x0400, 00065 AK_MusicSyncExit = 0x0800, 00066 AK_MusicSyncGrid = 0x1000, 00067 AK_MusicSyncUserCue = 0x2000, 00068 AK_MusicSyncPoint = 0x4000, 00069 AK_MusicSyncAll = 0x7f00, 00070 00071 AK_MIDIEvent = 0x10000, 00072 00073 AK_CallbackBits = 0xfffff, 00074 00075 // Not callback types, but need to be part of same bitfield for AK::SoundEngine::PostEvent(). 00076 AK_EnableGetSourcePlayPosition = 0x100000, 00077 AK_EnableGetMusicPlayPosition = 0x200000, 00078 AK_EnableGetSourceStreamBuffering = 0x400000 00079 }; 00080 00085 struct AkCallbackInfo 00086 { 00087 void * pCookie; 00088 AkGameObjectID gameObjID; 00089 }; 00090 00095 struct AkEventCallbackInfo : public AkCallbackInfo 00096 { 00097 AkPlayingID playingID; 00098 AkUniqueID eventID; 00099 }; 00100 00105 struct AkMIDIEventCallbackInfo : public AkEventCallbackInfo 00106 { 00107 AkMIDIEvent midiEvent; 00108 }; 00109 00110 00116 struct AkMarkerCallbackInfo : public AkEventCallbackInfo 00117 { 00118 AkUInt32 uIdentifier; 00119 AkUInt32 uPosition; 00120 const char* strLabel; 00121 }; 00122 00127 struct AkDurationCallbackInfo : public AkEventCallbackInfo 00128 { 00129 AkReal32 fDuration; 00130 AkReal32 fEstimatedDuration; 00131 AkUniqueID audioNodeID; 00132 AkUniqueID mediaID; 00133 bool bStreaming; 00134 }; 00135 00141 struct AkDynamicSequenceItemCallbackInfo : public AkCallbackInfo 00142 { 00143 AkPlayingID playingID; 00144 AkUniqueID audioNodeID; 00145 void* pCustomInfo; 00146 }; 00147 00163 struct AkSpeakerVolumeMatrixCallbackInfo : public AkEventCallbackInfo 00164 { 00165 AK::SpeakerVolumes::MatrixPtr pVolumes; 00166 AkChannelConfig inputConfig; 00167 AkChannelConfig outputConfig; 00168 AkReal32 * pfBaseVolume; 00169 AkReal32 * pfEmitterListenerVolume; 00170 AK::IAkMixerInputContext * pContext; 00171 AK::IAkMixerPluginContext * pMixerContext; 00172 }; 00173 00184 struct AkMusicPlaylistCallbackInfo : public AkEventCallbackInfo 00185 { 00186 AkUniqueID playlistID; 00187 AkUInt32 uNumPlaylistItems; 00188 AkUInt32 uPlaylistSelection; 00189 AkUInt32 uPlaylistItemDone; 00190 }; 00191 00193 struct AkSegmentInfo 00194 { 00195 AkTimeMs iCurrentPosition; 00196 AkTimeMs iPreEntryDuration; 00197 AkTimeMs iActiveDuration; 00198 AkTimeMs iPostExitDuration; 00199 AkTimeMs iRemainingLookAheadTime; 00200 AkReal32 fBeatDuration; 00201 AkReal32 fBarDuration; 00202 AkReal32 fGridDuration; 00203 AkReal32 fGridOffset; 00204 }; 00205 00213 struct AkMusicSyncCallbackInfo : public AkCallbackInfo 00214 { 00215 AkPlayingID playingID; 00216 AkSegmentInfo segmentInfo; 00217 AkCallbackType musicSyncType; 00218 char * pszUserCueName; 00219 }; 00220 00234 AK_CALLBACK( void, AkCallbackFunc )( 00235 AkCallbackType in_eType, 00236 AkCallbackInfo* in_pCallbackInfo 00237 ); 00238 00244 AK_CALLBACK( void, AkBusCallbackFunc )( 00245 AkSpeakerVolumeMatrixCallbackInfo* in_pCallbackInfo 00246 ); 00247 00253 AK_CALLBACK( void, AkBusMeteringCallbackFunc )( 00254 AK::IAkMetering * in_pMetering, 00255 AkChannelConfig in_channelConfig, 00256 AkMeteringFlags in_eMeteringFlags 00257 ); 00258 00288 AK_CALLBACK( void, AkBankCallbackFunc )( 00289 AkUInt32 in_bankID, 00290 const void * in_pInMemoryBankPtr, 00291 AKRESULT in_eLoadResult, 00292 AkMemPoolId in_memPoolId, 00293 void * in_pCookie 00294 ); 00295 00297 enum AkGlobalCallbackLocation 00298 { 00299 AkGlobalCallbackLocation_Register = (1 << 0), 00300 00301 AkGlobalCallbackLocation_Begin = (1 << 1), 00302 00303 AkGlobalCallbackLocation_PreProcessMessageQueueForRender = (1 << 2), 00304 AkGlobalCallbackLocation_BeginRender = (1 << 3), 00305 AkGlobalCallbackLocation_EndRender = (1 << 4), 00306 00307 AkGlobalCallbackLocation_End = (1 << 5), 00308 00309 AkGlobalCallbackLocation_Term = (1 << 6), 00310 00311 // IMPORTANT: Keep in sync with number of locations. 00312 AkGlobalCallbackLocation_Num = 7 00313 }; 00314 00322 AK_CALLBACK( void, AkGlobalCallbackFunc )( 00323 AK::IAkGlobalPluginContext * in_pContext, 00324 AkGlobalCallbackLocation in_eLocation, 00325 void * in_pCookie 00326 ); 00327 00328 #endif // _AK_CALLBACK_H_ 00329