I’ve made a C++ wrapper for FMOD’s recording features but it seems that FMOD doesn’t kill all its threads when FSOUND_Close() is called in DX mode. In WinMM mode, however, all threads are killed.
These is my init & shutdown functions for FMOD:
if(!FSOUND_SetDriver(m_nOutputDriver)) return FALSE; if (!FSOUND_Init(m_nFrequency, m_nOutputChannels, FSOUND_INIT_GLOBALFOCUS)) return FALSE; if(!FSOUND_Record_SetDriver(m_nInputDriver)) return FALSE; //create sample for recording m_nRecordSamplesCount = m_nSampleCount*(RECORD_BUFFERTIME/RECORD_CALLBACKDELAY); m_recordSample = FSOUND_Sample_Alloc(FSOUND_FREE , m_nRecordSamplesCount, FSOUND_MONO | FSOUND_16BITS , m_nFrequency, 255, 128, 255); return TRUE;
m_recordSample = NULL;
FSOUND_Close(); TRACE("FMOD has shut down\n");
I start and stop the FMOD sound system several times during program execution and everytime I stop one more thread remains active. Again this is only in DirectX mode and not WinMM. Shouldn’t FSOUND_Close() cleanup all its threads?
- bear101 asked 14 years ago
- You must login to post comments