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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 PassRefPtr<MediaElementAudioSourceHandler> | 63 PassRefPtr<MediaElementAudioSourceHandler> |
64 MediaElementAudioSourceHandler::create(AudioNode& node, | 64 MediaElementAudioSourceHandler::create(AudioNode& node, |
65 HTMLMediaElement& mediaElement) { | 65 HTMLMediaElement& mediaElement) { |
66 return adoptRef(new MediaElementAudioSourceHandler(node, mediaElement)); | 66 return adoptRef(new MediaElementAudioSourceHandler(node, mediaElement)); |
67 } | 67 } |
68 | 68 |
69 MediaElementAudioSourceHandler::~MediaElementAudioSourceHandler() { | 69 MediaElementAudioSourceHandler::~MediaElementAudioSourceHandler() { |
70 uninitialize(); | 70 uninitialize(); |
71 } | 71 } |
72 | 72 |
| 73 HTMLMediaElement* MediaElementAudioSourceHandler::mediaElement() const { |
| 74 return m_mediaElement.get(); |
| 75 } |
| 76 |
73 void MediaElementAudioSourceHandler::dispose() { | 77 void MediaElementAudioSourceHandler::dispose() { |
74 m_mediaElement->setAudioSourceNode(nullptr); | 78 m_mediaElement->setAudioSourceNode(nullptr); |
75 AudioHandler::dispose(); | 79 AudioHandler::dispose(); |
76 } | 80 } |
77 | 81 |
78 void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, | 82 void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, |
79 float sourceSampleRate) { | 83 float sourceSampleRate) { |
80 if (numberOfChannels != m_sourceNumberOfChannels || | 84 if (numberOfChannels != m_sourceNumberOfChannels || |
81 sourceSampleRate != m_sourceSampleRate) { | 85 sourceSampleRate != m_sourceSampleRate) { |
82 if (!numberOfChannels || | 86 if (!numberOfChannels || |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 299 |
296 void MediaElementAudioSourceNode::lock() { | 300 void MediaElementAudioSourceNode::lock() { |
297 mediaElementAudioSourceHandler().lock(); | 301 mediaElementAudioSourceHandler().lock(); |
298 } | 302 } |
299 | 303 |
300 void MediaElementAudioSourceNode::unlock() { | 304 void MediaElementAudioSourceNode::unlock() { |
301 mediaElementAudioSourceHandler().unlock(); | 305 mediaElementAudioSourceHandler().unlock(); |
302 } | 306 } |
303 | 307 |
304 } // namespace blink | 308 } // namespace blink |
OLD | NEW |