Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/DelayNode.cpp

Issue 2420983002: AudioParams with automations must process timelines (Closed)
Patch Set: Fix paths. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
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 WTF::wrapUnique(new DelayProcessor( 49 WTF::wrapUnique(new DelayProcessor(
50 context.sampleRate(), 1, m_delayTime->handler(), maxDelayTime)))); 50 context.sampleRate(), 1, m_delayTime->handler(), maxDelayTime))));
51
52 // Initialize the handler so that AudioParams can be processed.
53 handler().initialize();
51 } 54 }
52 55
53 DelayNode* DelayNode::create(BaseAudioContext& context, 56 DelayNode* DelayNode::create(BaseAudioContext& context,
54 ExceptionState& exceptionState) { 57 ExceptionState& exceptionState) {
55 DCHECK(isMainThread()); 58 DCHECK(isMainThread());
56 59
57 // The default maximum delay time for the delay node is 1 sec. 60 // The default maximum delay time for the delay node is 1 sec.
58 return create(context, 1, exceptionState); 61 return create(context, 1, exceptionState);
59 } 62 }
60 63
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 AudioParam* DelayNode::delayTime() { 104 AudioParam* DelayNode::delayTime() {
102 return m_delayTime; 105 return m_delayTime;
103 } 106 }
104 107
105 DEFINE_TRACE(DelayNode) { 108 DEFINE_TRACE(DelayNode) {
106 visitor->trace(m_delayTime); 109 visitor->trace(m_delayTime);
107 AudioNode::trace(visitor); 110 AudioNode::trace(visitor);
108 } 111 }
109 112
110 } // namespace blink 113 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698