Closed Bug 857790 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(1 file)

Attached 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
Closed: 7 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.