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

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

Issue 2420983002: AudioParams with automations must process timelines (Closed)
Patch Set: Use kRenderQuantumFrames. Created 4 years, 1 month 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Can be called from main thread or context's audio thread. It must be 134 // Can be called from main thread or context's audio thread. It must be
135 // called while the context's graph lock is held. 135 // called while the context's graph lock is held.
136 void breakConnectionWithLock(); 136 void breakConnectionWithLock();
137 137
138 // The AudioNodeInput(s) (if any) will already have their input data available 138 // The AudioNodeInput(s) (if any) will already have their input data available
139 // when process() is called. Subclasses will take this input data and put the 139 // when process() is called. Subclasses will take this input data and put the
140 // results in the AudioBus(s) of its AudioNodeOutput(s) (if any). 140 // results in the AudioBus(s) of its AudioNodeOutput(s) (if any).
141 // Called from context's audio thread. 141 // Called from context's audio thread.
142 virtual void process(size_t framesToProcess) = 0; 142 virtual void process(size_t framesToProcess) = 0;
143 143
144 // Like process(), but only causes the automations to process; the
145 // normal processing of the node is bypassed. By default, we assume
146 // no AudioParams need to be updated.
147 virtual void processAudioParams(size_t framesToProcess){};
hongchan 2016/11/07 22:17:26 Can we rename this to |processAudioParamsOnly|?
Raymond Toy 2016/11/07 23:49:24 Ok. But grammatically, I think that should be |pro
148
144 // No significant resources should be allocated until initialize() is called. 149 // No significant resources should be allocated until initialize() is called.
145 // Processing may not occur until a node is initialized. 150 // Processing may not occur until a node is initialized.
146 virtual void initialize(); 151 virtual void initialize();
147 virtual void uninitialize(); 152 virtual void uninitialize();
148 153
149 // Clear internal state when the node is disabled. When a node is disabled, 154 // Clear internal state when the node is disabled. When a node is disabled,
150 // it is no longer pulled so any internal state is never updated. But some 155 // it is no longer pulled so any internal state is never updated. But some
151 // nodes (DynamicsCompressorNode) have internal state that is still 156 // nodes (DynamicsCompressorNode) have internal state that is still
152 // accessible by the user. Update the internal state as if the node were 157 // accessible by the user. Update the internal state as if the node were
153 // still connected but processing all zeroes. This gives a consistent view 158 // still connected but processing all zeroes. This gives a consistent view
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; 370 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes;
366 // Represents audio node graph with Oilpan references. N-th HeapHashSet 371 // Represents audio node graph with Oilpan references. N-th HeapHashSet
367 // represents a set of AudioParam objects connected to this AudioNode's N-th 372 // represents a set of AudioParam objects connected to this AudioNode's N-th
368 // output. 373 // output.
369 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; 374 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams;
370 }; 375 };
371 376
372 } // namespace blink 377 } // namespace blink
373 378
374 #endif // AudioNode_h 379 #endif // AudioNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698