RESOLVED FIXED93756
AudioContext::createMediaStreamSource() must create a provider for local MediaStreams
https://bugs.webkit.org/show_bug.cgi?id=93756
Summary AudioContext::createMediaStreamSource() must create a provider for local Medi...
Chris Rogers
Reported 2012-08-10 16:55:23 PDT
AudioContext::createMediaStreamSource() must create a provider for local MediaStreams
Attachments
Patch (3.89 KB, patch)
2012-08-10 17:03 PDT, Chris Rogers
no flags
Patch (3.58 KB, patch)
2012-08-10 17:33 PDT, Chris Rogers
eric.carlson: review+
Chris Rogers
Comment 1 2012-08-10 17:03:16 PDT
Adam Barth
Comment 2 2012-08-10 17:16:59 PDT
Comment on attachment 157839 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=157839&action=review > Source/WebCore/Modules/mediastream/MediaStream.h:59 > + virtual bool isLocal() const { return false; } These sorts of functions tend to point to design problems, but I don't know enough about media stream to be able to give you any useful advice. > Source/WebCore/Modules/mediastream/MediaStream.h:65 > - > + Why add trailing whitespace? > Source/WebCore/Modules/webaudio/AudioContext.cpp:400 > - > + ditto > Source/WebCore/Modules/webaudio/AudioContext.cpp:410 > + provider = 0; I'd just initialize the pointer to 0 so as to avoid having uninitialized memory. > Source/WebCore/Modules/webaudio/AudioContext.cpp:414 > + node->setFormat(2, sampleRate()); 2 -> magic constant?
Chris Rogers
Comment 3 2012-08-10 17:33:44 PDT
Eric Carlson
Comment 4 2012-08-10 18:07:48 PDT
Comment on attachment 157844 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=157844&action=review > Source/WebCore/Modules/webaudio/AudioContext.cpp:414 > + node->setFormat(2, sampleRate()); Can a media stream only ever have two channels? A comment explaining why and/or a FIXME would be helpful.
Chris Rogers
Comment 5 2012-08-10 18:40:32 PDT
(In reply to comment #4) > (From update of attachment 157844 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=157844&action=review > > > Source/WebCore/Modules/webaudio/AudioContext.cpp:414 > > + node->setFormat(2, sampleRate()); > > Can a media stream only ever have two channels? A comment explaining why and/or a FIXME would be helpful. Eric, thanks for the quick review. I'll add a comment/FIXME explaining this. Similar to HTMLMediaElement, a MediaStream could have an audio track with 1,2, or more channels. So ultimately, we'll want this to be more flexible to handle multi-channel audio devices etc. I'm just in the very early stages of bringing this to life in our implementation, so am making some initial restrictions.
Chris Rogers
Comment 6 2012-08-13 15:03:53 PDT
Note You need to log in before you can comment on or make changes to this bug.