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

RESOLVED FIXED in mozilla23

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla23
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Posted patch Patch (v1)Splinter Review
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+
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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
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.