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

Unified Diff: Source/modules/webaudio/AudioContext.cpp

Issue 14188039: MediaStream API: Remove LocalMediaStream (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioContext.cpp
diff --git a/Source/modules/webaudio/AudioContext.cpp b/Source/modules/webaudio/AudioContext.cpp
index 04cdd4c691e9ad56bd7822607bbb9f05288edecb..753adc6de7fc5bc5190fdfb08665101380c841cd 100644
--- a/Source/modules/webaudio/AudioContext.cpp
+++ b/Source/modules/webaudio/AudioContext.cpp
@@ -398,15 +398,15 @@ PassRefPtr<MediaStreamAudioSourceNode> AudioContext::createMediaStreamSource(Med
AudioSourceProvider* provider = 0;
MediaStreamTrackVector audioTracks = mediaStream->getAudioTracks();
- if (mediaStream->isLocal() && audioTracks.size()) {
- // Enable input for the specific local audio device specified in the MediaStreamSource.
- RefPtr<MediaStreamTrack> localAudio = audioTracks[0];
+
+ // FIXME: get a provider for non-local MediaStreams (like from a remote peer).
Chris Rogers 2013/04/19 18:20:28 We can't just stop checking for isLocal() since we
Tommy Widenflycht 2013/04/22 07:45:23 The MediaStream is loosing in importance for every
+ for (size_t i = 0; i < audioTracks.size(); ++i) {
+ RefPtr<MediaStreamTrack> localAudio = audioTracks[i];
MediaStreamSource* source = localAudio->component()->source();
- destination()->enableInput(source->deviceId());
- provider = destination()->localAudioInputProvider();
- } else {
- // FIXME: get a provider for non-local MediaStreams (like from a remote peer).
- provider = 0;
+ if (!source->deviceId().isEmpty()) {
+ destination()->enableInput(source->deviceId());
+ provider = destination()->localAudioInputProvider();
Chris Rogers 2013/04/22 17:38:24 Tommi, thanks for clarifying - seems fine then exc
Tommy Widenflycht 2013/04/23 11:38:53 Doh, thanks. break added. On 2013/04/22 17:38:24,
+ }
}
RefPtr<MediaStreamAudioSourceNode> node = MediaStreamAudioSourceNode::create(this, mediaStream, provider);
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698