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 17 matching lines...) Expand all Loading... |
28 #if ENABLE(WEB_AUDIO) | 28 #if ENABLE(WEB_AUDIO) |
29 | 29 |
30 #include "modules/webaudio/AudioParam.h" | 30 #include "modules/webaudio/AudioParam.h" |
31 | 31 |
32 #include "platform/audio/AudioUtilities.h" | 32 #include "platform/audio/AudioUtilities.h" |
33 #include "modules/webaudio/AudioNode.h" | 33 #include "modules/webaudio/AudioNode.h" |
34 #include "modules/webaudio/AudioNodeOutput.h" | 34 #include "modules/webaudio/AudioNodeOutput.h" |
35 #include "platform/FloatConversion.h" | 35 #include "platform/FloatConversion.h" |
36 #include "wtf/MathExtras.h" | 36 #include "wtf/MathExtras.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace blink { |
39 | 39 |
40 const double AudioParam::DefaultSmoothingConstant = 0.05; | 40 const double AudioParam::DefaultSmoothingConstant = 0.05; |
41 const double AudioParam::SnapThreshold = 0.001; | 41 const double AudioParam::SnapThreshold = 0.001; |
42 | 42 |
43 float AudioParam::value() | 43 float AudioParam::value() |
44 { | 44 { |
45 // Update value for timeline. | 45 // Update value for timeline. |
46 if (context() && context()->isAudioThread()) { | 46 if (context() && context()->isAudioThread()) { |
47 bool hasValue; | 47 bool hasValue; |
48 float timelineValue = m_timeline.valueForContextTime(context(), narrowPr
ecisionToFloat(m_value), hasValue); | 48 float timelineValue = m_timeline.valueForContextTime(context(), narrowPr
ecisionToFloat(m_value), hasValue); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 { | 180 { |
181 ASSERT(context()->isGraphOwner()); | 181 ASSERT(context()->isGraphOwner()); |
182 | 182 |
183 if (m_outputs.contains(&output)) { | 183 if (m_outputs.contains(&output)) { |
184 m_outputs.remove(&output); | 184 m_outputs.remove(&output); |
185 changedOutputs(); | 185 changedOutputs(); |
186 output.removeParam(*this); | 186 output.removeParam(*this); |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 } // namespace WebCore | 190 } // namespace blink |
191 | 191 |
192 #endif // ENABLE(WEB_AUDIO) | 192 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |