Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp

Issue 2621923003: Remove AudioSourceNode class (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 } 123 }
124 124
125 // ---------------------------------------------------------------- 125 // ----------------------------------------------------------------
126 126
127 MediaStreamAudioSourceNode::MediaStreamAudioSourceNode( 127 MediaStreamAudioSourceNode::MediaStreamAudioSourceNode(
128 BaseAudioContext& context, 128 BaseAudioContext& context,
129 MediaStream& mediaStream, 129 MediaStream& mediaStream,
130 MediaStreamTrack* audioTrack, 130 MediaStreamTrack* audioTrack,
131 std::unique_ptr<AudioSourceProvider> audioSourceProvider) 131 std::unique_ptr<AudioSourceProvider> audioSourceProvider)
132 : AudioSourceNode(context) { 132 : AudioNode(context) {
133 setHandler(MediaStreamAudioSourceHandler::create( 133 setHandler(MediaStreamAudioSourceHandler::create(
134 *this, mediaStream, audioTrack, std::move(audioSourceProvider))); 134 *this, mediaStream, audioTrack, std::move(audioSourceProvider)));
135 } 135 }
136 136
137 MediaStreamAudioSourceNode* MediaStreamAudioSourceNode::create( 137 MediaStreamAudioSourceNode* MediaStreamAudioSourceNode::create(
138 BaseAudioContext& context, 138 BaseAudioContext& context,
139 MediaStream& mediaStream, 139 MediaStream& mediaStream,
140 ExceptionState& exceptionState) { 140 ExceptionState& exceptionState) {
141 DCHECK(isMainThread()); 141 DCHECK(isMainThread());
142 142
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 MediaStreamAudioSourceNode* MediaStreamAudioSourceNode::create( 175 MediaStreamAudioSourceNode* MediaStreamAudioSourceNode::create(
176 BaseAudioContext* context, 176 BaseAudioContext* context,
177 const MediaStreamAudioSourceOptions& options, 177 const MediaStreamAudioSourceOptions& options,
178 ExceptionState& exceptionState) { 178 ExceptionState& exceptionState) {
179 return create(*context, *options.mediaStream(), exceptionState); 179 return create(*context, *options.mediaStream(), exceptionState);
180 } 180 }
181 181
182 DEFINE_TRACE(MediaStreamAudioSourceNode) { 182 DEFINE_TRACE(MediaStreamAudioSourceNode) {
183 AudioSourceProviderClient::trace(visitor); 183 AudioSourceProviderClient::trace(visitor);
184 AudioSourceNode::trace(visitor); 184 AudioNode::trace(visitor);
185 } 185 }
186 186
187 MediaStreamAudioSourceHandler& 187 MediaStreamAudioSourceHandler&
188 MediaStreamAudioSourceNode::mediaStreamAudioSourceHandler() const { 188 MediaStreamAudioSourceNode::mediaStreamAudioSourceHandler() const {
189 return static_cast<MediaStreamAudioSourceHandler&>(handler()); 189 return static_cast<MediaStreamAudioSourceHandler&>(handler());
190 } 190 }
191 191
192 MediaStream* MediaStreamAudioSourceNode::getMediaStream() const { 192 MediaStream* MediaStreamAudioSourceNode::getMediaStream() const {
193 return mediaStreamAudioSourceHandler().getMediaStream(); 193 return mediaStreamAudioSourceHandler().getMediaStream();
194 } 194 }
195 195
196 void MediaStreamAudioSourceNode::setFormat(size_t numberOfChannels, 196 void MediaStreamAudioSourceNode::setFormat(size_t numberOfChannels,
197 float sourceSampleRate) { 197 float sourceSampleRate) {
198 mediaStreamAudioSourceHandler().setFormat(numberOfChannels, sourceSampleRate); 198 mediaStreamAudioSourceHandler().setFormat(numberOfChannels, sourceSampleRate);
199 } 199 }
200 200
201 } // namespace blink 201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698