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 25 matching lines...) Expand all Loading... |
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 "wtf/MathExtras.h" | 38 #include "wtf/MathExtras.h" |
39 #include "wtf/OwnPtr.h" | 39 #include "wtf/OwnPtr.h" |
40 #include "wtf/PassOwnPtr.h" | 40 #include "wtf/PassOwnPtr.h" |
41 | 41 |
42 #if OS(MACOSX) | 42 #if OS(MACOSX) |
43 using namespace std; | 43 using namespace std; |
44 #endif | 44 #endif |
45 | 45 |
46 namespace WebCore { | 46 namespace blink { |
47 | 47 |
48 using namespace VectorMath; | 48 using namespace VectorMath; |
49 | 49 |
50 // Empirical gain calibration tested across many impulse responses to ensure per
ceived volume is same as dry (unprocessed) signal | 50 // Empirical gain calibration tested across many impulse responses to ensure per
ceived volume is same as dry (unprocessed) signal |
51 const float GainCalibration = -58; | 51 const float GainCalibration = -58; |
52 const float GainCalibrationSampleRate = 44100; | 52 const float GainCalibrationSampleRate = 44100; |
53 | 53 |
54 // A minimum power value to when normalizing a silent (or very quiet) impulse re
sponse | 54 // A minimum power value to when normalizing a silent (or very quiet) impulse re
sponse |
55 const float MinPower = 0.000125f; | 55 const float MinPower = 0.000125f; |
56 | 56 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 { | 229 { |
230 for (size_t i = 0; i < m_convolvers.size(); ++i) | 230 for (size_t i = 0; i < m_convolvers.size(); ++i) |
231 m_convolvers[i]->reset(); | 231 m_convolvers[i]->reset(); |
232 } | 232 } |
233 | 233 |
234 size_t Reverb::latencyFrames() const | 234 size_t Reverb::latencyFrames() const |
235 { | 235 { |
236 return !m_convolvers.isEmpty() ? m_convolvers.first()->latencyFrames() : 0; | 236 return !m_convolvers.isEmpty() ? m_convolvers.first()->latencyFrames() : 0; |
237 } | 237 } |
238 | 238 |
239 } // namespace WebCore | 239 } // namespace blink |
240 | 240 |
241 #endif // ENABLE(WEB_AUDIO) | 241 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |