OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 ASSERT(m_sourceSampleRate == sampleRate()); | 174 ASSERT(m_sourceSampleRate == sampleRate()); |
175 provider.provideInput(outputBus, numberOfFrames); | 175 provider.provideInput(outputBus, numberOfFrames); |
176 } | 176 } |
177 // Output silence if we don't have access to the element. | 177 // Output silence if we don't have access to the element. |
178 if (!passesCORSAccessCheck()) { | 178 if (!passesCORSAccessCheck()) { |
179 if (m_maybePrintCORSMessage) { | 179 if (m_maybePrintCORSMessage) { |
180 // Print a CORS message, but just once for each change in the cu
rrent media | 180 // Print a CORS message, but just once for each change in the cu
rrent media |
181 // element source, and only if we have a document to print to. | 181 // element source, and only if we have a document to print to. |
182 m_maybePrintCORSMessage = false; | 182 m_maybePrintCORSMessage = false; |
183 if (context()->executionContext()) { | 183 if (context()->executionContext()) { |
184 context()->executionContext()->postTask(FROM_HERE, | 184 context()->executionContext()->postTask(BLINK_FROM_HERE, |
185 createCrossThreadTask(&MediaElementAudioSourceHandler::p
rintCORSMessage, | 185 createCrossThreadTask(&MediaElementAudioSourceHandler::p
rintCORSMessage, |
186 this, | 186 this, |
187 m_currentSrcString)); | 187 m_currentSrcString)); |
188 } | 188 } |
189 } | 189 } |
190 outputBus->zero(); | 190 outputBus->zero(); |
191 } | 191 } |
192 } else { | 192 } else { |
193 // We failed to acquire the lock. | 193 // We failed to acquire the lock. |
194 outputBus->zero(); | 194 outputBus->zero(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 } | 250 } |
251 | 251 |
252 void MediaElementAudioSourceNode::unlock() | 252 void MediaElementAudioSourceNode::unlock() |
253 { | 253 { |
254 mediaElementAudioSourceHandler().unlock(); | 254 mediaElementAudioSourceHandler().unlock(); |
255 } | 255 } |
256 | 256 |
257 } // namespace blink | 257 } // namespace blink |
258 | 258 |
259 #endif // ENABLE(WEB_AUDIO) | 259 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |