OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 m_destinationNode->uninitialize(); | 192 m_destinationNode->uninitialize(); |
193 | 193 |
194 if (!isOfflineContext()) { | 194 if (!isOfflineContext()) { |
195 ASSERT(s_hardwareContextCount); | 195 ASSERT(s_hardwareContextCount); |
196 --s_hardwareContextCount; | 196 --s_hardwareContextCount; |
197 } | 197 } |
198 | 198 |
199 // Get rid of the sources which may still be playing. | 199 // Get rid of the sources which may still be playing. |
200 derefUnfinishedSourceNodes(); | 200 derefUnfinishedSourceNodes(); |
201 | 201 |
| 202 ASSERT(m_listener); |
| 203 m_listener->waitForHRTFDatabaseLoaderThreadCompletion(); |
| 204 |
202 m_isInitialized = false; | 205 m_isInitialized = false; |
203 clear(); | 206 clear(); |
204 } | 207 } |
205 | 208 |
206 void AudioContext::stop() | 209 void AudioContext::stop() |
207 { | 210 { |
208 // Usually ExecutionContext calls stop twice. | 211 // Usually ExecutionContext calls stop twice. |
209 if (m_isStopScheduled) | 212 if (m_isStopScheduled) |
210 return; | 213 return; |
211 m_isStopScheduled = true; | 214 m_isStopScheduled = true; |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 | 876 |
874 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k
!= m_deferredCountModeChange.end(); ++k) | 877 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k
!= m_deferredCountModeChange.end(); ++k) |
875 (*k)->updateChannelCountMode(); | 878 (*k)->updateChannelCountMode(); |
876 | 879 |
877 m_deferredCountModeChange.clear(); | 880 m_deferredCountModeChange.clear(); |
878 } | 881 } |
879 | 882 |
880 } // namespace blink | 883 } // namespace blink |
881 | 884 |
882 #endif // ENABLE(WEB_AUDIO) | 885 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |