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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 AudioBus* source = input(0)->bus(); | 121 AudioBus* source = input(0)->bus(); |
122 if (!source) { | 122 if (!source) { |
123 destination->zero(); | 123 destination->zero(); |
124 return; | 124 return; |
125 } | 125 } |
126 | 126 |
127 // The audio thread can't block on this lock, so we call tryLock() instead. | 127 // The audio thread can't block on this lock, so we call tryLock() instead. |
128 MutexTryLocker tryLocker(m_processLock); | 128 MutexTryLocker tryLocker(m_processLock); |
129 if (tryLocker.locked()) { | 129 if (tryLocker.locked()) { |
130 // HRTFDatabase should be loaded before proceeding for offline audio con
text when panningModel() is "HRTF". | 130 // HRTFDatabase should be loaded before proceeding for offline audio con
text when the panning model is HRTF. |
131 if (panningModel() == "HRTF" && !m_hrtfDatabaseLoader->isLoaded()) { | 131 if (m_panningModel == HRTF && !m_hrtfDatabaseLoader->isLoaded()) { |
132 if (context()->isOfflineContext()) { | 132 if (context()->isOfflineContext()) { |
133 m_hrtfDatabaseLoader->waitForLoaderThreadCompletion(); | 133 m_hrtfDatabaseLoader->waitForLoaderThreadCompletion(); |
134 } else { | 134 } else { |
135 destination->zero(); | 135 destination->zero(); |
136 return; | 136 return; |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 // Apply the panning effect. | 140 // Apply the panning effect. |
141 double azimuth; | 141 double azimuth; |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 ASSERT(context()->isAudioThread()); | 560 ASSERT(context()->isAudioThread()); |
561 | 561 |
562 m_cachedPosition = m_position; | 562 m_cachedPosition = m_position; |
563 m_cachedOrientation = m_orientation; | 563 m_cachedOrientation = m_orientation; |
564 m_cachedVelocity = m_velocity; | 564 m_cachedVelocity = m_velocity; |
565 } | 565 } |
566 | 566 |
567 } // namespace WebCore | 567 } // namespace WebCore |
568 | 568 |
569 #endif // ENABLE(WEB_AUDIO) | 569 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |