Version
menu_open
link
Wwise SDK 2018.1.11
AkMonitorError.h
Go to the documentation of this file.
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 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 #ifndef _AKMONITORERROR_H
29 #define _AKMONITORERROR_H
30 
33 
34 namespace AK
35 {
36  // Error monitoring.
37 
38  namespace Monitor
39  {
40  /// ErrorLevel
41  enum ErrorLevel
42  {
43  ErrorLevel_Message = (1<<0), // used as bitfield
44  ErrorLevel_Error = (1<<1),
45 
47  };
48  /// ErrorCode
49  enum ErrorCode
50  {
51  ErrorCode_NoError = 0, // 0-based index into AK::Monitor::s_aszErrorCodes table
57 
64 
66 
69 
70  ErrorCode_xWMACreateDecoderFailed,//Deprecated, keep in place for legacy maintenance.
71 
77 
81 
86 
93 
104 
108 
110 
116 
118 
120 
125 
127 
131 
139 
142 
145 
148 
151 
153 
157 
159 
161 
163 
166 
168 
170 
171  Num_ErrorCodes // THIS STAYS AT END OF ENUM
172  };
173 
174  /// Function prototype of local output function pointer.
176  ErrorCode in_eErrorCode, ///< Error code number value
177  const AkOSChar* in_pszError, ///< Message or error string to be displayed
178  ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
179  AkPlayingID in_playingID, ///< Related Playing ID if applicable, AK_INVALID_PLAYING_ID otherwise
180  AkGameObjectID in_gameObjID ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
181  );
182 
183  extern const AkOSChar* s_aszErrorCodes[ Num_ErrorCodes ];
184 
185  /// Post a monitoring message or error code. This will be displayed in the Wwise capture
186  /// log.
187  /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
188  /// In optimized mode, this function returns AK_NotCompatible.
189  /// \remark This function is provided as a tracking tool only. It does nothing if it is
190  /// called in the optimized/release configuration and return AK_NotCompatible.
192  ErrorCode in_eError, ///< Message or error code to be displayed
193  ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
194  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
195  AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
196  AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
197  bool in_bIsBus = false ///< true if in_audioNodeID is a bus
198  );
199 #ifdef AK_SUPPORT_WCHAR
200  /// Post a unicode monitoring message or error string. This will be displayed in the Wwise capture
201  /// log.
202  /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
203  /// In optimized mode, this function returns AK_NotCompatible.
204  /// \remark This function is provided as a tracking tool only. It does nothing if it is
205  /// called in the optimized/release configuration and return AK_NotCompatible.
207  const wchar_t* in_pszError, ///< Message or error string to be displayed
208  ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
209  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
210  AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
211  AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
212  bool in_bIsBus = false ///< true if in_audioNodeID is a bus
213  );
214 #endif // #ifdef AK_SUPPORT_WCHAR
215  /// Post a monitoring message or error string. This will be displayed in the Wwise capture
216  /// log.
217  /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
218  /// In optimized mode, this function returns AK_NotCompatible.
219  /// \remark This function is provided as a tracking tool only. It does nothing if it is
220  /// called in the optimized/release configuration and return AK_NotCompatible.
222  const char* in_pszError, ///< Message or error string to be displayed
223  ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error
224  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID, ///< Related Playing ID if applicable
225  AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise
226  AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, ///< Related Audio Node ID if applicable, AK_INVALID_UNIQUE_ID otherwise
227  bool in_bIsBus = false ///< true if in_audioNodeID is a bus
228  );
229 
230  /// Enable/Disable local output of monitoring messages or errors. Pass 0 to disable,
231  /// or any combination of ErrorLevel_Message and ErrorLevel_Error to enable.
232  /// \return AK_Success.
233  /// In optimized/release configuration, this function returns AK_NotCompatible.
235  AkUInt32 in_uErrorLevel = ErrorLevel_All, ///< ErrorLevel(s) to enable in output. Default parameters enable all.
236  LocalOutputFunc in_pMonitorFunc = 0 ///< Handler for local output. If NULL, the standard platform debug output method is used.
237  );
238 
239  /// Get the time stamp shown in the capture log along with monitoring messages.
240  /// \return Time stamp in milliseconds.
241  /// In optimized/release configuration, this function returns 0.
243  }
244 }
245 
246 // Macros.
247 #ifndef AK_OPTIMIZED
248  #define AK_MONITOR_ERROR( in_eErrorCode )\
249  AK::Monitor::PostCode( in_eErrorCode, AK::Monitor::ErrorLevel_Error )
250 #else
251  #define AK_MONITOR_ERROR( in_eErrorCode )
252 #endif
253 
254 #ifdef AK_MONITOR_IMPLEMENT_ERRORCODES
255 namespace AK
256 {
257  namespace Monitor
258  {
260  {
261  AKTEXT("No error"), // ErrorCode_NoError
262  AKTEXT("File not found"), // ErrorCode_FileNotFound,
263  AKTEXT("Cannot open file"), // ErrorCode_CannotOpenFile,
264  AKTEXT("Not enough memory in I/O pool to start stream"), // ErrorCode_CannotStartStreamNoMemory,
265  AKTEXT("Unknown I/O device error"), // ErrorCode_IODevice,
266  AKTEXT("I/O settings incompatible."), // ErrorCode_IncompatibleIOSettings
267 
268  AKTEXT("Plug-in unsupported channel configuration"), // ErrorCode_PluginUnsupportedChannelConfiguration,
269  AKTEXT("Plug-in media unavailable"), // ErrorCode_PluginMediaUnavailable,
270  AKTEXT("Plug-in initialization failure"), // ErrorCode_PluginInitialisationFailed,
271  AKTEXT("Plug-in execution failure"), // ErrorCode_PluginProcessingFailed,
272  AKTEXT("Invalid plug-in execution mode"), // ErrorCode_PluginExecutionInvalid
273  AKTEXT("Could not allocate effect"), // ErrorCode_PluginAllocationFailed
274 
275 AKTEXT("Seek table required to seek in Vorbis sources. Please update conversion settings."), // ErrorCode_VorbisRequireSeekTable,
276 
277 AKTEXT("Vorbis decoder failure"), // ErrorCode_VorbisDecodeError,
278 AKTEXT("AAC decoder failure"), // ErrorCode_AACDecodeError
279 
280 AKTEXT("Failed creating xWMA decoder"), // ErrorCode_xWMACreateDecoderFailed,
281 
282 AKTEXT("Failed creating ATRAC9 decoder"), // ErrorCode_ATRAC9CreateDecoderFailed
283 AKTEXT("Failed creating ATRAC9 decoder: no more ATRAC9 decoding channels available"), // ErrorCode_ATRAC9CreateDecoderFailedChShortage
284 AKTEXT("ATRAC9 decoding failed"), // ErrorCode_ATRAC9DecodeFailed
285 AKTEXT("ATRAC9 context clear failed"), // ErrorCode_ATRAC9ClearContextFailed
286 AKTEXT("ATRAC9 loop section is too small"), // ErrorCode_ATRAC9LoopSectionTooSmall
287 
288 AKTEXT("Invalid file header"), // ErrorCode_InvalidAudioFileHeader,
289 AKTEXT("File header too large (due to markers or envelope)"), // ErrorCode_AudioFileHeaderTooLarge,
290 AKTEXT("File or loop region is too small to be played properly"), // ErrorCode_FileTooSmall,
291 
292 AKTEXT("Transition not sample-accurate due to mixed channel configurations"), // ErrorCode_TransitionNotAccurateChannel,
293 AKTEXT("Transition not sample-accurate due to source starvation"), // ErrorCode_TransitionNotAccurateStarvation,
294 AKTEXT("Nothing to play in Dynamic Sequence"), // ErrorCode_NothingToPlay,
295 AKTEXT("Play Failed"), // ErrorCode_PlayFailed, // Notification meaning the play asked was not done for an out of control reason
296 // For example, if The Element has a missing source file.
297 
298 AKTEXT("Stinger could not be scheduled in this segment or was dropped"), // ErrorCode_StingerCouldNotBeScheduled,
299 AKTEXT("Segment look-ahead plus pre-entry duration is longer than previous segment in sequence"), // ErrorCode_TooLongSegmentLookAhead,
300 AKTEXT("Cannot schedule music switch transition in upcoming segments: using Exit Cue"), // ErrorCode_CannotScheduleMusicSwitch,
301 AKTEXT("Cannot schedule music segments: Stopping music"), // ErrorCode_TooManySimultaneousMusicSegments,
302 AKTEXT("Music system is stopped because a music playlist is modified"), // ErrorCode_PlaylistStoppedForEditing
303 AKTEXT("Rescheduling music clips because a track was modified"), // ErrorCode_MusicClipsRescheduledAfterTrackEdit
304 
305 AKTEXT("Failed creating source"), // ErrorCode_CannotPlaySource_Create,
306 AKTEXT("Virtual source failed becoming physical"), // ErrorCode_CannotPlaySource_VirtualOff,
307 AKTEXT("Error while computing virtual source elapsed time"), // ErrorCode_CannotPlaySource_TimeSkip,
308 AKTEXT("Inconsistent source status"), // ErrorCode_CannotPlaySource_InconsistentState,
309 AKTEXT("Media was not loaded for this source"),// ErrorCode_MediaNotLoaded,
310 AKTEXT("Voice Starvation"), // ErrorCode_VoiceStarving,
311 AKTEXT("Source starvation"), // ErrorCode_StreamingSourceStarving,
312 AKTEXT("XMA decoder starvation"), // ErrorCode_XMADecoderSourceStarving,
313 AKTEXT("XMA decoding error"), // ErrorCode_XMADecodingError
314 AKTEXT("Invalid XMA data - Make sure data is allocated from APU memory and is aligned to 2K."), // ErrorCode_InvalidXMAData
315 
316 AKTEXT("Plug-in not found"), // ErrorCode_PluginNotRegistered,
317 AKTEXT("Codec plug-in not registered"), // ErrorCode_CodecNotRegistered,
318 AKTEXT("Plug-in version doesn't match sound engine version. Please ensure the plug-in is compatible with this version of Wwise"), //ErrorCode_PluginVersionMismatch
319 
320 AKTEXT("Event ID not found"), // ErrorCode_EventIDNotFound,
321 
322 AKTEXT("Invalid State Group ID"), // ErrorCode_InvalidGroupID,
323 AKTEXT("Selected Child Not Available"), // ErrorCode_SelectedChildNotAvailable,
324 AKTEXT("Selected Node Not Available"), // ErrorCode_SelectedNodeNotAvailable,
325 AKTEXT("Selected Media Not Available"),// ErrorCode_SelectedMediaNotAvailable,
326 AKTEXT("No Valid Switch"), // ErrorCode_NoValidSwitch,
327 
328 AKTEXT("Selected node not available. Make sure the structure associated to the event is loaded or that the event has been prepared"), // ErrorCode_SelectedNodeNotAvailablePlay,
329 
330 AKTEXT("Motion voice starvation"), // ErrorCode_FeedbackVoiceStarving,
331 
332 AKTEXT("Bank Load Failed"), // ErrorCode_BankLoadFailed,
333 AKTEXT("Bank Unload Failed"), // ErrorCode_BankUnloadFailed,
334 AKTEXT("Error while loading bank"), // ErrorCode_ErrorWhileLoadingBank,
335 AKTEXT("Insufficient Space to Load Bank"), // ErrorCode_InsufficientSpaceToLoadBank,
336 
337 AKTEXT("Lower engine command list is full"), // ErrorCode_LowerEngineCommandListFull,
338 
339 AKTEXT("No marker in file; seeking to specified location"), // ErrorCode_SeekNoMarker
340 AKTEXT("Cannot seek in sound that is within a continuous container with special transitions"), // ErrorCode_CannotSeekContinuous
341 AKTEXT("Seeking after end of file. Playback will stop"), // ErrorCode_SeekAfterEof
342 
343 AKTEXT("Unknown game object ID. Make sure the game object is registered before using it and do not use it once it was unregistered."), // ErrorCode_UnknownGameObject,
344 
345 AKTEXT("Unknown emitter game object ID. Make sure the game object is registered before using it and do not use it once it was unregistered."), // ErrorCode_UnknownEmitter,
346 AKTEXT("Unknown listener game object ID. Make sure the game object is registered before using it and do not use it once it was unregistered."), // ErrorCode_UnknownListener,
347 AKTEXT("The requested game object is not a listener."), // ErrorCode_GameObjectIsNotListener,
348 AKTEXT("The requested game object is not an emitter."), // ErrorCode_GameObjectIsNotEmitter,
349 
350 AKTEXT("Unknown emitter game object ID on event. Make sure the game object is registered before using it and do not use it once it was unregistered."), // ErrorCode_UnknownGameObjectEvent
351 AKTEXT("The requested game object for an event was not registered as an emitter. Make sure the game object is registered as an emitter before using it to post an event."), // ErrorCode_GameObjectIsNotEmitterEvent
352 
353 AKTEXT("External source missing from PostEvent call"), // ErrorCode_ExternalSourceNotResolved
354 AKTEXT("Source file is of different format than expected"), //ErrorCode_FileFormatMismatch
355 AKTEXT("Audio command queue is full, blocking caller. Reduce number of calls to sound engine or boost command queue memory."), // ErrorCode_CommandQueueFull
356 AKTEXT("Audio command is too large to fit in the command queue. Break the command in smaller pieces."), //ErrorCode_CommandTooLarge
357 
358 AKTEXT("Failed creating XMA decoder: no more XMA voices available"), // ErrorCode_XMACreateDecoderLimitReached
359 AKTEXT("Failed seeking in XMA source: stream buffer is smaller than XMA block size"), // ErrorCode_XMAStreamBufferTooSmall
360 
361 AKTEXT("Triggered a note-scoped or playing-instance-scoped modulator in a global context (such as a bus or bus effect). Modulator will have global scope."), // ErrorCode_ModulatorScopeError_Inst
362 AKTEXT("Triggered a game-object-scoped modulator in a global context (such as a bus or bus effect). Modulator will have global scope."), // ErrorCode_ModulatorScopeError_Obj
363 
364 AKTEXT("Ignoring seek after end of playlist"), // ErrorCode_SeekAfterEndOfPlaylist
365 
366 AKTEXT("Seek table required to seek in Opus sources. Please update conversion settings."), // ErrorCode_OpusRequireSeekTable,
367 AKTEXT("Opus decoder failure"), // ErrorCode_OpusDecodeError,
368 AKTEXT("Failed creating Opus decoder"), // ErrorCode_OpusCreateDecoderFailed
369 
370 AKTEXT("Source plugin not found in currently loaded banks."), //ErrorCode_SourcePluginNotFound
371 
372 AKTEXT("Number of Resume and/or Play-From-Beginning virtual voices has reached warning limit (see Project Settings > Log tab). There may be some infinite, leaked voices.") , // ErrorCode_VirtualVoiceLimit
373 
374 AKTEXT("AK::SoundEngine::AddOutput() - Device ShareSet not found in Init bank."), //ErrorCode_AudioDeviceShareSetNotFound
375 
376 AKTEXT("Not enough memory to start sound."), //ErrorCode_NotEnoughMemoryToStart
377 AKTEXT("Error while decoding Opus header."), //ErrorCode_UnkownOpusError
378 AKTEXT("The Output Device specified by AddOutput() or Init() could not be initialized."), //ErrorCode_AudioDeviceInitFailure
379 
380 AKTEXT("Duplicated media has different length in two separate banks. Stopping sound."), // ErrorCode_MediaDuplicationLength
381  };
382  }
383 
384 }
385 #endif // AK_MONITOR_IMPLEMENT_ERRORCODES
386 
387 #endif // _AKMONITORERROR_H
#define AK_CALLBACK(__TYPE__, __NAME__)
AkTimeMs __cdecl GetTimeStamp()
AKRESULT
Standard function call result.
Definition: AkTypes.h:126
Audiokinetic namespace.
ErrorLevel
ErrorLevel.
Definition: AkMonitorError.h:41
#define AK_EXTERNAPIFUNC(__TYPE__, __NAME__)
const AkOSChar * s_aszErrorCodes[Num_ErrorCodes]
AkUInt32 AkUniqueID
Unique 32-bit ID.
Definition: AkTypes.h:62
AkUInt64 AkGameObjectID
Game object ID.
Definition: AkTypes.h:70
AKRESULT __cdecl SetLocalOutput(AkUInt32 in_uErrorLevel=ErrorLevel_All, LocalOutputFunc in_pMonitorFunc=0)
AKRESULT __cdecl PostCode(ErrorCode in_eError, ErrorLevel in_eErrorLevel, AkPlayingID in_playingID=AK_INVALID_PLAYING_ID, AkGameObjectID in_gameObjID=AK_INVALID_GAME_OBJECT, AkUniqueID in_audioNodeID=AK_INVALID_UNIQUE_ID, bool in_bIsBus=false)
void(* LocalOutputFunc)(ErrorCode in_eErrorCode, const AkOSChar *in_pszError, ErrorLevel in_eErrorLevel, AkPlayingID in_playingID, AkGameObjectID in_gameObjID)
Function prototype of local output function pointer.
Definition: AkMonitorError.h:175
static const AkPlayingID AK_INVALID_PLAYING_ID
Invalid playing ID.
Definition: AkTypes.h:101
AkUInt32 AkPlayingID
Playing ID.
Definition: AkTypes.h:65
AKRESULT __cdecl PostString(const char *in_pszError, ErrorLevel in_eErrorLevel, AkPlayingID in_playingID=AK_INVALID_PLAYING_ID, AkGameObjectID in_gameObjID=AK_INVALID_GAME_OBJECT, AkUniqueID in_audioNodeID=AK_INVALID_UNIQUE_ID, bool in_bIsBus=false)
ErrorCode
ErrorCode.
Definition: AkMonitorError.h:49
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:98
uint32_t AkUInt32
Unsigned 32-bit integer.
Definition: AkTypes.h:79
static const AkUniqueID AK_INVALID_UNIQUE_ID
Invalid unique 32-bit ID.
Definition: AkTypes.h:99
char AkOSChar
Generic character string.
Definition: AkTypes.h:95
#define AKTEXT(x)
Definition: AkTypes.h:130
AkInt32 AkTimeMs
Time in ms.
Definition: AkTypes.h:66

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise