| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class AudioNode : public NoBaseWillBeGarbageCollectedFinalized<AudioNode>, publi
c EventTargetWithInlineData { | 53 class AudioNode : public NoBaseWillBeGarbageCollectedFinalized<AudioNode>, publi
c EventTargetWithInlineData { |
| 54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioNode); | 54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioNode); |
| 55 public: | 55 public: |
| 56 enum { ProcessingSizeInFrames = 128 }; | 56 enum { ProcessingSizeInFrames = 128 }; |
| 57 | 57 |
| 58 AudioNode(AudioContext*, float sampleRate); | 58 AudioNode(AudioContext*, float sampleRate); |
| 59 virtual ~AudioNode(); | 59 virtual ~AudioNode(); |
| 60 // dispose() is called just before the destructor. This must be called in | 60 // dispose() is called just before the destructor. This must be called in |
| 61 // the main thread, and while the graph lock is held. | 61 // the main thread, and while the graph lock is held. |
| 62 virtual void dispose(); | 62 virtual void dispose(); |
| 63 static unsigned instanceCount() { return s_instanceCount; } |
| 63 | 64 |
| 64 AudioContext* context() { return m_context.get(); } | 65 AudioContext* context() { return m_context.get(); } |
| 65 const AudioContext* context() const { return m_context.get(); } | 66 const AudioContext* context() const { return m_context.get(); } |
| 66 | 67 |
| 67 enum NodeType { | 68 enum NodeType { |
| 68 NodeTypeUnknown, | 69 NodeTypeUnknown, |
| 69 NodeTypeDestination, | 70 NodeTypeDestination, |
| 70 NodeTypeOscillator, | 71 NodeTypeOscillator, |
| 71 NodeTypeAudioBufferSource, | 72 NodeTypeAudioBufferSource, |
| 72 NodeTypeMediaElementAudioSource, | 73 NodeTypeMediaElementAudioSource, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 #endif | 225 #endif |
| 225 volatile int m_connectionRefCount; | 226 volatile int m_connectionRefCount; |
| 226 | 227 |
| 227 bool m_isMarkedForDeletion; | 228 bool m_isMarkedForDeletion; |
| 228 bool m_isDisabled; | 229 bool m_isDisabled; |
| 229 | 230 |
| 230 #if DEBUG_AUDIONODE_REFERENCES | 231 #if DEBUG_AUDIONODE_REFERENCES |
| 231 static bool s_isNodeCountInitialized; | 232 static bool s_isNodeCountInitialized; |
| 232 static int s_nodeCount[NodeTypeEnd]; | 233 static int s_nodeCount[NodeTypeEnd]; |
| 233 #endif | 234 #endif |
| 235 static unsigned s_instanceCount; |
| 234 | 236 |
| 235 #if !ENABLE(OILPAN) | 237 #if !ENABLE(OILPAN) |
| 236 virtual void refEventTarget() OVERRIDE FINAL { ref(); } | 238 virtual void refEventTarget() OVERRIDE FINAL { ref(); } |
| 237 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } | 239 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } |
| 238 #endif | 240 #endif |
| 239 | 241 |
| 240 protected: | 242 protected: |
| 241 unsigned m_channelCount; | 243 unsigned m_channelCount; |
| 242 ChannelCountMode m_channelCountMode; | 244 ChannelCountMode m_channelCountMode; |
| 243 AudioBus::ChannelInterpretation m_channelInterpretation; | 245 AudioBus::ChannelInterpretation m_channelInterpretation; |
| 244 }; | 246 }; |
| 245 | 247 |
| 246 } // namespace blink | 248 } // namespace blink |
| 247 | 249 |
| 248 #endif // AudioNode_h | 250 #endif // AudioNode_h |
| OLD | NEW |