Fixes AZ_PROFILE markers that failed release build (#3364)
Removes a ToString function that wasn't really needed, it was only defined for release builds, but AZ_PROFILE macros are still defined to something in release. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
@@ -769,124 +769,6 @@ namespace Audio
|
||||
return (eStatus == eARS_SUCCESS || eStatus == eARS_FAILURE);
|
||||
}
|
||||
|
||||
#if !defined(AUDIO_RELEASE)
|
||||
// Debug Logging Helper
|
||||
AZStd::string ToString()
|
||||
{
|
||||
static const AZStd::unordered_map<const EAudioManagerRequestType, const AZStd::string> managerRequests
|
||||
{
|
||||
{ eAMRT_INIT_AUDIO_IMPL, "INIT IMPL" },
|
||||
{ eAMRT_RELEASE_AUDIO_IMPL, "RELEASE IMPL" },
|
||||
{ eAMRT_RESERVE_AUDIO_OBJECT_ID, "RESERVE OBJECT ID" },
|
||||
{ eAMRT_CREATE_SOURCE, "CREATE SOURCE" },
|
||||
{ eAMRT_DESTROY_SOURCE, "DESTROY SOURCE" },
|
||||
{ eAMRT_PARSE_CONTROLS_DATA, "PARSE CONTROLS" },
|
||||
{ eAMRT_PARSE_PRELOADS_DATA, "PARSE PRELOADS" },
|
||||
{ eAMRT_CLEAR_CONTROLS_DATA, "CLEAR CONTROLS" },
|
||||
{ eAMRT_CLEAR_PRELOADS_DATA, "CLEAR PRELOADS" },
|
||||
{ eAMRT_PRELOAD_SINGLE_REQUEST, "PRELOAD SINGLE" },
|
||||
{ eAMRT_UNLOAD_SINGLE_REQUEST, "UNLOAD SINGLE" },
|
||||
{ eAMRT_UNLOAD_AFCM_DATA_BY_SCOPE, "UNLOAD SCOPE" },
|
||||
{ eAMRT_REFRESH_AUDIO_SYSTEM, "REFRESH AUDIO SYSTEM" },
|
||||
{ eAMRT_LOSE_FOCUS, "LOSE FOCUS" },
|
||||
{ eAMRT_GET_FOCUS, "GET FOCUS" },
|
||||
{ eAMRT_MUTE_ALL, "MUTE" },
|
||||
{ eAMRT_UNMUTE_ALL, "UNMUTE" },
|
||||
{ eAMRT_STOP_ALL_SOUNDS, "STOP ALL" },
|
||||
{ eAMRT_DRAW_DEBUG_INFO, "DRAW DEBUG" },
|
||||
{ eAMRT_CHANGE_LANGUAGE, "CHANGE LANGUAGE" },
|
||||
{ eAMRT_SET_AUDIO_PANNING_MODE, "SET PANNING MODE" },
|
||||
};
|
||||
static const AZStd::unordered_map<const EAudioCallbackManagerRequestType, const AZStd::string> callbackRequests
|
||||
{
|
||||
{ eACMRT_REPORT_STARTED_EVENT, "STARTED EVENT" },
|
||||
{ eACMRT_REPORT_FINISHED_EVENT, "FINISHED EVENT" },
|
||||
{ eACMRT_REPORT_FINISHED_TRIGGER_INSTANCE, "FINISHED TRIGGER INSTANCE" },
|
||||
};
|
||||
static const AZStd::unordered_map<const EAudioListenerRequestType, const AZStd::string> listenerRequests
|
||||
{
|
||||
{ eALRT_SET_POSITION, "SET POSITION" },
|
||||
};
|
||||
static const AZStd::unordered_map<const EAudioObjectRequestType, const AZStd::string> objectRequests
|
||||
{
|
||||
{ eAORT_PREPARE_TRIGGER, "PREPARE TRIGGER" },
|
||||
{ eAORT_UNPREPARE_TRIGGER, "UNPREPARE TRIGGER" },
|
||||
{ eAORT_EXECUTE_TRIGGER, "EXECUTE TRIGGER" },
|
||||
{ eAORT_STOP_TRIGGER, "STOP TRIGGER" },
|
||||
{ eAORT_STOP_ALL_TRIGGERS, "STOP ALL" },
|
||||
{ eAORT_SET_POSITION, "SET POSITION" },
|
||||
{ eAORT_SET_RTPC_VALUE, "SET RTPC" },
|
||||
{ eAORT_SET_SWITCH_STATE, "SET SWITCH" },
|
||||
{ eAORT_SET_ENVIRONMENT_AMOUNT, "SET ENV AMOUNT" },
|
||||
{ eAORT_RESET_ENVIRONMENTS, "RESET ENVS" },
|
||||
{ eAORT_RESET_RTPCS, "RESET RTPCS" },
|
||||
{ eAORT_RELEASE_OBJECT, "RELEASE OBJECT" },
|
||||
{ eAORT_EXECUTE_SOURCE_TRIGGER, "EXECUTE SOURCE TRIGGER" },
|
||||
{ eAORT_SET_MULTI_POSITIONS, "SET MULTI POSITIONS" },
|
||||
};
|
||||
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "AudioRequest(";
|
||||
|
||||
if (pData->eRequestType == eART_AUDIO_MANAGER_REQUEST)
|
||||
{
|
||||
ss << "AUDIO MANAGER : ";
|
||||
auto requestStr = managerRequests.at(static_cast<const SAudioManagerRequestDataInternalBase*>(pData.get())->eType);
|
||||
ss << requestStr.c_str();
|
||||
}
|
||||
|
||||
if (pData->eRequestType == eART_AUDIO_CALLBACK_MANAGER_REQUEST)
|
||||
{
|
||||
ss << "AUDIO CALLBACK MGR : ";
|
||||
auto requestStr = callbackRequests.at(static_cast<const SAudioCallbackManagerRequestDataInternalBase*>(pData.get())->eType);
|
||||
ss << requestStr.c_str();
|
||||
}
|
||||
|
||||
if (pData->eRequestType == eART_AUDIO_LISTENER_REQUEST)
|
||||
{
|
||||
ss << "AUDIO LISTENER : ";
|
||||
auto requestStr = listenerRequests.at(static_cast<const SAudioListenerRequestDataInternalBase*>(pData.get())->eType);
|
||||
ss << requestStr.c_str();
|
||||
}
|
||||
if (pData->eRequestType == eART_AUDIO_OBJECT_REQUEST)
|
||||
{
|
||||
ss << "AUDIO OBJECT : ";
|
||||
auto requestStr = objectRequests.at(static_cast<const SAudioObjectRequestDataInternalBase*>(pData.get())->eType);
|
||||
ss << requestStr.c_str();
|
||||
}
|
||||
|
||||
ss << "): [";
|
||||
if (nFlags & eARF_PRIORITY_NORMAL)
|
||||
{
|
||||
ss << "PRIORITY NORMAL, ";
|
||||
}
|
||||
if (nFlags & eARF_PRIORITY_HIGH)
|
||||
{
|
||||
ss << "PRIORITY HIGH, ";
|
||||
}
|
||||
if (nFlags & eARF_EXECUTE_BLOCKING)
|
||||
{
|
||||
ss << "EXECUTE BLOCKING, ";
|
||||
}
|
||||
if (nFlags & eARF_SYNC_CALLBACK)
|
||||
{
|
||||
ss << "SYNC CALLBACK, ";
|
||||
}
|
||||
if (nFlags & eARF_SYNC_FINISHED_CALLBACK)
|
||||
{
|
||||
ss << "SYNC FINISHED CALLBACK, ";
|
||||
}
|
||||
if (nFlags & eARF_THREAD_SAFE_PUSH)
|
||||
{
|
||||
ss << "THREAD SAFE PUSH, ";
|
||||
}
|
||||
ss << "]";
|
||||
|
||||
return AZStd::string(ss.str().c_str());
|
||||
}
|
||||
#endif // !AUDIO_RELEASE
|
||||
|
||||
TATLEnumFlagsType nFlags;
|
||||
TAudioObjectID nAudioObjectID;
|
||||
void* pOwner;
|
||||
|
||||
@@ -616,7 +616,7 @@ namespace Audio
|
||||
void CAudioSystem::ProcessRequestThreadSafe(CAudioRequestInternal request)
|
||||
{
|
||||
// Audio Thread!
|
||||
AZ_PROFILE_SCOPE(Audio, "Thread-Safe Request: %s", request.ToString().c_str());
|
||||
AZ_PROFILE_SCOPE(Audio, "Process Thread-Safe Request");
|
||||
|
||||
if (m_oATL.CanProcessRequests())
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace Audio
|
||||
{
|
||||
// Todo: This should handle request priority, use request priority as bus Address and process in priority order.
|
||||
|
||||
AZ_PROFILE_SCOPE(Audio, "Normal Request: %s", request.ToString().c_str());
|
||||
AZ_PROFILE_SCOPE(Audio, "Process Normal Request");
|
||||
|
||||
AZ_Assert(g_mainThreadId != AZStd::this_thread::get_id(), "AudioSystem::ProcessRequestByPriority - called from Main thread!");
|
||||
|
||||
@@ -672,7 +672,7 @@ namespace Audio
|
||||
{
|
||||
if (!(request.nInternalInfoFlags & eARIF_WAITING_FOR_REMOVAL))
|
||||
{
|
||||
AZ_PROFILE_SCOPE(Audio, "Blocking Request: %s", request.ToString().c_str());
|
||||
AZ_PROFILE_SCOPE(Audio, "Process Blocking Request");
|
||||
|
||||
if (request.eStatus == eARS_NONE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user