Closed Bug 877820 Opened 11 years ago Closed 11 years ago

WebAudio div-by-zero [@mozilla::RoundUpToAudioBlock]

Categories

(Core :: Web Audio, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: posidron, Assigned: ehsan.akhgari)

References

Details

(Keywords: crash, testcase)

Attachments

(2 files)

Attached file testcase
content/media/MediaStreamGraph.cpp:1027

    GraphTime endBlockingDecisions =
*     RoundUpToAudioBlock(sampleRate, mCurrentTime + MillisecondsToMediaTime(AUDIO_TARGET_MS));


content/media/MediaStreamGraph.cpp:952

static GraphTime
RoundUpToAudioBlock(TrackRate aSampleRate, GraphTime aTime)
{
[...]
  return
    ((((blocksAtIdealaSampleRate + 1)*WEBAUDIO_BLOCK_SIZE) << MEDIA_TIME_FRAC_BITS)
     + aSampleRate - 1)/aSampleRate;
}


Tested with http://hg.mozilla.org/integration/mozilla-inbound/rev/d7c6d6061ab5
Boring stuff!  We truncate the float sampling rate to an integer, so we need to check against 1.0 not 0.0!
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #756206 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/2ac5f1aa16a5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Mass moving Web Audio bugs to the Web Audio component.  Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: