Summary: | Allow existing AudioParams to use scheduled parameter changes | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Rogers <crogers> | ||||
Component: | Web Audio | Assignee: | Chris Rogers <crogers> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | crogers, kbr | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Chris Rogers
2011-06-03 13:17:53 PDT
Created attachment 95956 [details]
Patch
Comment on attachment 95956 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95956&action=review Looks good to me. One minor comment. > Source/WebCore/platform/audio/AudioBus.cpp:385 > + const float* source = sourceBus.channel(channelIndex)->data(); > + float* destination = channel(channelIndex)->data(); > + for (unsigned i = 0; i < numberOfGainValues; ++i) > + destination[i] = source[i] * gainValues[i]; > + } > + } else if (sourceBus.numberOfChannels() == 1) { > + const float* source = sourceBus.channel(0)->data(); > + for (unsigned channelIndex = 0; channelIndex < numberOfChannels(); ++channelIndex) { > + float* destination = channel(channelIndex)->data(); > + for (unsigned i = 0; i < numberOfGainValues; ++i) > + destination[i] = source[i] * gainValues[i]; Would be nice to avoid the duplicated code. Comment on attachment 95956 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95956&action=review >> Source/WebCore/platform/audio/AudioBus.cpp:385 >> + destination[i] = source[i] * gainValues[i]; > > Would be nice to avoid the duplicated code. Agreed. I'll try to coalesce these two cases. Committed r88074: <http://trac.webkit.org/changeset/88074> |