AkMonitorError.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. /*******************************************************************************
  2. The content of this file includes portions of the AUDIOKINETIC Wwise Technology
  3. released in source code form as part of the SDK installer package.
  4. Commercial License Usage
  5. Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
  6. may use this file in accordance with the end user license agreement provided
  7. with the software or, alternatively, in accordance with the terms contained in a
  8. written agreement between you and Audiokinetic Inc.
  9. Apache License Usage
  10. Alternatively, this file may be used under the Apache License, Version 2.0 (the
  11. "Apache License"); you may not use this file except in compliance with the
  12. Apache License. You may obtain a copy of the Apache License at
  13. http://www.apache.org/licenses/LICENSE-2.0.
  14. Unless required by applicable law or agreed to in writing, software distributed
  15. under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
  16. OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
  17. the specific language governing permissions and limitations under the License.
  18. Copyright (c) 2023 Audiokinetic Inc.
  19. *******************************************************************************/
  20. #ifndef _AKMONITORERROR_H
  21. #define _AKMONITORERROR_H
  22. #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
  23. #include <AK/SoundEngine/Common/AkTypes.h>
  24. #define ERROR_CODE_DEF( in_name, in_msg ){ MonitorErrorInfo(in_name, in_msg) }
  25. struct AkStreamMgrSettings;
  26. struct AkDeviceSettings;
  27. class AkErrorMessageTranslator;
  28. namespace AK
  29. {
  30. // Error monitoring.
  31. namespace Monitor
  32. {
  33. // This structure contains information related to the error message
  34. struct MsgContext
  35. {
  36. MsgContext(AkPlayingID pId = AK_INVALID_PLAYING_ID, AkGameObjectID goId = AK_INVALID_GAME_OBJECT, AkUniqueID nodeId = AK_INVALID_UNIQUE_ID, bool isBus = false)
  37. : in_playingID{ pId },
  38. in_gameObjID{ goId },
  39. in_soundID{ nodeId },
  40. in_bIsBus{ isBus }
  41. {}
  42. AkPlayingID in_playingID; ///< Related Playing ID if applicable
  43. AkGameObjectID in_gameObjID; ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  44. AkUniqueID in_soundID; ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  45. bool in_bIsBus; ///< true if in_audioNodeID is a bus
  46. };
  47. struct MonitorErrorInfo
  48. {
  49. MonitorErrorInfo(const AkOSChar* in_name = nullptr, const AkOSChar* in_message= nullptr)
  50. : m_name{ in_name },
  51. m_message{in_message}
  52. {}
  53. const AkOSChar* m_name;
  54. const AkOSChar* m_message;
  55. };
  56. /// ErrorLevel
  57. enum ErrorLevel
  58. {
  59. ErrorLevel_Message = (1<<0), // used as bitfield
  60. ErrorLevel_Error = (1<<1),
  61. ErrorLevel_All = ErrorLevel_Message | ErrorLevel_Error
  62. };
  63. /// ErrorCode
  64. enum ErrorCode
  65. {
  66. ErrorCode_NoError = 0, // 0-based index into AK::Monitor::s_aszMonitorErrorInfos table
  67. ErrorCode_FileNotFound,
  68. ErrorCode_CannotOpenFile,
  69. ErrorCode_CannotStartStreamNoMemory,
  70. ErrorCode_IODevice,
  71. ErrorCode_IncompatibleIOSettings,
  72. ErrorCode_PluginUnsupportedChannelConfiguration,
  73. ErrorCode_PluginMediaUnavailable,
  74. ErrorCode_PluginInitialisationFailed,
  75. ErrorCode_PluginProcessingFailed,
  76. ErrorCode_PluginExecutionInvalid,
  77. ErrorCode_PluginAllocationFailed,
  78. ErrorCode_VorbisSeekTableRecommended,
  79. ErrorCode_VorbisDecodeError,
  80. ErrorCode_ATRAC9DecodeFailed,
  81. ErrorCode_ATRAC9LoopSectionTooSmall,
  82. ErrorCode_InvalidAudioFileHeader,
  83. ErrorCode_AudioFileHeaderTooLarge,
  84. ErrorCode_LoopTooSmall,
  85. ErrorCode_TransitionNotAccurateChannel,
  86. ErrorCode_TransitionNotAccuratePluginMismatch,
  87. ErrorCode_TransitionNotAccurateRejectedByPlugin,
  88. ErrorCode_TransitionNotAccurateStarvation,
  89. ErrorCode_TransitionNotAccurateCodecError,
  90. ErrorCode_NothingToPlay,
  91. ErrorCode_PlayFailed,
  92. ErrorCode_StingerCouldNotBeScheduled,
  93. ErrorCode_TooLongSegmentLookAhead,
  94. ErrorCode_CannotScheduleMusicSwitch,
  95. ErrorCode_TooManySimultaneousMusicSegments,
  96. ErrorCode_PlaylistStoppedForEditing,
  97. ErrorCode_MusicClipsRescheduledAfterTrackEdit,
  98. ErrorCode_CannotPlaySource_Create,
  99. ErrorCode_CannotPlaySource_VirtualOff,
  100. ErrorCode_CannotPlaySource_TimeSkip,
  101. ErrorCode_CannotPlaySource_InconsistentState,
  102. ErrorCode_MediaNotLoaded,
  103. ErrorCode_VoiceStarving,
  104. ErrorCode_StreamingSourceStarving,
  105. ErrorCode_XMADecoderSourceStarving,
  106. ErrorCode_XMADecodingError,
  107. ErrorCode_InvalidXMAData,
  108. ErrorCode_PluginNotRegistered,
  109. ErrorCode_CodecNotRegistered,
  110. ErrorCode_PluginVersionMismatch,
  111. ErrorCode_EventIDNotFound,
  112. ErrorCode_InvalidGroupID,
  113. ErrorCode_SelectedNodeNotAvailable,
  114. ErrorCode_SelectedMediaNotAvailable,
  115. ErrorCode_NoValidSwitch,
  116. ErrorCode_BankLoadFailed,
  117. ErrorCode_ErrorWhileLoadingBank,
  118. ErrorCode_InsufficientSpaceToLoadBank,
  119. ErrorCode_LowerEngineCommandListFull,
  120. ErrorCode_SeekNoMarker,
  121. ErrorCode_CannotSeekContinuous,
  122. ErrorCode_SeekAfterEof,
  123. ErrorCode_UnknownGameObject,
  124. ErrorCode_GameObjectNeverRegistered, //To be used by the Capture Log to replace ErrorCode_UnknownGameObject
  125. ErrorCode_DeadGameObject, //To be used by the Capture Log to replace ErrorCode_UnknownGameObject
  126. ErrorCode_GameObjectIsNotEmitter,
  127. ErrorCode_ExternalSourceNotResolved,
  128. ErrorCode_FileFormatMismatch,
  129. ErrorCode_CommandQueueFull,
  130. ErrorCode_CommandTooLarge,
  131. ErrorCode_XMACreateDecoderLimitReached,
  132. ErrorCode_XMAStreamBufferTooSmall,
  133. ErrorCode_ModulatorScopeError_Inst,
  134. ErrorCode_ModulatorScopeError_Obj,
  135. ErrorCode_SeekAfterEndOfPlaylist,
  136. ErrorCode_OpusRequireSeekTable,
  137. ErrorCode_OpusDecodeError,
  138. ErrorCode_SourcePluginNotFound,
  139. ErrorCode_VirtualVoiceLimit,
  140. ErrorCode_NotEnoughMemoryToStart,
  141. ErrorCode_UnknownOpusError, //Deprecated Opus error.
  142. ErrorCode_AudioDeviceInitFailure,
  143. ErrorCode_AudioDeviceRemoveFailure,
  144. ErrorCode_AudioDeviceNotFound,
  145. ErrorCode_AudioDeviceNotValid,
  146. ErrorCode_SpatialAudio_ListenerAutomationNotSupported,
  147. ErrorCode_MediaDuplicationLength,
  148. ErrorCode_HwVoicesSystemInitFailed, // When the hardware-accelerated subsystem fails to initialize
  149. ErrorCode_HwVoicesDecodeBatchFailed, // When a grouping of hardware-accelerated voices fail to decode collectively
  150. ErrorCode_HwVoiceLimitReached, // Cannot create any more hardware-accelerated voices
  151. ErrorCode_HwVoiceInitFailed, // A hardware-accelerated voice fails to be created, but not because the max number of voices was reached
  152. ErrorCode_OpusHWCommandFailed,
  153. ErrorCode_AddOutputListenerIdWithZeroListeners,
  154. ErrorCode_3DObjectLimitExceeded,
  155. ErrorCode_OpusHWFatalError,
  156. ErrorCode_OpusHWDecodeUnavailable,
  157. ErrorCode_OpusHWTimeout,
  158. ErrorCode_SystemAudioObjectsUnavailable,
  159. ErrorCode_AddOutputNoDistinctListener,
  160. ErrorCode_PluginCannotRunOnObjectConfig,
  161. ErrorCode_SpatialAudio_ReflectionBusError,
  162. ErrorCode_VorbisHWDecodeUnavailable,
  163. ErrorCode_ExternalSourceNoMemorySize,
  164. ErrorCode_MonitorQueueFull,
  165. ErrorCode_MonitorMsgTooLarge,
  166. ErrorCode_NonCompliantDeviceMemory,
  167. ErrorCode_JobWorkerFuncCallMismatch,
  168. ErrorCode_JobMgrOutOfMemory,
  169. ErrorCode_InvalidFileSize,
  170. ErrorCode_PluginMsg,
  171. ErrorCode_SinkOpenSL,
  172. ErrorCode_AudioOutOfRange,
  173. ErrorCode_AudioOutOfRangeOnBus,
  174. ErrorCode_AudioOutOfRangeOnBusFx,
  175. ErrorCode_AudioOutOfRangeRay,
  176. ErrorCode_UnknownDialogueEvent,
  177. ErrorCode_FailedPostingEvent,
  178. ErrorCode_OutputDeviceInitializationFailed,
  179. ErrorCode_UnloadBankFailed,
  180. ErrorCode_PluginFileNotFound,
  181. ErrorCode_PluginFileIncompatible,
  182. ErrorCode_PluginFileNotEnoughMemoryToStart,
  183. ErrorCode_PluginFileInvalid,
  184. ErrorCode_PluginFileRegisterFailed,
  185. ErrorCode_UnknownArgument,
  186. ErrorCode_DynamicSequenceAlreadyClosed,
  187. ErrorCode_PendingActionDestroyed,
  188. ErrorCode_CrossFadeTransitionIgnored,
  189. ErrorCode_MusicRendererSeekingFailed,
  190. //MONITOR_ERRORMSG
  191. ErrorCode_DynamicSequenceIdNotFound,
  192. ErrorCode_BusNotFoundByName,
  193. ErrorCode_AudioDeviceShareSetNotFound,
  194. ErrorCode_AudioDeviceShareSetNotFoundByName,
  195. ErrorCode_SoundEngineTooManyGameObjects,
  196. ErrorCode_SoundEngineTooManyPositions,
  197. ErrorCode_SoundEngineCantCallOnChildBus,
  198. ErrorCode_SoundEnginePlayingIdNotFound,
  199. ErrorCode_SoundEngineInvalidTransform,
  200. ErrorCode_SoundEngineTooManyEventPosts,
  201. ErrorCode_AudioSubsystemStoppedResponding,
  202. ErrorCode_NotEnoughMemInFunction,
  203. ErrorCode_FXNotFound,
  204. ErrorCode_SetMixerNotABus,
  205. ErrorCode_AudioNodeNotFound,
  206. ErrorCode_SetMixerFailed,
  207. ErrorCode_SetBusConfigUnsupported,
  208. ErrorCode_BusNotFound,
  209. ErrorCode_MismatchingMediaSize,
  210. ErrorCode_IncompatibleBankVersion,
  211. ErrorCode_UnexpectedPrepareGameSyncsCall,
  212. ErrorCode_MusicEngineNotInitialized,
  213. ErrorCode_LoadingBankMismatch,
  214. ErrorCode_MasterBusStructureNotLoaded,
  215. ErrorCode_TooManyChildren,
  216. ErrorCode_BankContainUneditableEffect,
  217. ErrorCode_MemoryAllocationFailed,
  218. ErrorCode_InvalidFloatPriority,
  219. ErrorCode_SoundLoadFailedInsufficientMemory,
  220. ErrorCode_NXDeviceRegistrationFailed,
  221. ErrorCode_MixPluginOnObjectBus,
  222. ErrorCode_XboxXMAVoiceResetFailed,
  223. ErrorCode_XboxACPMessage,
  224. ErrorCode_XboxFrameDropped,
  225. ErrorCode_XboxACPError,
  226. ErrorCode_XboxXMAFatalError,
  227. ErrorCode_MissingMusicNodeParent,
  228. ErrorCode_HardwareOpusDecoderError,
  229. ErrorCode_SetGeometryTooManyTriangleConnected,
  230. ErrorCode_SetGeometryTriangleTooLarge,
  231. ErrorCode_SetGeometryFailed,
  232. ErrorCode_RemovingGeometrySetFailed,
  233. ErrorCode_SetGeometryInstanceFailed,
  234. ErrorCode_RemovingGeometryInstanceFailed,
  235. ErrorCode_RevertingToDefaultAudioDevice,
  236. ErrorCode_RevertingToDummyAudioDevice,
  237. ErrorCode_AudioThreadSuspended,
  238. ErrorCode_AudioThreadResumed,
  239. ErrorCode_ResetPlaylistActionIgnoredGlobalScope,
  240. ErrorCode_ResetPlaylistActionIgnoredContinuous,
  241. ErrorCode_PlayingTriggerRateNotSupported,
  242. ErrorCode_SetGeometryTriangleIsSkipped,
  243. ErrorCode_SetGeometryInstanceInvalidTransform,
  244. //AkSpatialAudio:AkMonitorError_WithID
  245. ErrorCode_SetGameObjectRadiusSizeError,
  246. ErrorCode_SetPortalNonDistinctRoom,
  247. ErrorCode_SetPortalInvalidExtent,
  248. ErrorCode_SpatialAudio_PortalNotFound,
  249. //Invalid float
  250. ErrorCode_InvalidFloatInFunction,
  251. ErrorCode_FLTMAXNotSupported,
  252. ErrorCode_CannotInitializeAmbisonicChannelConfiguration,
  253. ErrorCode_CannotInitializePassthrough,
  254. ErrorCode_3DAudioUnsupportedSize,
  255. ErrorCode_AmbisonicNotAvailable,
  256. ErrorCode_NoAudioDevice,
  257. ErrorCode_Support,
  258. ErrorCode_ReplayMessage,
  259. ErrorCode_GameMessage,
  260. ErrorCode_TestMessage,
  261. ErrorCode_TranslatorStandardTagTest,
  262. ErrorCode_TranslatorWwiseTagTest,
  263. ErrorCode_TranslatorStringSizeTest,
  264. ErrorCode_InvalidParameter,
  265. ErrorCode_MaxAudioObjExceeded,
  266. ErrorCode_MMSNotEnabled,
  267. ErrorCode_NotEnoughSystemObj,
  268. ErrorCode_NotEnoughSystemObjWin,
  269. ErrorCode_TransitionNotAccurateSourceTooShort,
  270. ErrorCode_AlreadyInitialized,
  271. ErrorCode_WrongNumberOfArguments,
  272. ErrorCode_DataAlignement,
  273. ErrorCode_PluginMsgWithShareSet,
  274. ErrorCode_SoundEngineNotInit,
  275. ErrorCode_NoDefaultSwitch,
  276. ErrorCode_CantSetBoundSwitch,
  277. ErrorCode_IODeviceInitFailed,
  278. ErrorCode_SwitchListEmpty,
  279. ErrorCode_NoSwitchSelected,
  280. ErrorCode_FilePermissionError,
  281. ErrorCode_SetEffectOnRendered,
  282. ErrorCode_GeometryNotWatertight,
  283. ErrorCode_CannotInitialize3DAudio,
  284. ErrorCode_CannotInitializeInputCallbacks,
  285. ErrorCode_CannotConnectAVAudioEngineSource,
  286. ErrorCode_ChannelConfigRequestDenied,
  287. ErrorCode_MediaUpdatedFromWwise,
  288. ErrorCode_MediaErrorFromWwise,
  289. ErrorCode_OutputAlreadyExists,
  290. ErrorCode_UnknownStateGroup,
  291. ErrorCode_MediaErrorWwiseMRUFull,
  292. ErrorCode_AudioOut2ContextCreateError,
  293. ErrorCode_AudioOut2UserCreateError,
  294. ErrorCode_FeedbackOnAudioObjectsBus,
  295. ErrorCode_AssetSwapEnabled,
  296. ErrorCode_SpatialAudio_SiblingPortal,
  297. // ALWAYS ADD NEW CODES AT THE END !!!!!!!
  298. // Otherwise it may break comm compatibility in a patch
  299. Num_ErrorCodes // THIS STAYS AT END OF ENUM
  300. };
  301. static_assert(Num_ErrorCodes == 228,
  302. "Please document your new ErrorCode "
  303. "in 'Documentation/Help/source_en/reference/common_errors_capture_log.xml', "
  304. "then you can increment this value."
  305. );
  306. /// Function prototype of local output function pointer.
  307. AK_CALLBACK( void, LocalOutputFunc )(
  308. ErrorCode in_eErrorCode, ///< Error code number value
  309. const AkOSChar* in_pszError, ///< Message or error string to be displayed
  310. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  311. AkPlayingID in_playingID, ///< Related Playing ID if applicable, AK_INVALID_PLAYING_ID otherwise
  312. AkGameObjectID in_gameObjID ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  313. );
  314. extern const MonitorErrorInfo s_aszMonitorErrorInfos[ Num_ErrorCodes ];
  315. /// Post a monitoring message or error code. This will be displayed in the Wwise capture
  316. /// log. Since this function doesn't send variable arguments, be sure that the error code you're posting doesn't contain any tag.
  317. /// Otherwise, there'll be an undefined behavior
  318. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  319. /// In optimized mode, this function returns AK_NotCompatible.
  320. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  321. /// called in the optimized/release configuration and return AK_NotCompatible.
  322. AK_EXTERNAPIFUNC( AKRESULT, PostCode )(
  323. ErrorCode in_eError, ///< Message or error code to be displayed
  324. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  325. AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
  326. AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  327. AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  328. bool in_bIsBus = false ///< true if in_audioNodeID is a bus
  329. );
  330. AK_EXTERNAPIFUNC(AKRESULT, PostCodeVarArg)(
  331. ErrorCode in_eError, ///< Error code to be displayed. This code corresponds to a predefined message, that may have parameters that can be passed in the variable arguments. Check the message format at the end of AkMonitorError.h.
  332. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  333. MsgContext msgContext, ///< The message context containing the following information : Related Playing ID if applicable, Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise, Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise and whether if in_audioNodeID is a bus
  334. ... ///< The variable arguments, depending on the ErrorCode posted.
  335. );
  336. /// Post a monitoring message. This will be displayed in the Wwise capture log.
  337. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  338. /// In optimized mode, this function returns AK_NotCompatible.
  339. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  340. /// called in the optimized/release configuration and return AK_NotCompatible.
  341. AK_EXTERNAPIFUNC(AKRESULT, PostCodeVaList)(
  342. ErrorCode in_eError, ///< Error code to be displayed. This code corresponds to a predefined message, that may have parameters that can be passed in the variable arguments. Check the message format at the end of AkMonitorError.h.
  343. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  344. MsgContext msgContext, ///< The message context containing the following information : Related Playing ID if applicable, Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise, Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise and whether if in_audioNodeID is a bus
  345. ::va_list args ///< The variable arguments, depending on the ErrorCode posted.
  346. );
  347. #ifdef AK_SUPPORT_WCHAR
  348. /// Post a unicode monitoring message or error string. This will be displayed in the Wwise capture
  349. /// log.
  350. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  351. /// In optimized mode, this function returns AK_NotCompatible.
  352. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  353. /// called in the optimized/release configuration and return AK_NotCompatible.
  354. AK_EXTERNAPIFUNC( AKRESULT, PostString )(
  355. const wchar_t* in_pszError, ///< Message or error string to be displayed
  356. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  357. AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
  358. AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  359. AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  360. bool in_bIsBus = false ///< true if in_audioNodeID is a bus
  361. );
  362. #endif // #ifdef AK_SUPPORT_WCHAR
  363. /// Post a monitoring message or error string. This will be displayed in the Wwise capture
  364. /// log.
  365. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  366. /// In optimized mode, this function returns AK_NotCompatible.
  367. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  368. /// called in the optimized/release configuration and return AK_NotCompatible.
  369. AK_EXTERNAPIFUNC( AKRESULT, PostString )(
  370. const char* in_pszError, ///< Message or error string to be displayed
  371. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  372. AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
  373. AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  374. AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  375. bool in_bIsBus = false ///< true if in_audioNodeID is a bus
  376. );
  377. /// Enable/Disable local output of monitoring messages or errors. Pass 0 to disable,
  378. /// or any combination of ErrorLevel_Message and ErrorLevel_Error to enable.
  379. /// \return AK_Success.
  380. /// In optimized/release configuration, this function returns AK_NotCompatible.
  381. AK_EXTERNAPIFUNC( AKRESULT, SetLocalOutput )(
  382. AkUInt32 in_uErrorLevel = ErrorLevel_All, ///< ErrorLevel(s) to enable in output. Default parameters enable all.
  383. LocalOutputFunc in_pMonitorFunc = 0 ///< Handler for local output. If NULL, the standard platform debug output method is used.
  384. );
  385. /// Add a translator to the wwiseErrorHandler
  386. /// The additional translators increase the chance of a monitoring messages or errors
  387. /// to be succeffully translated.
  388. /// \return AK_Success.
  389. /// In optimized/release configuration, this function returns AK_NotCompatible.
  390. AK_EXTERNAPIFUNC( AKRESULT, AddTranslator )(
  391. AkErrorMessageTranslator* translator, ///< The AkErrorMessageTranslator to add to the WwiseErrorHandler
  392. bool overridePreviousTranslators = false ///< Whether or not the newly added translator should override all the previous translators.
  393. ///< In both cases, the default translator will remain
  394. );
  395. /// Reset the wwiseErrorHandler to only using the default translator
  396. /// \return AK_Success.
  397. /// In optimized/release configuration, this function returns AK_NotCompatible.
  398. AK_EXTERNAPIFUNC(AKRESULT, ResetTranslator)(
  399. );
  400. /// Get the time stamp shown in the capture log along with monitoring messages.
  401. /// \return Time stamp in milliseconds.
  402. /// In optimized/release configuration, this function returns 0.
  403. AK_EXTERNAPIFUNC( AkTimeMs, GetTimeStamp )();
  404. /// Add the streaming manager settings to the profiler capture.
  405. AK_EXTERNAPIFUNC(void, MonitorStreamMgrInit)(
  406. const AkStreamMgrSettings& in_streamMgrSettings
  407. );
  408. /// Add device settings to the list of active streaming devices.
  409. /// The list of streaming devices and their settings will be
  410. /// sent to the profiler capture when remote connecting from Wwise.
  411. ///
  412. /// \remark \c AK::Monitor::MonitorStreamMgrTerm must be called to
  413. /// clean-up memory used to keep track of active streaming devices.
  414. AK_EXTERNAPIFUNC(void, MonitorStreamingDeviceInit)(
  415. AkDeviceID in_deviceID,
  416. const AkDeviceSettings& in_deviceSettings
  417. );
  418. /// Remove streaming device entry from the list of devices
  419. /// to send when remote connecting from Wwise.
  420. AK_EXTERNAPIFUNC(void, MonitorStreamingDeviceDestroyed)(
  421. AkDeviceID in_deviceID
  422. );
  423. /// Monitor streaming manager destruction as part of the
  424. /// profiler capture.
  425. ///
  426. /// \remark This function must be called to clean-up memory used by
  427. /// \c AK::Monitor::MonitorStreamingDeviceInit and \c AK::Monitor::MonitorStreamingDeviceTerm
  428. /// to keep track of active streaming devices.
  429. AK_EXTERNAPIFUNC(void, MonitorStreamMgrTerm)();
  430. }
  431. }
  432. // Macros.
  433. #ifndef AK_OPTIMIZED
  434. #define AK_MONITOR_ERROR( in_eErrorCode ) \
  435. AK::Monitor::PostCode( in_eErrorCode, AK::Monitor::ErrorLevel_Error )
  436. #define AK_MONITOR_STREAM_MGR_INIT( in_streamMgrSettings ) \
  437. AK::Monitor::MonitorStreamMgrInit( in_streamMgrSettings )
  438. #define AK_MONITOR_STREAMING_DEVICE_INIT( in_deviceID, in_deviceSettings ) \
  439. AK::Monitor::MonitorStreamingDeviceInit( in_deviceID, in_deviceSettings )
  440. #define AK_MONITOR_STREAMING_DEVICE_DESTROYED( in_deviceID ) \
  441. AK::Monitor::MonitorStreamingDeviceDestroyed( in_deviceID )
  442. #define AK_MONITOR_STREAM_MGR_TERM( ) \
  443. AK::Monitor::MonitorStreamMgrTerm()
  444. #else
  445. #define AK_MONITOR_ERROR( in_eErrorCode )
  446. #define AK_MONITOR_STREAM_MGR_INIT( in_streamMgrSettings )
  447. #define AK_MONITOR_STREAMING_DEVICE_INIT( in_deviceID, in_deviceSettings )
  448. #define AK_MONITOR_STREAMING_DEVICE_DESTROYED( in_deviceID )
  449. #define AK_MONITOR_STREAM_MGR_TERM( )
  450. #endif
  451. #ifdef AK_MONITOR_IMPLEMENT_ERRORCODES
  452. #include <AK/Tools/Common/AkMonitorErrorImpl.h>
  453. #endif // AK_MONITOR_IMPLEMENT_ERRORCODES
  454. #endif // _AKMONITORERROR_H