| 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 * | 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 20 matching lines...) Expand all Loading... |
| 31 #if ENABLE(WEB_AUDIO) | 31 #if ENABLE(WEB_AUDIO) |
| 32 | 32 |
| 33 #include "platform/audio/ReverbConvolver.h" | 33 #include "platform/audio/ReverbConvolver.h" |
| 34 | 34 |
| 35 #include "platform/Task.h" | 35 #include "platform/Task.h" |
| 36 #include "platform/audio/AudioBus.h" | 36 #include "platform/audio/AudioBus.h" |
| 37 #include "platform/audio/VectorMath.h" | 37 #include "platform/audio/VectorMath.h" |
| 38 #include "public/platform/Platform.h" | 38 #include "public/platform/Platform.h" |
| 39 #include "public/platform/WebThread.h" | 39 #include "public/platform/WebThread.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace blink { |
| 42 | 42 |
| 43 using namespace VectorMath; | 43 using namespace VectorMath; |
| 44 | 44 |
| 45 const int InputBufferSize = 8 * 16384; | 45 const int InputBufferSize = 8 * 16384; |
| 46 | 46 |
| 47 // We only process the leading portion of the impulse response in the real-time
thread. We don't exceed this length. | 47 // We only process the leading portion of the impulse response in the real-time
thread. We don't exceed this length. |
| 48 // It turns out then, that the background thread has about 278msec of scheduling
slop. | 48 // It turns out then, that the background thread has about 278msec of scheduling
slop. |
| 49 // Empirically, this has been found to be a good compromise between giving enoug
h time for scheduling slop, | 49 // Empirically, this has been found to be a good compromise between giving enoug
h time for scheduling slop, |
| 50 // while still minimizing the amount of processing done in the primary (high-pri
ority) thread. | 50 // while still minimizing the amount of processing done in the primary (high-pri
ority) thread. |
| 51 // This was found to be a good value on Mac OS X, and may work well on other pla
tforms as well, assuming | 51 // This was found to be a good value on Mac OS X, and may work well on other pla
tforms as well, assuming |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 m_accumulationBuffer.reset(); | 190 m_accumulationBuffer.reset(); |
| 191 m_inputBuffer.reset(); | 191 m_inputBuffer.reset(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 size_t ReverbConvolver::latencyFrames() const | 194 size_t ReverbConvolver::latencyFrames() const |
| 195 { | 195 { |
| 196 return 0; | 196 return 0; |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace WebCore | 199 } // namespace blink |
| 200 | 200 |
| 201 #endif // ENABLE(WEB_AUDIO) | 201 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |