Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: Source/modules/webaudio/AudioListener.cpp

Issue 711323002: Oilpan: Don't destruct HRTFDatabaseLoader::m_thread during a sweeping phase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIf Necessary(sampleRate); 85 m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIf Necessary(sampleRate);
86 } 86 }
87 87
88 bool AudioListener::isHRTFDatabaseLoaded() 88 bool AudioListener::isHRTFDatabaseLoaded()
89 { 89 {
90 return m_hrtfDatabaseLoader->isLoaded(); 90 return m_hrtfDatabaseLoader->isLoaded();
91 } 91 }
92 92
93 void AudioListener::waitForHRTFDatabaseLoaderThreadCompletion() 93 void AudioListener::waitForHRTFDatabaseLoaderThreadCompletion()
94 { 94 {
95 m_hrtfDatabaseLoader->waitForLoaderThreadCompletion(); 95 if (m_hrtfDatabaseLoader)
96 m_hrtfDatabaseLoader->waitForLoaderThreadCompletion();
96 } 97 }
97 98
98 void AudioListener::markPannersAsDirty(unsigned type) 99 void AudioListener::markPannersAsDirty(unsigned type)
99 { 100 {
100 for (unsigned i = 0; i < m_panners.size(); ++i) 101 for (unsigned i = 0; i < m_panners.size(); ++i)
101 m_panners[i]->markPannerAsDirty(type); 102 m_panners[i]->markPannerAsDirty(type);
102 } 103 }
103 104
104 void AudioListener::setPosition(const FloatPoint3D &position) 105 void AudioListener::setPosition(const FloatPoint3D &position)
105 { 106 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 164
164 // This synchronizes with panner's process(). 165 // This synchronizes with panner's process().
165 MutexLocker listenerLocker(m_listenerLock); 166 MutexLocker listenerLocker(m_listenerLock);
166 m_speedOfSound = speedOfSound; 167 m_speedOfSound = speedOfSound;
167 markPannersAsDirty(PannerNode::DopplerRateDirty); 168 markPannersAsDirty(PannerNode::DopplerRateDirty);
168 } 169 }
169 170
170 } // namespace blink 171 } // namespace blink
171 172
172 #endif // ENABLE(WEB_AUDIO) 173 #endif // ENABLE(WEB_AUDIO)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698