OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 initialize(); | 62 initialize(); |
63 } | 63 } |
64 | 64 |
65 MediaElementAudioSourceNode::~MediaElementAudioSourceNode() | 65 MediaElementAudioSourceNode::~MediaElementAudioSourceNode() |
66 { | 66 { |
67 ASSERT(!isInitialized()); | 67 ASSERT(!isInitialized()); |
68 } | 68 } |
69 | 69 |
70 void MediaElementAudioSourceNode::dispose() | 70 void MediaElementAudioSourceNode::dispose() |
71 { | 71 { |
72 #if !ENABLE(OILPAN) | |
73 m_mediaElement->setAudioSourceNode(0); | 72 m_mediaElement->setAudioSourceNode(0); |
74 #endif | |
75 uninitialize(); | 73 uninitialize(); |
76 AudioSourceNode::dispose(); | 74 AudioSourceNode::dispose(); |
77 } | 75 } |
78 | 76 |
79 void MediaElementAudioSourceNode::setFormat(size_t numberOfChannels, float sourc
eSampleRate) | 77 void MediaElementAudioSourceNode::setFormat(size_t numberOfChannels, float sourc
eSampleRate) |
80 { | 78 { |
81 if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_so
urceSampleRate) { | 79 if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_so
urceSampleRate) { |
82 if (!numberOfChannels || numberOfChannels > AudioContext::maxNumberOfCha
nnels() || sourceSampleRate < minSampleRate || sourceSampleRate > maxSampleRate)
{ | 80 if (!numberOfChannels || numberOfChannels > AudioContext::maxNumberOfCha
nnels() || sourceSampleRate < minSampleRate || sourceSampleRate > maxSampleRate)
{ |
83 // process() will generate silence for these uninitialized values. | 81 // process() will generate silence for these uninitialized values. |
84 WTF_LOG(Media, "MediaElementAudioSourceNode::setFormat(%u, %f) - unh
andled format change", static_cast<unsigned>(numberOfChannels), sourceSampleRate
); | 82 WTF_LOG(Media, "MediaElementAudioSourceNode::setFormat(%u, %f) - unh
andled format change", static_cast<unsigned>(numberOfChannels), sourceSampleRate
); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void MediaElementAudioSourceNode::trace(Visitor* visitor) | 162 void MediaElementAudioSourceNode::trace(Visitor* visitor) |
165 { | 163 { |
166 visitor->trace(m_mediaElement); | 164 visitor->trace(m_mediaElement); |
167 AudioSourceNode::trace(visitor); | 165 AudioSourceNode::trace(visitor); |
168 AudioSourceProviderClient::trace(visitor); | 166 AudioSourceProviderClient::trace(visitor); |
169 } | 167 } |
170 | 168 |
171 } // namespace blink | 169 } // namespace blink |
172 | 170 |
173 #endif // ENABLE(WEB_AUDIO) | 171 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |