| 243 | } |
| 244 | |
| 245 | void AudioContext::uninitialize() |
| 246 | { |
| 247 | LOG_TRACE("AudioContext::uninitialize()"); |
| 248 | |
| 249 | if (!m_isInitialized) |
| 250 | return; |
| 251 | |
| 252 | // for the case where an OfflineAudioDestinationNode needs to update the graph: |
| 253 | updateAutomaticPullNodes(); |
| 254 | |
| 255 | // This stops the audio thread and all audio rendering. |
| 256 | device_callback->stop(); |
| 257 | |
| 258 | // Don't allow the context to initialize a second time after it's already been explicitly uninitialized. |
| 259 | m_isAudioThreadFinished = true; |
| 260 | |
| 261 | updateAutomaticPullNodes(); // added for the case where an NullDeviceNode needs to update the graph |
| 262 | |
| 263 | m_isInitialized = false; |
| 264 | } |
| 265 | |
| 266 | bool AudioContext::isInitialized() const |
| 267 | { |