| 129 | |
| 130 | |
| 131 | AudioContext::AudioContext(bool isOffline) |
| 132 | : m_isOfflineContext(isOffline) |
| 133 | { |
| 134 | static std::atomic<int> id {1}; |
| 135 | m_internal.reset(new AudioContext::Internals(true)); |
| 136 | m_listener.reset(new AudioListener()); |
| 137 | m_audioContextInterface = std::make_shared<AudioContextInterface>(this, id); |
| 138 | ++id; |
| 139 | |
| 140 | if (isOffline) |
| 141 | { |
| 142 | updateThreadShouldRun = 1; |
| 143 | graphKeepAlive = 0; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | AudioContext::AudioContext(bool isOffline, bool autoDispatchEvents) |
| 148 | : m_isOfflineContext(isOffline) |