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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 // The AudioNodeInput(s) (if any) will already have their input data availab le when process() is called. | 113 // The AudioNodeInput(s) (if any) will already have their input data availab le when process() is called. |
114 // Subclasses will take this input data and put the results in the AudioBus( s) of its AudioNodeOutput(s) (if any). | 114 // Subclasses will take this input data and put the results in the AudioBus( s) of its AudioNodeOutput(s) (if any). |
115 // Called from context's audio thread. | 115 // Called from context's audio thread. |
116 virtual void process(size_t framesToProcess) = 0; | 116 virtual void process(size_t framesToProcess) = 0; |
117 | 117 |
118 // No significant resources should be allocated until initialize() is called . | 118 // No significant resources should be allocated until initialize() is called . |
119 // Processing may not occur until a node is initialized. | 119 // Processing may not occur until a node is initialized. |
120 virtual void initialize(); | 120 virtual void initialize(); |
121 virtual void uninitialize(); | 121 virtual void uninitialize(); |
122 | 122 |
123 // Clear internal state when the node is deactivated. This prevents the node | |
124 // from providing the incorrect data based on the last-known data inside. | |
Raymond Toy
2014/10/21 20:47:57
"deactivated" -> "disabled". I think this comment
hongchan
2014/10/21 20:58:54
Acknowledged and replaced.
| |
125 virtual void clearInternalState(); | |
Raymond Toy
2014/10/21 20:47:57
If the comment above is used, perhaps this functio
hongchan
2014/10/21 20:58:54
Good to be more descriptive. But I think this meth
Raymond Toy
2014/10/21 21:05:54
Hard to say what the future holds. Ok for now, as
| |
126 | |
123 bool isInitialized() const { return m_isInitialized; } | 127 bool isInitialized() const { return m_isInitialized; } |
124 | 128 |
125 unsigned numberOfInputs() const { return m_inputs.size(); } | 129 unsigned numberOfInputs() const { return m_inputs.size(); } |
126 unsigned numberOfOutputs() const { return m_outputs.size(); } | 130 unsigned numberOfOutputs() const { return m_outputs.size(); } |
127 | 131 |
128 AudioNodeInput* input(unsigned); | 132 AudioNodeInput* input(unsigned); |
129 AudioNodeOutput* output(unsigned); | 133 AudioNodeOutput* output(unsigned); |
130 | 134 |
131 // Called from main thread by corresponding JavaScript methods. | 135 // Called from main thread by corresponding JavaScript methods. |
132 virtual void connect(AudioNode*, unsigned outputIndex, unsigned inputIndex, ExceptionState&); | 136 virtual void connect(AudioNode*, unsigned outputIndex, unsigned inputIndex, ExceptionState&); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 ChannelCountMode m_channelCountMode; | 230 ChannelCountMode m_channelCountMode; |
227 AudioBus::ChannelInterpretation m_channelInterpretation; | 231 AudioBus::ChannelInterpretation m_channelInterpretation; |
228 // The new channel count mode that will be used to set the actual mode in th e pre or post | 232 // The new channel count mode that will be used to set the actual mode in th e pre or post |
229 // rendering phase. | 233 // rendering phase. |
230 ChannelCountMode m_newChannelCountMode; | 234 ChannelCountMode m_newChannelCountMode; |
231 }; | 235 }; |
232 | 236 |
233 } // namespace blink | 237 } // namespace blink |
234 | 238 |
235 #endif // AudioNode_h | 239 #endif // AudioNode_h |
OLD | NEW |