Closed Bug 996224 Opened 12 years ago Closed 10 years ago

Possible typo in Reverb::process()

Categories

(Core :: Web Audio, defect, P3)

x86_64
Windows 7
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: maksqwe1, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: content/media/webaudio/blink/Reverb.cpp 177 bool isCopySafe = destinationChannelL && destinationChannelR && size_t(destinationBus->mDuration) >= framesToProcess && size_t(destinationBus->mDuration) >= framesToProcess; I think should be: bool isCopySafe = destinationChannelL && destinationChannelR && size_t(sourceBus->mDuration) >= framesToProcess && size_t(destinationBus->mDuration) >= framesToProcess;
http://hg.mozilla.org/mozilla-central/annotate/265d82091bce/content/media/webaudio/blink/Reverb.cpp#l177 The source and destination of the copy below are both in destinationBus, so the check is correct, but with unnecessary duplication. "framesToProcess <= size_t(sourceBus->mDuration)" is already above checked as part of isSafeToProcess. There's nothing to gain from stereo output with 1 input channel and 1 impulse response, so we should probably change the caller to use 1 output channel and remove this block.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
As far as I understand, the fix consists in removing size_t(sourceBus->mDuration) >= framesToProcess && size_t(destinationBus->mDuration) >= framesToProcess; from http://hg.mozilla.org/mozilla-central/annotate/265d82091bce/content/media/webaudio/blink/Reverb.cpp#l177 since this test is already done in http://hg.mozilla.org/mozilla-central/annotate/265d82091bce/content/media/webaudio/blink/Reverb.cpp#l141 Is that correct?
Flags: needinfo?(padenot)
Yep I think that's it.
Flags: needinfo?(padenot)
Attached patch isCopySafe.patchSplinter Review
Attachment #8608688 - Flags: review?(padenot)
Ah yeah no this has already been done by another commit apparently.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Attachment #8608688 - Flags: review?(padenot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: