Convert AudioParam time values to ticks relative to the source stream, not the destination stream

RESOLVED FIXED in mozilla23

Status

()

Core
Web Audio
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla23
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 733041 [details] [diff] [review]
Patch (v1)

In ProduceAudioBlock, the stream that we get is the source stream, and the times specified on AudioParam objects are relative to the graph's destination stream.  When converting values to ticks, we currently convert the other way around.
Attachment #733041 - Flags: review?(roc)
Comment on attachment 733041 [details] [diff] [review]
Patch (v1)

Review of attachment 733041 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/webaudio/WebAudioUtils.cpp
@@ +21,5 @@
>      TrackRate sampleRate = IdealAudioRate();
>  
>      ConvertTimeToTickHelper* This = static_cast<ConvertTimeToTickHelper*> (aClosure);
> +    TrackTicks tick = This->mDestinationStream->GetCurrentPosition();
> +    TrackTicks destinationStreamTime = TicksToTimeRoundDown(sampleRate, tick);

This is a StreamTime, not a TrackTicks.
Attachment #733041 - Flags: review?(roc) → review+
(Assignee)

Comment 3

5 years ago
Gah, I messed up and included an unintentional change in my commit.  This fixes it: https://hg.mozilla.org/integration/mozilla-inbound/rev/0673f4718ee2
https://hg.mozilla.org/mozilla-central/rev/8084f411a027
https://hg.mozilla.org/mozilla-central/rev/0673f4718ee2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
(Assignee)

Comment 5

5 years ago
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.