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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h

Issue 1361233004: Implement IIRFilter node for WebAudio. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms.xml Created 5 years, 2 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 17 matching lines...) Expand all
28 #include "bindings/core/v8/ScriptPromise.h" 28 #include "bindings/core/v8/ScriptPromise.h"
29 #include "bindings/core/v8/ScriptPromiseResolver.h" 29 #include "bindings/core/v8/ScriptPromiseResolver.h"
30 #include "core/dom/ActiveDOMObject.h" 30 #include "core/dom/ActiveDOMObject.h"
31 #include "core/dom/DOMTypedArray.h" 31 #include "core/dom/DOMTypedArray.h"
32 #include "core/events/EventListener.h" 32 #include "core/events/EventListener.h"
33 #include "modules/EventTargetModules.h" 33 #include "modules/EventTargetModules.h"
34 #include "modules/ModulesExport.h" 34 #include "modules/ModulesExport.h"
35 #include "modules/webaudio/AsyncAudioDecoder.h" 35 #include "modules/webaudio/AsyncAudioDecoder.h"
36 #include "modules/webaudio/AudioDestinationNode.h" 36 #include "modules/webaudio/AudioDestinationNode.h"
37 #include "modules/webaudio/DeferredTaskHandler.h" 37 #include "modules/webaudio/DeferredTaskHandler.h"
38 #include "modules/webaudio/IIRFilterNode.h"
38 #include "platform/audio/AudioBus.h" 39 #include "platform/audio/AudioBus.h"
39 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
40 #include "wtf/HashSet.h" 41 #include "wtf/HashSet.h"
41 #include "wtf/MainThread.h" 42 #include "wtf/MainThread.h"
42 #include "wtf/RefPtr.h" 43 #include "wtf/RefPtr.h"
43 #include "wtf/Threading.h" 44 #include "wtf/Threading.h"
44 #include "wtf/Vector.h" 45 #include "wtf/Vector.h"
45 46
46 namespace blink { 47 namespace blink {
47 48
48 class AnalyserNode; 49 class AnalyserNode;
49 class AudioBuffer; 50 class AudioBuffer;
50 class AudioBufferCallback; 51 class AudioBufferCallback;
51 class AudioBufferSourceNode; 52 class AudioBufferSourceNode;
52 class AudioListener; 53 class AudioListener;
53 class AudioSummingJunction; 54 class AudioSummingJunction;
54 class BiquadFilterNode; 55 class BiquadFilterNode;
55 class ChannelMergerNode; 56 class ChannelMergerNode;
56 class ChannelSplitterNode; 57 class ChannelSplitterNode;
57 class ConvolverNode; 58 class ConvolverNode;
58 class DelayNode; 59 class DelayNode;
59 class Dictionary; 60 class Dictionary;
60 class Document; 61 class Document;
61 class DynamicsCompressorNode; 62 class DynamicsCompressorNode;
62 class ExceptionState; 63 class ExceptionState;
63 class GainNode; 64 class GainNode;
64 class HTMLMediaElement; 65 class HTMLMediaElement;
66 class IIRFilterNode;
65 class MediaElementAudioSourceNode; 67 class MediaElementAudioSourceNode;
66 class MediaStreamAudioDestinationNode; 68 class MediaStreamAudioDestinationNode;
67 class MediaStreamAudioSourceNode; 69 class MediaStreamAudioSourceNode;
68 class OscillatorNode; 70 class OscillatorNode;
69 class PannerNode; 71 class PannerNode;
70 class PeriodicWave; 72 class PeriodicWave;
71 class ScriptProcessorNode; 73 class ScriptProcessorNode;
72 class ScriptPromiseResolver; 74 class ScriptPromiseResolver;
73 class ScriptState; 75 class ScriptState;
74 class SecurityOrigin; 76 class SecurityOrigin;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 PeriodicWave* createPeriodicWave(DOMFloat32Array* real, DOMFloat32Array* ima g, ExceptionState&); 166 PeriodicWave* createPeriodicWave(DOMFloat32Array* real, DOMFloat32Array* ima g, ExceptionState&);
165 PeriodicWave* createPeriodicWave(DOMFloat32Array* real, DOMFloat32Array* ima g, const Dictionary&, ExceptionState&); 167 PeriodicWave* createPeriodicWave(DOMFloat32Array* real, DOMFloat32Array* ima g, const Dictionary&, ExceptionState&);
166 168
167 // Close 169 // Close
168 virtual ScriptPromise closeContext(ScriptState*) = 0; 170 virtual ScriptPromise closeContext(ScriptState*) = 0;
169 171
170 // Suspend/Resume 172 // Suspend/Resume
171 virtual ScriptPromise suspendContext(ScriptState*) = 0; 173 virtual ScriptPromise suspendContext(ScriptState*) = 0;
172 virtual ScriptPromise resumeContext(ScriptState*) = 0; 174 virtual ScriptPromise resumeContext(ScriptState*) = 0;
173 175
176 // IIRFilter
177 IIRFilterNode* createIIRFilter(Vector<float> feedforwardCoef, Vector<float> feedbackCoef,
178 ExceptionState&);
179
174 // When a source node has started processing and needs to be protected, 180 // When a source node has started processing and needs to be protected,
175 // this method tells the context to protect the node. 181 // this method tells the context to protect the node.
176 // 182 //
177 // The context itself keeps a reference to all source nodes. The source 183 // The context itself keeps a reference to all source nodes. The source
178 // nodes, then reference all nodes they're connected to. In turn, these 184 // nodes, then reference all nodes they're connected to. In turn, these
179 // nodes reference all nodes they're connected to. All nodes are ultimately 185 // nodes reference all nodes they're connected to. All nodes are ultimately
180 // connected to the AudioDestinationNode. When the context release a source 186 // connected to the AudioDestinationNode. When the context release a source
181 // node, it will be deactivated from the rendering graph along with all 187 // node, it will be deactivated from the rendering graph along with all
182 // other nodes it is uniquely connected to. 188 // other nodes it is uniquely connected to.
183 void notifySourceNodeStartedProcessing(AudioNode*); 189 void notifySourceNodeStartedProcessing(AudioNode*);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 void handleStoppableSourceNodes(); 323 void handleStoppableSourceNodes();
318 324
319 // This is considering 32 is large enough for multiple channels audio. 325 // This is considering 32 is large enough for multiple channels audio.
320 // It is somewhat arbitrary and could be increased if necessary. 326 // It is somewhat arbitrary and could be increased if necessary.
321 enum { MaxNumberOfChannels = 32 }; 327 enum { MaxNumberOfChannels = 32 };
322 }; 328 };
323 329
324 } // namespace blink 330 } // namespace blink
325 331
326 #endif // AbstractAudioContext_h 332 #endif // AbstractAudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698