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

Side by Side Diff: Source/modules/webaudio/BiquadFilterNode.cpp

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring to ToT Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/BiquadFilterNode.h ('k') | Source/modules/webaudio/ChannelMergerNode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 12 matching lines...) Expand all
23 */ 23 */
24 24
25 #include "config.h" 25 #include "config.h"
26 #if ENABLE(WEB_AUDIO) 26 #if ENABLE(WEB_AUDIO)
27 #include "modules/webaudio/BiquadFilterNode.h" 27 #include "modules/webaudio/BiquadFilterNode.h"
28 28
29 #include "modules/webaudio/AudioBasicProcessorHandler.h" 29 #include "modules/webaudio/AudioBasicProcessorHandler.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 BiquadFilterNode::BiquadFilterNode(AudioContext& context, float sampleRate) 33 BiquadFilterNode::BiquadFilterNode(AbstractAudioContext& context, float sampleRa te)
34 : AudioNode(context) 34 : AudioNode(context)
35 , m_frequency(AudioParam::create(context, 350.0)) 35 , m_frequency(AudioParam::create(context, 350.0))
36 , m_q(AudioParam::create(context, 1)) 36 , m_q(AudioParam::create(context, 1))
37 , m_gain(AudioParam::create(context, 0.0)) 37 , m_gain(AudioParam::create(context, 0.0))
38 , m_detune(AudioParam::create(context, 0.0)) 38 , m_detune(AudioParam::create(context, 0.0))
39 { 39 {
40 setHandler(AudioBasicProcessorHandler::create(AudioHandler::NodeTypeBiquadFi lter, *this, sampleRate, adoptPtr(new BiquadProcessor(sampleRate, 1, m_frequency ->handler(), m_q->handler(), m_gain->handler(), m_detune->handler())))); 40 setHandler(AudioBasicProcessorHandler::create(AudioHandler::NodeTypeBiquadFi lter, *this, sampleRate, adoptPtr(new BiquadProcessor(sampleRate, 1, m_frequency ->handler(), m_q->handler(), m_gain->handler(), m_detune->handler()))));
41 } 41 }
42 42
43 DEFINE_TRACE(BiquadFilterNode) 43 DEFINE_TRACE(BiquadFilterNode)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return; 114 return;
115 115
116 int n = std::min(frequencyHz->length(), std::min(magResponse->length(), phas eResponse->length())); 116 int n = std::min(frequencyHz->length(), std::min(magResponse->length(), phas eResponse->length()));
117 if (n) 117 if (n)
118 biquadProcessor()->getFrequencyResponse(n, frequencyHz->data(), magRespo nse->data(), phaseResponse->data()); 118 biquadProcessor()->getFrequencyResponse(n, frequencyHz->data(), magRespo nse->data(), phaseResponse->data());
119 } 119 }
120 120
121 } // namespace blink 121 } // namespace blink
122 122
123 #endif // ENABLE(WEB_AUDIO) 123 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/BiquadFilterNode.h ('k') | Source/modules/webaudio/ChannelMergerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698