Chromium Code Reviews| 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); |