Version
menu_open
link

include/AK/Tools/Common/AkMonitorError.h

Go to the documentation of this file.
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 #ifndef _AKMONITORERROR_H
00029 #define _AKMONITORERROR_H
00030 
00031 #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
00032 #include <AK/SoundEngine/Common/AkTypes.h>
00033 
00034 namespace AK
00035 {
00036     // Error monitoring.
00037 
00038     namespace Monitor
00039     {
00041         enum ErrorLevel
00042         {
00043             ErrorLevel_Message  = (1<<0), // used as bitfield
00044             ErrorLevel_Error    = (1<<1),
00045             
00046             ErrorLevel_All = ErrorLevel_Message | ErrorLevel_Error
00047         };
00049         enum ErrorCode
00050         {
00051             ErrorCode_NoError = 0, // 0-based index into AK::Monitor::s_aszErrorCodes table 
00052             ErrorCode_FileNotFound, 
00053             ErrorCode_CannotOpenFile,
00054             ErrorCode_CannotStartStreamNoMemory,
00055             ErrorCode_IODevice,
00056             ErrorCode_IncompatibleIOSettings,
00057 
00058             ErrorCode_PluginUnsupportedChannelConfiguration,
00059             ErrorCode_PluginMediaUnavailable,
00060             ErrorCode_PluginInitialisationFailed,
00061             ErrorCode_PluginProcessingFailed,
00062             ErrorCode_PluginExecutionInvalid,
00063             ErrorCode_PluginAllocationFailed,
00064 
00065             ErrorCode_VorbisRequireSeekTable,
00066 
00067             ErrorCode_VorbisDecodeError,
00068             ErrorCode_AACDecodeError,
00069 
00070             ErrorCode_xWMACreateDecoderFailed,
00071 
00072             ErrorCode_ATRAC9CreateDecoderFailed,
00073             ErrorCode_ATRAC9CreateDecoderFailedChShortage,
00074             ErrorCode_ATRAC9DecodeFailed,
00075             ErrorCode_ATRAC9ClearContextFailed,
00076             ErrorCode_ATRAC9LoopSectionTooSmall,
00077 
00078             ErrorCode_InvalidAudioFileHeader,
00079             ErrorCode_AudioFileHeaderTooLarge,
00080             ErrorCode_FileTooSmall,
00081 
00082             ErrorCode_TransitionNotAccurateChannel,
00083             ErrorCode_TransitionNotAccurateStarvation,
00084             ErrorCode_NothingToPlay, 
00085             ErrorCode_PlayFailed,
00086 
00087             ErrorCode_StingerCouldNotBeScheduled,
00088             ErrorCode_TooLongSegmentLookAhead,
00089             ErrorCode_CannotScheduleMusicSwitch,
00090             ErrorCode_TooManySimultaneousMusicSegments,
00091             ErrorCode_PlaylistStoppedForEditing,
00092             ErrorCode_MusicClipsRescheduledAfterTrackEdit,
00093 
00094             ErrorCode_CannotPlaySource_Create,
00095             ErrorCode_CannotPlaySource_VirtualOff,
00096             ErrorCode_CannotPlaySource_TimeSkip,
00097             ErrorCode_CannotPlaySource_InconsistentState,
00098             ErrorCode_MediaNotLoaded,
00099             ErrorCode_VoiceStarving,
00100             ErrorCode_StreamingSourceStarving,
00101             ErrorCode_XMADecoderSourceStarving,
00102             ErrorCode_XMADecodingError,
00103             ErrorCode_InvalidXMAData,
00104 
00105             ErrorCode_PluginNotRegistered,
00106             ErrorCode_CodecNotRegistered,
00107             ErrorCode_PluginVersionMismatch,
00108 
00109             ErrorCode_EventIDNotFound,
00110 
00111             ErrorCode_InvalidGroupID,
00112             ErrorCode_SelectedChildNotAvailable,
00113             ErrorCode_SelectedNodeNotAvailable,
00114             ErrorCode_SelectedMediaNotAvailable,
00115             ErrorCode_NoValidSwitch,
00116 
00117             ErrorCode_SelectedNodeNotAvailablePlay,
00118 
00119             ErrorCode_FeedbackVoiceStarving,
00120 
00121             ErrorCode_BankLoadFailed,
00122             ErrorCode_BankUnloadFailed,
00123             ErrorCode_ErrorWhileLoadingBank,
00124             ErrorCode_InsufficientSpaceToLoadBank,
00125             
00126             ErrorCode_LowerEngineCommandListFull,
00127 
00128             ErrorCode_SeekNoMarker,
00129             ErrorCode_CannotSeekContinuous,
00130             ErrorCode_SeekAfterEof,
00131 
00132             ErrorCode_UnknownGameObject,
00133             ErrorCode_UnknownGameObjectEvent,
00134 
00135             ErrorCode_ExternalSourceNotResolved,
00136             ErrorCode_FileFormatMismatch,
00137 
00138             ErrorCode_CommandQueueFull,
00139             ErrorCode_CommandTooLarge,
00140 
00141             ErrorCode_XMACreateDecoderLimitReached,
00142             ErrorCode_XMAStreamBufferTooSmall,
00143 
00144             ErrorCode_ModulatorScopeError_Inst,
00145             ErrorCode_ModulatorScopeError_Obj,
00146 
00147             ErrorCode_SeekAfterEndOfPlaylist,
00148 
00149             ErrorCode_OpusRequireSeekTable,
00150             ErrorCode_OpusDecodeError,
00151             ErrorCode_OpusCreateDecoderFailed,
00152 
00153             Num_ErrorCodes // THIS STAYS AT END OF ENUM
00154         };
00155 
00157         AK_CALLBACK( void, LocalOutputFunc )(
00158             ErrorCode in_eErrorCode,    
00159             const AkOSChar* in_pszError,    
00160             ErrorLevel in_eErrorLevel,  
00161             AkPlayingID in_playingID,   
00162             AkGameObjectID in_gameObjID 
00163             );
00164 
00165         extern const AkOSChar* s_aszErrorCodes[ Num_ErrorCodes ];
00166 
00173         AK_EXTERNAPIFUNC( AKRESULT, PostCode )( 
00174             ErrorCode in_eError,        
00175             ErrorLevel in_eErrorLevel,  
00176             AkPlayingID in_playingID = AK_INVALID_PLAYING_ID,   
00177             AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, 
00178             AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, 
00179             bool in_bIsBus = false      
00180             );
00181 #ifdef AK_SUPPORT_WCHAR
00182 
00183 
00184 
00185 
00186 
00187 
00188         AK_EXTERNAPIFUNC( AKRESULT, PostString )( 
00189             const wchar_t* in_pszError, 
00190             ErrorLevel in_eErrorLevel,  
00191             AkPlayingID in_playingID = AK_INVALID_PLAYING_ID,   
00192             AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, 
00193             AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, 
00194             bool in_bIsBus = false      
00195             );
00196 #endif // #ifdef AK_SUPPORT_WCHAR
00197 
00198 
00199 
00200 
00201 
00202 
00203         AK_EXTERNAPIFUNC( AKRESULT, PostString )( 
00204             const char* in_pszError,    
00205             ErrorLevel in_eErrorLevel,  
00206             AkPlayingID in_playingID = AK_INVALID_PLAYING_ID,   
00207             AkGameObjectID in_gameObjID = AK_INVALID_GAME_OBJECT, 
00208             AkUniqueID in_audioNodeID = AK_INVALID_UNIQUE_ID, 
00209             bool in_bIsBus = false      
00210             );
00211 
00216         AK_EXTERNAPIFUNC( AKRESULT, SetLocalOutput )(
00217             AkUInt32 in_uErrorLevel = ErrorLevel_All, 
00218             LocalOutputFunc in_pMonitorFunc = 0       
00219             );
00220 
00224         AK_EXTERNAPIFUNC( AkTimeMs, GetTimeStamp )();
00225     }
00226 }
00227 
00228 // Macros.
00229 #ifndef AK_OPTIMIZED
00230     #define AK_MONITOR_ERROR( in_eErrorCode )\
00231     AK::Monitor::PostCode( in_eErrorCode, AK::Monitor::ErrorLevel_Error )
00232 #else
00233     #define AK_MONITOR_ERROR( in_eErrorCode )
00234 #endif
00235 
00236 #ifdef AK_MONITOR_IMPLEMENT_ERRORCODES
00237 namespace AK
00238 {
00239     namespace Monitor
00240     {
00241         const AkOSChar* s_aszErrorCodes[ Num_ErrorCodes ] =
00242         {
00243             AKTEXT("No error"), // ErrorCode_NoError
00244             AKTEXT("File not found"), // ErrorCode_FileNotFound,
00245             AKTEXT("Cannot open file"), // ErrorCode_CannotOpenFile,
00246             AKTEXT("Not enough memory to start stream"), // ErrorCode_CannotStartStreamNoMemory,
00247             AKTEXT("IO device error"), // ErrorCode_IODevice,
00248             AKTEXT("IO settings incompatible with user requirements"), // ErrorCode_IncompatibleIOSettings
00249 
00250             AKTEXT("Plug-in unsupported channel configuration"), // ErrorCode_PluginUnsupportedChannelConfiguration,
00251             AKTEXT("Plug-in media unavailable"), // ErrorCode_PluginMediaUnavailable,
00252             AKTEXT("Plug-in initialization failure"), // ErrorCode_PluginInitialisationFailed,
00253             AKTEXT("Plug-in execution failure"), // ErrorCode_PluginProcessingFailed,
00254             AKTEXT("Invalid plug-in execution mode"), // ErrorCode_PluginExecutionInvalid
00255             AKTEXT("Could not allocate effect"), // ErrorCode_PluginAllocationFailed
00256 
00257             AKTEXT("Seek table required to seek in Vorbis sources. Please update conversion settings."), // ErrorCode_VorbisRequireSeekTable,
00258 
00259             AKTEXT("Vorbis decoder failure"), // ErrorCode_VorbisDecodeError,
00260             AKTEXT("AAC decoder failure"), // ErrorCode_AACDecodeError
00261 
00262             AKTEXT("Failed creating xWMA decoder"), // ErrorCode_xWMACreateDecoderFailed,
00263 
00264             AKTEXT("Failed creating ATRAC9 decoder"), // ErrorCode_ATRAC9CreateDecoderFailed
00265             AKTEXT("Failed creating ATRAC9 decoder: no more ATRAC9 decoding channels available"), // ErrorCode_ATRAC9CreateDecoderFailedChShortage
00266             AKTEXT("ATRAC9 decoding failed"), // ErrorCode_ATRAC9DecodeFailed
00267             AKTEXT("ATRAC9 context clear failed"), // ErrorCode_ATRAC9ClearContextFailed
00268             AKTEXT("ATRAC9 loop section is too small"), // ErrorCode_ATRAC9LoopSectionTooSmall
00269 
00270             AKTEXT("Invalid file header"), // ErrorCode_InvalidAudioFileHeader,
00271             AKTEXT("File header too large (due to markers or envelope)"), // ErrorCode_AudioFileHeaderTooLarge,
00272             AKTEXT("File or loop region is too small to be played properly"), // ErrorCode_FileTooSmall,
00273 
00274             AKTEXT("Transition not sample-accurate due to mixed channel configurations"), // ErrorCode_TransitionNotAccurateChannel,
00275             AKTEXT("Transition not sample-accurate due to source starvation"), // ErrorCode_TransitionNotAccurateStarvation,
00276             AKTEXT("Nothing to play"), // ErrorCode_NothingToPlay, 
00277             AKTEXT("Play Failed"), // ErrorCode_PlayFailed, // Notification meaning the play asked was not done for an out of control reason
00278                                             // For example, if The Element has a missing source file.
00279 
00280             AKTEXT("Stinger could not be scheduled in this segment or was dropped"), // ErrorCode_StingerCouldNotBeScheduled,
00281             AKTEXT("Segment look-ahead is longer than previous segment in sequence"), // ErrorCode_TooLongSegmentLookAhead,
00282             AKTEXT("Cannot schedule music switch transition in upcoming segments: using Exit Cue"), // ErrorCode_CannotScheduleMusicSwitch,
00283             AKTEXT("Cannot schedule music segments: Stopping music"), // ErrorCode_TooManySimultaneousMusicSegments,
00284             AKTEXT("Music system is stopped because a music playlist is modified"), // ErrorCode_PlaylistStoppedForEditing
00285             AKTEXT("Rescheduling music clips because a track was modified"), // ErrorCode_MusicClipsRescheduledAfterTrackEdit
00286 
00287             AKTEXT("Failed creating source"), // ErrorCode_CannotPlaySource_Create,
00288             AKTEXT("Virtual source failed becoming physical"), // ErrorCode_CannotPlaySource_VirtualOff,
00289             AKTEXT("Error while computing virtual source elapsed time"), // ErrorCode_CannotPlaySource_TimeSkip,
00290             AKTEXT("Inconsistent source status"), // ErrorCode_CannotPlaySource_InconsistentState,
00291             AKTEXT("Media was not loaded for this source"),// ErrorCode_MediaNotLoaded,
00292             AKTEXT("Voice Starvation"), // ErrorCode_VoiceStarving,
00293             AKTEXT("Source starvation"), // ErrorCode_StreamingSourceStarving,
00294             AKTEXT("XMA decoder starvation"), // ErrorCode_XMADecoderSourceStarving,
00295             AKTEXT("XMA decoding error"), // ErrorCode_XMADecodingError
00296             AKTEXT("Invalid XMA data - Make sure data is allocated from APU memory and is aligned to 2K."), // ErrorCode_InvalidXMAData
00297 
00298             AKTEXT("Plug-in not registered"), // ErrorCode_PluginNotRegistered,
00299             AKTEXT("Codec plug-in not registered"), // ErrorCode_CodecNotRegistered,
00300             AKTEXT("Plug-in version doesn't match sound engine version.  Check your build setup"), //ErrorCode_PluginVersionMismatch
00301 
00302             AKTEXT("Event ID not found"), // ErrorCode_EventIDNotFound,
00303 
00304             AKTEXT("Invalid State Group ID"), // ErrorCode_InvalidGroupID,
00305             AKTEXT("Selected Child Not Available"), // ErrorCode_SelectedChildNotAvailable,
00306             AKTEXT("Selected Node Not Available"), // ErrorCode_SelectedNodeNotAvailable,
00307             AKTEXT("Selected Media Not Available"),// ErrorCode_SelectedMediaNotAvailable,
00308             AKTEXT("No Valid Switch"), // ErrorCode_NoValidSwitch,
00309 
00310             AKTEXT("Selected node not available. Make sure the structure associated to the event is loaded or that the event has been prepared"), // ErrorCode_SelectedNodeNotAvailablePlay,
00311 
00312             AKTEXT("Motion voice starvation"), // ErrorCode_FeedbackVoiceStarving,
00313 
00314             AKTEXT("Bank Load Failed"), // ErrorCode_BankLoadFailed,
00315             AKTEXT("Bank Unload Failed"), // ErrorCode_BankUnloadFailed,
00316             AKTEXT("Error while loading bank"), // ErrorCode_ErrorWhileLoadingBank,
00317             AKTEXT("Insufficient Space to Load Bank"), // ErrorCode_InsufficientSpaceToLoadBank,
00318 
00319             AKTEXT("Lower engine command list is full"), // ErrorCode_LowerEngineCommandListFull,
00320 
00321             AKTEXT("No marker in file; seeking to specified location"), // ErrorCode_SeekNoMarker
00322             AKTEXT("Cannot seek in sound that is within a continuous container with special transitions"), // ErrorCode_CannotSeekContinuous
00323             AKTEXT("Seeking after end of file. Playback will stop"), // ErrorCode_SeekAfterEof
00324 
00325             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,
00326             AKTEXT("Unknown 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
00327 
00328             AKTEXT("External source missing from PostEvent call"), // ErrorCode_ExternalSourceNotResolved
00329             AKTEXT("Source file is of different format than expected"), //ErrorCode_FileFormatMismatch
00330             AKTEXT("Audio command queue is full, blocking caller.  Reduce number of calls to sound engine or boost command queue memory."), // ErrorCode_CommandQueueFull
00331             AKTEXT("Audio command is too large to fit in the command queue.  Break the command in smaller pieces."), //ErrorCode_CommandTooLarge
00332 
00333             AKTEXT("Failed creating XMA decoder: no more XMA voices available"), // ErrorCode_XMACreateDecoderLimitReached
00334             AKTEXT("Failed seeking in XMA source: stream buffer is smaller than XMA block size"), // ErrorCode_XMAStreamBufferTooSmall
00335 
00336             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
00337             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
00338 
00339             AKTEXT("Ignoring seek after end of playlist"), // ErrorCode_SeekAfterEndOfPlaylist
00340             
00341             AKTEXT("Seek table required to seek in Opus sources. Please update conversion settings."), // ErrorCode_OpusRequireSeekTable,
00342             AKTEXT("Opus decoder failure"), // ErrorCode_OpusDecodeError,
00343             AKTEXT("Failed creating Opus decoder"), // ErrorCode_OpusCreateDecoderFailed
00344         };
00345     }
00346 }
00347 #endif // AK_MONITOR_IMPLEMENT_ERRORCODES
00348 
00349 #endif // _AKMONITORERROR_H

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