| 167 | |
| 168 | |
| 169 | AudioContext::~AudioContext() |
| 170 | { |
| 171 | LOG_TRACE("Begin AudioContext::~AudioContext()"); |
| 172 | |
| 173 | m_audioContextInterface.reset(); |
| 174 | |
| 175 | if (!isOfflineContext()) |
| 176 | graphKeepAlive = 0.25f; |
| 177 | |
| 178 | updateThreadShouldRun = 0; |
| 179 | cv.notify_all(); |
| 180 | |
| 181 | if (graphUpdateThread.joinable()) |
| 182 | graphUpdateThread.join(); |
| 183 | |
| 184 | m_listener.reset(); |
| 185 | |
| 186 | uninitialize(); |
| 187 | |
| 188 | #if USE_ACCELERATE_FFT |
| 189 | FFTFrame::cleanup(); |
| 190 | #endif |
| 191 | |
| 192 | ASSERT(!m_isInitialized); |
| 193 | ASSERT(!m_automaticPullNodes.size()); |
| 194 | ASSERT(!m_renderingAutomaticPullNodes.size()); |
| 195 | |
| 196 | LOG_INFO("Finish AudioContext::~AudioContext()"); |
| 197 | } |
| 198 | |
| 199 | bool AudioContext::loadHrtfDatabase(const std::string & searchPath) |
| 200 | { |