Version
menu_open
link

include/AK/Tools/Common/AkMonitorError.h

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

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise