| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // to multiple AudioNode inputs. Called from context's audio thread. | 179 // to multiple AudioNode inputs. Called from context's audio thread. |
| 180 void ProcessIfNecessary(size_t frames_to_process); | 180 void ProcessIfNecessary(size_t frames_to_process); |
| 181 | 181 |
| 182 // Called when a new connection has been made to one of our inputs or the | 182 // Called when a new connection has been made to one of our inputs or the |
| 183 // connection number of channels has changed. This potentially gives us | 183 // connection number of channels has changed. This potentially gives us |
| 184 // enough information to perform a lazy initialization or, if necessary, a | 184 // enough information to perform a lazy initialization or, if necessary, a |
| 185 // re-initialization. Called from main thread. | 185 // re-initialization. Called from main thread. |
| 186 virtual void CheckNumberOfChannelsForInput(AudioNodeInput*); | 186 virtual void CheckNumberOfChannelsForInput(AudioNodeInput*); |
| 187 | 187 |
| 188 #if DEBUG_AUDIONODE_REFERENCES | 188 #if DEBUG_AUDIONODE_REFERENCES |
| 189 static void printNodeCounts(); | 189 static void PrintNodeCounts(); |
| 190 #endif | 190 #endif |
| 191 | 191 |
| 192 // tailTime() is the length of time (not counting latency time) where | 192 // tailTime() is the length of time (not counting latency time) where |
| 193 // non-zero output may occur after continuous silent input. | 193 // non-zero output may occur after continuous silent input. |
| 194 virtual double TailTime() const; | 194 virtual double TailTime() const; |
| 195 | 195 |
| 196 // latencyTime() is the length of time it takes for non-zero output to | 196 // latencyTime() is the length of time it takes for non-zero output to |
| 197 // appear after non-zero input is provided. This only applies to processing | 197 // appear after non-zero input is provided. This only applies to processing |
| 198 // delay which is an artifact of the processing algorithm chosen and is | 198 // delay which is an artifact of the processing algorithm chosen and is |
| 199 // *not* part of the intrinsic desired effect. For example, a "delay" effect | 199 // *not* part of the intrinsic desired effect. For example, a "delay" effect |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 Vector<std::unique_ptr<AudioNodeOutput>> outputs_; | 274 Vector<std::unique_ptr<AudioNodeOutput>> outputs_; |
| 275 | 275 |
| 276 double last_processing_time_; | 276 double last_processing_time_; |
| 277 double last_non_silent_time_; | 277 double last_non_silent_time_; |
| 278 | 278 |
| 279 volatile int connection_ref_count_; | 279 volatile int connection_ref_count_; |
| 280 | 280 |
| 281 bool is_disabled_; | 281 bool is_disabled_; |
| 282 | 282 |
| 283 #if DEBUG_AUDIONODE_REFERENCES | 283 #if DEBUG_AUDIONODE_REFERENCES |
| 284 static bool s_isNodeCountInitialized; | 284 static bool is_node_count_initialized_; |
| 285 static int s_nodeCount[NodeTypeEnd]; | 285 static int node_count_[kNodeTypeEnd]; |
| 286 #endif | 286 #endif |
| 287 | 287 |
| 288 ChannelCountMode channel_count_mode_; | 288 ChannelCountMode channel_count_mode_; |
| 289 AudioBus::ChannelInterpretation channel_interpretation_; | 289 AudioBus::ChannelInterpretation channel_interpretation_; |
| 290 | 290 |
| 291 protected: | 291 protected: |
| 292 // Set the (internal) channelCountMode and channelInterpretation | 292 // Set the (internal) channelCountMode and channelInterpretation |
| 293 // accordingly. Use this in the node constructors to set the internal state | 293 // accordingly. Use this in the node constructors to set the internal state |
| 294 // correctly if the node uses values different from the defaults. | 294 // correctly if the node uses values different from the defaults. |
| 295 void SetInternalChannelCountMode(ChannelCountMode); | 295 void SetInternalChannelCountMode(ChannelCountMode); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> connected_nodes_; | 372 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> connected_nodes_; |
| 373 // Represents audio node graph with Oilpan references. N-th HeapHashSet | 373 // Represents audio node graph with Oilpan references. N-th HeapHashSet |
| 374 // represents a set of AudioParam objects connected to this AudioNode's N-th | 374 // represents a set of AudioParam objects connected to this AudioNode's N-th |
| 375 // output. | 375 // output. |
| 376 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> connected_params_; | 376 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> connected_params_; |
| 377 }; | 377 }; |
| 378 | 378 |
| 379 } // namespace blink | 379 } // namespace blink |
| 380 | 380 |
| 381 #endif // AudioNode_h | 381 #endif // AudioNode_h |
| OLD | NEW |