Chromium Code Reviews| 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 isDisposeCalled() const { return m_isDisposeCalled; } |
|
haraken
2014/08/12 14:29:52
Nit: I renamed m_didCallDispose to m_isDisposeCall
| |
| 162 bool isMarkedForDeletion() const { return m_isMarkedForDeletion; } | |
| 163 #endif | |
| 164 | 162 |
| 165 // tailTime() is the length of time (not counting latency time) where non-ze ro output may occur after continuous silent input. | 163 // tailTime() is the length of time (not counting latency time) where non-ze ro output may occur after continuous silent input. |
| 166 virtual double tailTime() const = 0; | 164 virtual double tailTime() const = 0; |
| 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 | 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 |
| 168 // processing delay which is an artifact of the processing algorithm chosen and is *not* part of the intrinsic desired effect. For | 166 // processing delay which is an artifact of the processing algorithm chosen and is *not* part of the intrinsic desired effect. For |
| 169 // example, a "delay" effect is expected to delay the signal, and thus would not be considered latency. | 167 // example, a "delay" effect is expected to delay the signal, and thus would not be considered latency. |
| 170 virtual double latencyTime() const = 0; | 168 virtual double latencyTime() const = 0; |
| 171 | 169 |
| 172 // propagatesSilence() should return true if the node will generate silent o utput when given silent input. By default, AudioNode | 170 // propagatesSilence() should return true if the node will generate silent o utput when given silent input. By default, AudioNode |
| 173 // will take tailTime() and latencyTime() into account when determining whet her the node will propagate silence. | 171 // 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... | |
| 220 | 218 |
| 221 double m_lastProcessingTime; | 219 double m_lastProcessingTime; |
| 222 double m_lastNonSilentTime; | 220 double m_lastNonSilentTime; |
| 223 | 221 |
| 224 #if !ENABLE(OILPAN) | 222 #if !ENABLE(OILPAN) |
| 225 // Ref-counting | 223 // Ref-counting |
| 226 volatile int m_normalRefCount; | 224 volatile int m_normalRefCount; |
| 227 #endif | 225 #endif |
| 228 volatile int m_connectionRefCount; | 226 volatile int m_connectionRefCount; |
| 229 | 227 |
| 230 #if !ENABLE(OILPAN) | |
| 231 bool m_isMarkedForDeletion; | |
| 232 #endif | |
| 233 bool m_isDisabled; | 228 bool m_isDisabled; |
| 234 | 229 bool m_isDisposeCalled; |
| 235 #if ENABLE(ASSERT) | |
| 236 bool m_didCallDispose; | |
| 237 #endif | |
| 238 | 230 |
| 239 #if DEBUG_AUDIONODE_REFERENCES | 231 #if DEBUG_AUDIONODE_REFERENCES |
| 240 static bool s_isNodeCountInitialized; | 232 static bool s_isNodeCountInitialized; |
| 241 static int s_nodeCount[NodeTypeEnd]; | 233 static int s_nodeCount[NodeTypeEnd]; |
| 242 #endif | 234 #endif |
| 243 static unsigned s_instanceCount; | 235 static unsigned s_instanceCount; |
| 244 | 236 |
| 245 #if !ENABLE(OILPAN) | 237 #if !ENABLE(OILPAN) |
| 246 virtual void refEventTarget() OVERRIDE FINAL { ref(); } | 238 virtual void refEventTarget() OVERRIDE FINAL { ref(); } |
| 247 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } | 239 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } |
| 248 #endif | 240 #endif |
| 249 | 241 |
| 250 protected: | 242 protected: |
| 251 unsigned m_channelCount; | 243 unsigned m_channelCount; |
| 252 ChannelCountMode m_channelCountMode; | 244 ChannelCountMode m_channelCountMode; |
| 253 AudioBus::ChannelInterpretation m_channelInterpretation; | 245 AudioBus::ChannelInterpretation m_channelInterpretation; |
| 254 }; | 246 }; |
| 255 | 247 |
| 256 } // namespace blink | 248 } // namespace blink |
| 257 | 249 |
| 258 #endif // AudioNode_h | 250 #endif // AudioNode_h |
| OLD | NEW |