| 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 30 matching lines...) Expand all Loading... |
| 41 #include <stdio.h> | 41 #include <stdio.h> |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace WebCore { | 44 namespace WebCore { |
| 45 | 45 |
| 46 AudioNode::AudioNode(AudioContext* context, float sampleRate) | 46 AudioNode::AudioNode(AudioContext* context, float sampleRate) |
| 47 : m_isInitialized(false) | 47 : m_isInitialized(false) |
| 48 , m_nodeType(NodeTypeUnknown) | 48 , m_nodeType(NodeTypeUnknown) |
| 49 , m_context(context) | 49 , m_context(context) |
| 50 , m_sampleRate(sampleRate) | 50 , m_sampleRate(sampleRate) |
| 51 , m_keepAlive(adoptPtr(new Persistent<AudioNode>(this))) |
| 51 , m_lastProcessingTime(-1) | 52 , m_lastProcessingTime(-1) |
| 52 , m_lastNonSilentTime(-1) | 53 , m_lastNonSilentTime(-1) |
| 53 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC
ounted class) | 54 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC
ounted class) |
| 54 , m_connectionRefCount(0) | 55 , m_connectionRefCount(0) |
| 55 , m_isMarkedForDeletion(false) | 56 , m_isMarkedForDeletion(false) |
| 56 , m_isDisabled(false) | 57 , m_isDisabled(false) |
| 57 , m_channelCount(2) | 58 , m_channelCount(2) |
| 58 , m_channelCountMode(Max) | 59 , m_channelCountMode(Max) |
| 59 , m_channelInterpretation(AudioBus::Speakers) | 60 , m_channelInterpretation(AudioBus::Speakers) |
| 60 { | 61 { |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 fprintf(stderr, "===========================\n"); | 580 fprintf(stderr, "===========================\n"); |
| 580 | 581 |
| 581 for (unsigned i = 0; i < NodeTypeEnd; ++i) | 582 for (unsigned i = 0; i < NodeTypeEnd; ++i) |
| 582 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]); | 583 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]); |
| 583 | 584 |
| 584 fprintf(stderr, "===========================\n\n\n"); | 585 fprintf(stderr, "===========================\n\n\n"); |
| 585 } | 586 } |
| 586 | 587 |
| 587 #endif // DEBUG_AUDIONODE_REFERENCES | 588 #endif // DEBUG_AUDIONODE_REFERENCES |
| 588 | 589 |
| 590 void AudioNode::trace(Visitor* visitor) |
| 591 { |
| 592 visitor->trace(m_context); |
| 593 } |
| 594 |
| 595 void AudioNode::clearKeepAlive() |
| 596 { |
| 597 ASSERT(m_keepAlive); |
| 598 m_keepAlive = nullptr; |
| 599 } |
| 600 |
| 589 } // namespace WebCore | 601 } // namespace WebCore |
| 590 | 602 |
| 591 #endif // ENABLE(WEB_AUDIO) | 603 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |