AkMonitorError.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  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. // ALWAYS ADD NEW CODES AT THE END !!!!!!!
  281. // Otherwise it may break comm compatibility in a patch
  282. Num_ErrorCodes // THIS STAYS AT END OF ENUM
  283. };
  284. static_assert(Num_ErrorCodes == 211,
  285. "Please document your new ErrorCode "
  286. "in 'Documentation/Help/source_en/reference/common_errors_capture_log.xml', "
  287. "then you can increment this value."
  288. );
  289. /// Function prototype of local output function pointer.
  290. AK_CALLBACK( void, LocalOutputFunc )(
  291. ErrorCode in_eErrorCode, ///< Error code number value
  292. const AkOSChar* in_pszError, ///< Message or error string to be displayed
  293. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  294. AkPlayingID in_playingID, ///< Related Playing ID if applicable, AK_INVALID_PLAYING_ID otherwise
  295. AkGameObjectID in_gameObjID ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  296. );
  297. extern const MonitorErrorInfo s_aszMonitorErrorInfos[ Num_ErrorCodes ];
  298. /// Post a monitoring message or error code. This will be displayed in the Wwise capture
  299. /// log. Since this function doesn't send variable arguments, be sure that the error code you're posting doesn't contain any tag.
  300. /// Otherwise, there'll be an undefined behavior
  301. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  302. /// In optimized mode, this function returns AK_NotCompatible.
  303. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  304. /// called in the optimized/release configuration and return AK_NotCompatible.
  305. AK_EXTERNAPIFUNC( AKRESULT, PostCode )(
  306. ErrorCode in_eError, ///< Message or error code to be displayed
  307. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  308. AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
  309. AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  310. AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  311. bool in_bIsBus = false ///< true if in_audioNodeID is a bus
  312. );
  313. AK_EXTERNAPIFUNC(AKRESULT, PostCodeVarArg)(
  314. 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.
  315. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  316. 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
  317. ... ///< The variable arguments, depending on the ErrorCode posted.
  318. );
  319. /// Post a monitoring message. This will be displayed in the Wwise capture log.
  320. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  321. /// In optimized mode, this function returns AK_NotCompatible.
  322. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  323. /// called in the optimized/release configuration and return AK_NotCompatible.
  324. AK_EXTERNAPIFUNC(AKRESULT, PostCodeVaList)(
  325. 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.
  326. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  327. 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
  328. ::va_list args ///< The variable arguments, depending on the ErrorCode posted.
  329. );
  330. #ifdef AK_SUPPORT_WCHAR
  331. /// Post a unicode monitoring message or error string. This will be displayed in the Wwise capture
  332. /// log.
  333. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  334. /// In optimized mode, this function returns AK_NotCompatible.
  335. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  336. /// called in the optimized/release configuration and return AK_NotCompatible.
  337. AK_EXTERNAPIFUNC( AKRESULT, PostString )(
  338. const wchar_t* in_pszError, ///< Message or error string to be displayed
  339. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  340. AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
  341. AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  342. AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  343. bool in_bIsBus = false ///< true if in_audioNodeID is a bus
  344. );
  345. #endif // #ifdef AK_SUPPORT_WCHAR
  346. /// Post a monitoring message or error string. This will be displayed in the Wwise capture
  347. /// log.
  348. /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
  349. /// In optimized mode, this function returns AK_NotCompatible.
  350. /// \remark This function is provided as a tracking tool only. It does nothing if it is
  351. /// called in the optimized/release configuration and return AK_NotCompatible.
  352. AK_EXTERNAPIFUNC( AKRESULT, PostString )(
  353. const char* in_pszError, ///< Message or error string to be displayed
  354. ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
  355. AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
  356. AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
  357. AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
  358. bool in_bIsBus = false ///< true if in_audioNodeID is a bus
  359. );
  360. /// Enable/Disable local output of monitoring messages or errors. Pass 0 to disable,
  361. /// or any combination of ErrorLevel_Message and ErrorLevel_Error to enable.
  362. /// \return AK_Success.
  363. /// In optimized/release configuration, this function returns AK_NotCompatible.
  364. AK_EXTERNAPIFUNC( AKRESULT, SetLocalOutput )(
  365. AkUInt32 in_uErrorLevel = ErrorLevel_All, ///< ErrorLevel(s) to enable in output. Default parameters enable all.
  366. LocalOutputFunc in_pMonitorFunc = 0 ///< Handler for local output. If NULL, the standard platform debug output method is used.
  367. );
  368. /// Add a translator to the wwiseErrorHandler
  369. /// The additional translators increase the chance of a monitoring messages or errors
  370. /// to be succeffully translated.
  371. /// \return AK_Success.
  372. /// In optimized/release configuration, this function returns AK_NotCompatible.
  373. AK_EXTERNAPIFUNC( AKRESULT, AddTranslator )(
  374. AkErrorMessageTranslator* translator, ///< The AkErrorMessageTranslator to add to the WwiseErrorHandler
  375. bool overridePreviousTranslators = false ///< Whether or not the newly added translator should override all the previous translators.
  376. ///< In both cases, the default translator will remain
  377. );
  378. /// Reset the wwiseErrorHandler to only using the default translator
  379. /// \return AK_Success.
  380. /// In optimized/release configuration, this function returns AK_NotCompatible.
  381. AK_EXTERNAPIFUNC(AKRESULT, ResetTranslator)(
  382. );
  383. /// Get the time stamp shown in the capture log along with monitoring messages.
  384. /// \return Time stamp in milliseconds.
  385. /// In optimized/release configuration, this function returns 0.
  386. AK_EXTERNAPIFUNC( AkTimeMs, GetTimeStamp )();
  387. /// Add the streaming manager settings to the profiler capture.
  388. AK_EXTERNAPIFUNC(void, MonitorStreamMgrInit)(
  389. const AkStreamMgrSettings& in_streamMgrSettings
  390. );
  391. /// Add device settings to the list of active streaming devices.
  392. /// The list of streaming devices and their settings will be
  393. /// sent to the profiler capture when remote connecting from Wwise.
  394. ///
  395. /// \remark \c AK::Monitor::MonitorStreamMgrTerm must be called to
  396. /// clean-up memory used to keep track of active streaming devices.
  397. AK_EXTERNAPIFUNC(void, MonitorStreamingDeviceInit)(
  398. AkDeviceID in_deviceID,
  399. const AkDeviceSettings& in_deviceSettings
  400. );
  401. /// Remove streaming device entry from the list of devices
  402. /// to send when remote connecting from Wwise.
  403. AK_EXTERNAPIFUNC(void, MonitorStreamingDeviceDestroyed)(
  404. AkDeviceID in_deviceID
  405. );
  406. /// Monitor streaming manager destruction as part of the
  407. /// profiler capture.
  408. ///
  409. /// \remark This function must be called to clean-up memory used by
  410. /// \c AK::Monitor::MonitorStreamingDeviceInit and \c AK::Monitor::MonitorStreamingDeviceTerm
  411. /// to keep track of active streaming devices.
  412. AK_EXTERNAPIFUNC(void, MonitorStreamMgrTerm)();
  413. }
  414. }
  415. // Macros.
  416. #ifndef AK_OPTIMIZED
  417. #define AK_MONITOR_ERROR( in_eErrorCode ) \
  418. AK::Monitor::PostCode( in_eErrorCode, AK::Monitor::ErrorLevel_Error )
  419. #define AK_MONITOR_STREAM_MGR_INIT( in_streamMgrSettings ) \
  420. AK::Monitor::MonitorStreamMgrInit( in_streamMgrSettings )
  421. #define AK_MONITOR_STREAMING_DEVICE_INIT( in_deviceID, in_deviceSettings ) \
  422. AK::Monitor::MonitorStreamingDeviceInit( in_deviceID, in_deviceSettings )
  423. #define AK_MONITOR_STREAMING_DEVICE_DESTROYED( in_deviceID ) \
  424. AK::Monitor::MonitorStreamingDeviceDestroyed( in_deviceID )
  425. #define AK_MONITOR_STREAM_MGR_TERM( ) \
  426. AK::Monitor::MonitorStreamMgrTerm()
  427. #else
  428. #define AK_MONITOR_ERROR( in_eErrorCode )
  429. #define AK_MONITOR_STREAM_MGR_INIT( in_streamMgrSettings )
  430. #define AK_MONITOR_STREAMING_DEVICE_INIT( in_deviceID, in_deviceSettings )
  431. #define AK_MONITOR_STREAMING_DEVICE_DESTROYED( in_deviceID )
  432. #define AK_MONITOR_STREAM_MGR_TERM( )
  433. #endif
  434. #ifdef AK_MONITOR_IMPLEMENT_ERRORCODES
  435. #include <AK/Tools/Common/AkMonitorErrorImpl.h>
  436. #endif // AK_MONITOR_IMPLEMENT_ERRORCODES
  437. #endif // _AKMONITORERROR_H