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