123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541 |
- #ifndef _AKMONITORERROR_H
- #define _AKMONITORERROR_H
- #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
- #include <AK/SoundEngine/Common/AkTypes.h>
- #define ERROR_CODE_DEF( in_name, in_msg ){ MonitorErrorInfo(in_name, in_msg) }
- struct AkStreamMgrSettings;
- struct AkDeviceSettings;
- class AkErrorMessageTranslator;
- namespace AK
- {
-
- namespace Monitor
- {
-
- struct MsgContext
- {
- MsgContext(AkPlayingID pId = AK_INVALID_PLAYING_ID, AkGameObjectID goId = AK_INVALID_GAME_OBJECT, AkUniqueID nodeId = AK_INVALID_UNIQUE_ID, bool isBus = false)
- : in_playingID{ pId },
- in_gameObjID{ goId },
- in_soundID{ nodeId },
- in_bIsBus{ isBus }
- {}
- AkPlayingID in_playingID;
- AkGameObjectID in_gameObjID;
- AkUniqueID in_soundID;
- bool in_bIsBus;
- };
- struct MonitorErrorInfo
- {
- MonitorErrorInfo(const AkOSChar* in_name = nullptr, const AkOSChar* in_message= nullptr)
- : m_name{ in_name },
- m_message{in_message}
- {}
- const AkOSChar* m_name;
- const AkOSChar* m_message;
- };
-
- enum ErrorLevel
- {
- ErrorLevel_Message = (1<<0),
- ErrorLevel_Error = (1<<1),
-
- ErrorLevel_All = ErrorLevel_Message | ErrorLevel_Error
- };
-
- enum ErrorCode
- {
- ErrorCode_NoError = 0,
- ErrorCode_FileNotFound,
- ErrorCode_CannotOpenFile,
- ErrorCode_CannotStartStreamNoMemory,
- ErrorCode_IODevice,
- ErrorCode_IncompatibleIOSettings,
- ErrorCode_PluginUnsupportedChannelConfiguration,
- ErrorCode_PluginMediaUnavailable,
- ErrorCode_PluginInitialisationFailed,
- ErrorCode_PluginProcessingFailed,
- ErrorCode_PluginExecutionInvalid,
- ErrorCode_PluginAllocationFailed,
- ErrorCode_VorbisSeekTableRecommended,
- ErrorCode_VorbisDecodeError,
- ErrorCode_ATRAC9DecodeFailed,
- ErrorCode_ATRAC9LoopSectionTooSmall,
- ErrorCode_InvalidAudioFileHeader,
- ErrorCode_AudioFileHeaderTooLarge,
- ErrorCode_LoopTooSmall,
- ErrorCode_TransitionNotAccurateChannel,
- ErrorCode_TransitionNotAccuratePluginMismatch,
- ErrorCode_TransitionNotAccurateRejectedByPlugin,
- ErrorCode_TransitionNotAccurateStarvation,
- ErrorCode_TransitionNotAccurateCodecError,
- ErrorCode_NothingToPlay,
- ErrorCode_PlayFailed,
- ErrorCode_StingerCouldNotBeScheduled,
- ErrorCode_TooLongSegmentLookAhead,
- ErrorCode_CannotScheduleMusicSwitch,
- ErrorCode_TooManySimultaneousMusicSegments,
- ErrorCode_PlaylistStoppedForEditing,
- ErrorCode_MusicClipsRescheduledAfterTrackEdit,
- ErrorCode_CannotPlaySource_Create,
- ErrorCode_CannotPlaySource_VirtualOff,
- ErrorCode_CannotPlaySource_TimeSkip,
- ErrorCode_CannotPlaySource_InconsistentState,
- ErrorCode_MediaNotLoaded,
- ErrorCode_VoiceStarving,
- ErrorCode_StreamingSourceStarving,
- ErrorCode_XMADecoderSourceStarving,
- ErrorCode_XMADecodingError,
- ErrorCode_InvalidXMAData,
- ErrorCode_PluginNotRegistered,
- ErrorCode_CodecNotRegistered,
- ErrorCode_PluginVersionMismatch,
- ErrorCode_EventIDNotFound,
- ErrorCode_InvalidGroupID,
- ErrorCode_SelectedNodeNotAvailable,
- ErrorCode_SelectedMediaNotAvailable,
- ErrorCode_NoValidSwitch,
- ErrorCode_BankLoadFailed,
- ErrorCode_ErrorWhileLoadingBank,
- ErrorCode_InsufficientSpaceToLoadBank,
-
- ErrorCode_LowerEngineCommandListFull,
- ErrorCode_SeekNoMarker,
- ErrorCode_CannotSeekContinuous,
- ErrorCode_SeekAfterEof,
- ErrorCode_UnknownGameObject,
- ErrorCode_GameObjectNeverRegistered,
- ErrorCode_DeadGameObject,
- ErrorCode_GameObjectIsNotEmitter,
- ErrorCode_ExternalSourceNotResolved,
- ErrorCode_FileFormatMismatch,
- ErrorCode_CommandQueueFull,
- ErrorCode_CommandTooLarge,
- ErrorCode_XMACreateDecoderLimitReached,
- ErrorCode_XMAStreamBufferTooSmall,
- ErrorCode_ModulatorScopeError_Inst,
- ErrorCode_ModulatorScopeError_Obj,
- ErrorCode_SeekAfterEndOfPlaylist,
- ErrorCode_OpusRequireSeekTable,
- ErrorCode_OpusDecodeError,
-
- ErrorCode_SourcePluginNotFound,
- ErrorCode_VirtualVoiceLimit,
- ErrorCode_NotEnoughMemoryToStart,
- ErrorCode_UnknownOpusError,
- ErrorCode_AudioDeviceInitFailure,
- ErrorCode_AudioDeviceRemoveFailure,
- ErrorCode_AudioDeviceNotFound,
- ErrorCode_AudioDeviceNotValid,
- ErrorCode_SpatialAudio_ListenerAutomationNotSupported,
- ErrorCode_MediaDuplicationLength,
- ErrorCode_HwVoicesSystemInitFailed,
- ErrorCode_HwVoicesDecodeBatchFailed,
- ErrorCode_HwVoiceLimitReached,
- ErrorCode_HwVoiceInitFailed,
- ErrorCode_OpusHWCommandFailed,
-
- ErrorCode_AddOutputListenerIdWithZeroListeners,
- ErrorCode_3DObjectLimitExceeded,
- ErrorCode_OpusHWFatalError,
- ErrorCode_OpusHWDecodeUnavailable,
- ErrorCode_OpusHWTimeout,
- ErrorCode_SystemAudioObjectsUnavailable,
- ErrorCode_AddOutputNoDistinctListener,
- ErrorCode_PluginCannotRunOnObjectConfig,
- ErrorCode_SpatialAudio_ReflectionBusError,
- ErrorCode_VorbisHWDecodeUnavailable,
- ErrorCode_ExternalSourceNoMemorySize,
- ErrorCode_MonitorQueueFull,
- ErrorCode_MonitorMsgTooLarge,
- ErrorCode_NonCompliantDeviceMemory,
- ErrorCode_JobWorkerFuncCallMismatch,
- ErrorCode_JobMgrOutOfMemory,
- ErrorCode_InvalidFileSize,
- ErrorCode_PluginMsg,
-
- ErrorCode_SinkOpenSL,
- ErrorCode_AudioOutOfRange,
- ErrorCode_AudioOutOfRangeOnBus,
- ErrorCode_AudioOutOfRangeOnBusFx,
- ErrorCode_AudioOutOfRangeRay,
- ErrorCode_UnknownDialogueEvent,
- ErrorCode_FailedPostingEvent,
- ErrorCode_OutputDeviceInitializationFailed,
- ErrorCode_UnloadBankFailed,
- ErrorCode_PluginFileNotFound,
- ErrorCode_PluginFileIncompatible,
- ErrorCode_PluginFileNotEnoughMemoryToStart,
- ErrorCode_PluginFileInvalid,
- ErrorCode_PluginFileRegisterFailed,
- ErrorCode_UnknownArgument,
- ErrorCode_DynamicSequenceAlreadyClosed,
- ErrorCode_PendingActionDestroyed,
- ErrorCode_CrossFadeTransitionIgnored,
- ErrorCode_MusicRendererSeekingFailed,
-
- ErrorCode_DynamicSequenceIdNotFound,
- ErrorCode_BusNotFoundByName,
- ErrorCode_AudioDeviceShareSetNotFound,
- ErrorCode_AudioDeviceShareSetNotFoundByName,
- ErrorCode_SoundEngineTooManyGameObjects,
- ErrorCode_SoundEngineTooManyPositions,
- ErrorCode_SoundEngineCantCallOnChildBus,
- ErrorCode_SoundEnginePlayingIdNotFound,
- ErrorCode_SoundEngineInvalidTransform,
- ErrorCode_SoundEngineTooManyEventPosts,
- ErrorCode_AudioSubsystemStoppedResponding,
-
- ErrorCode_NotEnoughMemInFunction,
- ErrorCode_FXNotFound,
- ErrorCode_SetMixerNotABus,
- ErrorCode_AudioNodeNotFound,
- ErrorCode_SetMixerFailed,
- ErrorCode_SetBusConfigUnsupported,
- ErrorCode_BusNotFound,
- ErrorCode_MismatchingMediaSize,
- ErrorCode_IncompatibleBankVersion,
- ErrorCode_UnexpectedPrepareGameSyncsCall,
- ErrorCode_MusicEngineNotInitialized,
- ErrorCode_LoadingBankMismatch,
- ErrorCode_MasterBusStructureNotLoaded,
- ErrorCode_TooManyChildren,
- ErrorCode_BankContainUneditableEffect,
- ErrorCode_MemoryAllocationFailed,
- ErrorCode_InvalidFloatPriority,
- ErrorCode_SoundLoadFailedInsufficientMemory,
- ErrorCode_NXDeviceRegistrationFailed,
- ErrorCode_MixPluginOnObjectBus,
- ErrorCode_XboxXMAVoiceResetFailed,
- ErrorCode_XboxACPMessage,
- ErrorCode_XboxFrameDropped,
- ErrorCode_XboxACPError,
- ErrorCode_XboxXMAFatalError,
- ErrorCode_MissingMusicNodeParent,
- ErrorCode_HardwareOpusDecoderError,
- ErrorCode_SetGeometryTooManyTriangleConnected,
- ErrorCode_SetGeometryTriangleTooLarge,
- ErrorCode_SetGeometryFailed,
- ErrorCode_RemovingGeometrySetFailed,
- ErrorCode_SetGeometryInstanceFailed,
- ErrorCode_RemovingGeometryInstanceFailed,
- ErrorCode_RevertingToDefaultAudioDevice,
- ErrorCode_RevertingToDummyAudioDevice,
- ErrorCode_AudioThreadSuspended,
- ErrorCode_AudioThreadResumed,
- ErrorCode_ResetPlaylistActionIgnoredGlobalScope,
- ErrorCode_ResetPlaylistActionIgnoredContinuous,
- ErrorCode_PlayingTriggerRateNotSupported,
- ErrorCode_SetGeometryTriangleIsSkipped,
- ErrorCode_SetGeometryInstanceInvalidTransform,
-
-
- ErrorCode_SetGameObjectRadiusSizeError,
- ErrorCode_SetPortalNonDistinctRoom,
- ErrorCode_SetPortalInvalidExtent,
- ErrorCode_SpatialAudio_PortalNotFound,
-
- ErrorCode_InvalidFloatInFunction,
- ErrorCode_FLTMAXNotSupported,
- ErrorCode_CannotInitializeAmbisonicChannelConfiguration,
- ErrorCode_CannotInitializePassthrough,
- ErrorCode_3DAudioUnsupportedSize,
- ErrorCode_AmbisonicNotAvailable,
- ErrorCode_NoAudioDevice,
- ErrorCode_Support,
- ErrorCode_ReplayMessage,
- ErrorCode_GameMessage,
- ErrorCode_TestMessage,
- ErrorCode_TranslatorStandardTagTest,
- ErrorCode_TranslatorWwiseTagTest,
- ErrorCode_TranslatorStringSizeTest,
- ErrorCode_InvalidParameter,
- ErrorCode_MaxAudioObjExceeded,
- ErrorCode_MMSNotEnabled,
- ErrorCode_NotEnoughSystemObj,
- ErrorCode_NotEnoughSystemObjWin,
- ErrorCode_TransitionNotAccurateSourceTooShort,
- ErrorCode_AlreadyInitialized,
- ErrorCode_WrongNumberOfArguments,
- ErrorCode_DataAlignement,
- ErrorCode_PluginMsgWithShareSet,
- ErrorCode_SoundEngineNotInit,
- ErrorCode_NoDefaultSwitch,
- ErrorCode_CantSetBoundSwitch,
- ErrorCode_IODeviceInitFailed,
- ErrorCode_SwitchListEmpty,
- ErrorCode_NoSwitchSelected,
-
-
- Num_ErrorCodes
- };
- static_assert(Num_ErrorCodes == 211,
- "Please document your new ErrorCode "
- "in 'Documentation/Help/source_en/reference/common_errors_capture_log.xml', "
- "then you can increment this value."
- );
-
- AK_CALLBACK( void, LocalOutputFunc )(
- ErrorCode in_eErrorCode,
- const AkOSChar* in_pszError,
- ErrorLevel in_eErrorLevel,
- AkPlayingID in_playingID,
- AkGameObjectID in_gameObjID
- );
- extern const MonitorErrorInfo s_aszMonitorErrorInfos[ Num_ErrorCodes ];
-
-
-
-
-
-
-
- AK_EXTERNAPIFUNC( AKRESULT, 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
- );
- AK_EXTERNAPIFUNC(AKRESULT, PostCodeVarArg)(
- ErrorCode in_eError,
- ErrorLevel in_eErrorLevel,
- MsgContext msgContext,
- ...
- );
-
-
-
-
-
- AK_EXTERNAPIFUNC(AKRESULT, PostCodeVaList)(
- ErrorCode in_eError,
- ErrorLevel in_eErrorLevel,
- MsgContext msgContext,
- ::va_list args
- );
- #ifdef AK_SUPPORT_WCHAR
-
-
-
-
-
-
- AK_EXTERNAPIFUNC( AKRESULT, PostString )(
- const wchar_t* 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
- );
- #endif
-
-
-
-
-
-
- AK_EXTERNAPIFUNC( AKRESULT, 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
- );
-
-
-
-
- AK_EXTERNAPIFUNC( AKRESULT, SetLocalOutput )(
- AkUInt32 in_uErrorLevel = ErrorLevel_All,
- LocalOutputFunc in_pMonitorFunc = 0
- );
-
-
-
-
-
- AK_EXTERNAPIFUNC( AKRESULT, AddTranslator )(
- AkErrorMessageTranslator* translator,
- bool overridePreviousTranslators = false
-
- );
-
-
-
- AK_EXTERNAPIFUNC(AKRESULT, ResetTranslator)(
- );
-
-
-
- AK_EXTERNAPIFUNC( AkTimeMs, GetTimeStamp )();
-
- AK_EXTERNAPIFUNC(void, MonitorStreamMgrInit)(
- const AkStreamMgrSettings& in_streamMgrSettings
- );
-
-
-
-
-
-
- AK_EXTERNAPIFUNC(void, MonitorStreamingDeviceInit)(
- AkDeviceID in_deviceID,
- const AkDeviceSettings& in_deviceSettings
- );
-
-
- AK_EXTERNAPIFUNC(void, MonitorStreamingDeviceDestroyed)(
- AkDeviceID in_deviceID
- );
-
-
-
-
-
-
- AK_EXTERNAPIFUNC(void, MonitorStreamMgrTerm)();
- }
- }
- #ifndef AK_OPTIMIZED
- #define AK_MONITOR_ERROR( in_eErrorCode ) \
- AK::Monitor::PostCode( in_eErrorCode, AK::Monitor::ErrorLevel_Error )
- #define AK_MONITOR_STREAM_MGR_INIT( in_streamMgrSettings ) \
- AK::Monitor::MonitorStreamMgrInit( in_streamMgrSettings )
- #define AK_MONITOR_STREAMING_DEVICE_INIT( in_deviceID, in_deviceSettings ) \
- AK::Monitor::MonitorStreamingDeviceInit( in_deviceID, in_deviceSettings )
- #define AK_MONITOR_STREAMING_DEVICE_DESTROYED( in_deviceID ) \
- AK::Monitor::MonitorStreamingDeviceDestroyed( in_deviceID )
- #define AK_MONITOR_STREAM_MGR_TERM( ) \
- AK::Monitor::MonitorStreamMgrTerm()
- #else
- #define AK_MONITOR_ERROR( in_eErrorCode )
- #define AK_MONITOR_STREAM_MGR_INIT( in_streamMgrSettings )
- #define AK_MONITOR_STREAMING_DEVICE_INIT( in_deviceID, in_deviceSettings )
- #define AK_MONITOR_STREAMING_DEVICE_DESTROYED( in_deviceID )
- #define AK_MONITOR_STREAM_MGR_TERM( )
- #endif
- #ifdef AK_MONITOR_IMPLEMENT_ERRORCODES
- #include <AK/Tools/Common/AkMonitorErrorImpl.h>
- #endif
- #endif
|