| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 // Called when a new connection has been made to one of our inputs or the co
nnection number of channels has changed. | 152 // Called when a new connection has been made to one of our inputs or the co
nnection number of channels has changed. |
| 153 // This potentially gives us enough information to perform a lazy initializa
tion or, if necessary, a re-initialization. | 153 // This potentially gives us enough information to perform a lazy initializa
tion or, if necessary, a re-initialization. |
| 154 // Called from main thread. | 154 // Called from main thread. |
| 155 virtual void checkNumberOfChannelsForInput(AudioNodeInput*); | 155 virtual void checkNumberOfChannelsForInput(AudioNodeInput*); |
| 156 | 156 |
| 157 #if DEBUG_AUDIONODE_REFERENCES | 157 #if DEBUG_AUDIONODE_REFERENCES |
| 158 static void printNodeCounts(); | 158 static void printNodeCounts(); |
| 159 #endif | 159 #endif |
| 160 | 160 |
| 161 #if !ENABLE(OILPAN) |
| 161 bool isMarkedForDeletion() const { return m_isMarkedForDeletion; } | 162 bool isMarkedForDeletion() const { return m_isMarkedForDeletion; } |
| 163 #endif |
| 162 | 164 |
| 163 // tailTime() is the length of time (not counting latency time) where non-ze
ro output may occur after continuous silent input. | 165 // tailTime() is the length of time (not counting latency time) where non-ze
ro output may occur after continuous silent input. |
| 164 virtual double tailTime() const = 0; | 166 virtual double tailTime() const = 0; |
| 165 // latencyTime() is the length of time it takes for non-zero output to appea
r after non-zero input is provided. This only applies to | 167 // latencyTime() is the length of time it takes for non-zero output to appea
r after non-zero input is provided. This only applies to |
| 166 // processing delay which is an artifact of the processing algorithm chosen
and is *not* part of the intrinsic desired effect. For | 168 // processing delay which is an artifact of the processing algorithm chosen
and is *not* part of the intrinsic desired effect. For |
| 167 // example, a "delay" effect is expected to delay the signal, and thus would
not be considered latency. | 169 // example, a "delay" effect is expected to delay the signal, and thus would
not be considered latency. |
| 168 virtual double latencyTime() const = 0; | 170 virtual double latencyTime() const = 0; |
| 169 | 171 |
| 170 // propagatesSilence() should return true if the node will generate silent o
utput when given silent input. By default, AudioNode | 172 // propagatesSilence() should return true if the node will generate silent o
utput when given silent input. By default, AudioNode |
| 171 // will take tailTime() and latencyTime() into account when determining whet
her the node will propagate silence. | 173 // will take tailTime() and latencyTime() into account when determining whet
her the node will propagate silence. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 220 |
| 219 double m_lastProcessingTime; | 221 double m_lastProcessingTime; |
| 220 double m_lastNonSilentTime; | 222 double m_lastNonSilentTime; |
| 221 | 223 |
| 222 #if !ENABLE(OILPAN) | 224 #if !ENABLE(OILPAN) |
| 223 // Ref-counting | 225 // Ref-counting |
| 224 volatile int m_normalRefCount; | 226 volatile int m_normalRefCount; |
| 225 #endif | 227 #endif |
| 226 volatile int m_connectionRefCount; | 228 volatile int m_connectionRefCount; |
| 227 | 229 |
| 230 #if !ENABLE(OILPAN) |
| 228 bool m_isMarkedForDeletion; | 231 bool m_isMarkedForDeletion; |
| 232 #endif |
| 229 bool m_isDisabled; | 233 bool m_isDisabled; |
| 230 | 234 |
| 231 #if DEBUG_AUDIONODE_REFERENCES | 235 #if DEBUG_AUDIONODE_REFERENCES |
| 232 static bool s_isNodeCountInitialized; | 236 static bool s_isNodeCountInitialized; |
| 233 static int s_nodeCount[NodeTypeEnd]; | 237 static int s_nodeCount[NodeTypeEnd]; |
| 234 #endif | 238 #endif |
| 235 static unsigned s_instanceCount; | 239 static unsigned s_instanceCount; |
| 236 | 240 |
| 237 #if !ENABLE(OILPAN) | 241 #if !ENABLE(OILPAN) |
| 238 virtual void refEventTarget() OVERRIDE FINAL { ref(); } | 242 virtual void refEventTarget() OVERRIDE FINAL { ref(); } |
| 239 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } | 243 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } |
| 240 #endif | 244 #endif |
| 241 | 245 |
| 242 protected: | 246 protected: |
| 243 unsigned m_channelCount; | 247 unsigned m_channelCount; |
| 244 ChannelCountMode m_channelCountMode; | 248 ChannelCountMode m_channelCountMode; |
| 245 AudioBus::ChannelInterpretation m_channelInterpretation; | 249 AudioBus::ChannelInterpretation m_channelInterpretation; |
| 246 }; | 250 }; |
| 247 | 251 |
| 248 } // namespace blink | 252 } // namespace blink |
| 249 | 253 |
| 250 #endif // AudioNode_h | 254 #endif // AudioNode_h |
| OLD | NEW |