[Audio] Make sure trace is stopped

This commit is contained in:
zilmar 2018-11-24 13:11:50 +10:30
parent 6a65305e74
commit f76769622c
4 changed files with 13 additions and 7 deletions

View File

@ -92,12 +92,6 @@ void CMemList::RecordAddItem(void * ptr, size_t size, const char * filename, int
info.line = line;
info.size = (int)size;
info.order = m_NextOrder++;
if (info.order == 628)
{
int a = 5;
a = 6;
}
m_MemList->insert(MEMLIST::value_type(ptr, info));
LeaveCriticalSection(&m_cs);
}

View File

@ -166,6 +166,7 @@ EXPORT void CALL CloseDLL(void)
{
WriteTrace(TraceAudioInterface, TraceDebug, "Called");
CleanupAudioSettings();
StopTrace();
}
EXPORT void CALL DllAbout(void * /*hParent*/)

View File

@ -79,4 +79,14 @@ void StartTrace(void)
}
g_LogFile = new CTraceFileLog(LogFilePath, g_settings->FlushLogs(), CLog::Log_New, 500);
TraceAddModule(g_LogFile);
}
}
void StopTrace(void)
{
if (g_LogFile)
{
TraceRemoveModule(g_LogFile);
delete g_LogFile;
g_LogFile = NULL;
}
}

View File

@ -22,3 +22,4 @@ enum TraceModuleAndroidAudio
void SetupTrace(void);
void StartTrace(void);
void StopTrace(void);