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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 DelayNode::DelayNode(BaseAudioContext& context, double maxDelayTime) | 40 DelayNode::DelayNode(BaseAudioContext& context, double maxDelayTime) |
41 : AudioNode(context), | 41 : AudioNode(context), |
42 m_delayTime(AudioParam::create(context, | 42 m_delayTime(AudioParam::create(context, |
43 ParamTypeDelayDelayTime, | 43 ParamTypeDelayDelayTime, |
44 0.0, | 44 0.0, |
45 0.0, | 45 0.0, |
46 maxDelayTime)) { | 46 maxDelayTime)) { |
47 setHandler(AudioBasicProcessorHandler::create( | 47 setHandler(AudioBasicProcessorHandler::create( |
48 AudioHandler::NodeTypeDelay, *this, context.sampleRate(), | 48 AudioHandler::NodeTypeDelay, *this, context.sampleRate(), |
49 wrapUnique(new DelayProcessor(context.sampleRate(), 1, | 49 WTF::wrapUnique(new DelayProcessor( |
50 m_delayTime->handler(), maxDelayTime)))); | 50 context.sampleRate(), 1, m_delayTime->handler(), maxDelayTime)))); |
51 } | 51 } |
52 | 52 |
53 DelayNode* DelayNode::create(BaseAudioContext& context, | 53 DelayNode* DelayNode::create(BaseAudioContext& context, |
54 ExceptionState& exceptionState) { | 54 ExceptionState& exceptionState) { |
55 DCHECK(isMainThread()); | 55 DCHECK(isMainThread()); |
56 | 56 |
57 // The default maximum delay time for the delay node is 1 sec. | 57 // The default maximum delay time for the delay node is 1 sec. |
58 return create(context, 1, exceptionState); | 58 return create(context, 1, exceptionState); |
59 } | 59 } |
60 | 60 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 AudioParam* DelayNode::delayTime() { | 101 AudioParam* DelayNode::delayTime() { |
102 return m_delayTime; | 102 return m_delayTime; |
103 } | 103 } |
104 | 104 |
105 DEFINE_TRACE(DelayNode) { | 105 DEFINE_TRACE(DelayNode) { |
106 visitor->trace(m_delayTime); | 106 visitor->trace(m_delayTime); |
107 AudioNode::trace(visitor); | 107 AudioNode::trace(visitor); |
108 } | 108 } |
109 | 109 |
110 } // namespace blink | 110 } // namespace blink |
OLD | NEW |