Closed Bug 865231 Opened 12 years ago Closed 12 years ago

Implement AudioParam.setValueCurveAtTime

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

This is the only method in AudioParam which we currently don't support...
Bug 866434 (connect AudioNode output to AudioParam) is really an AudioParam feature too, and is harder to implement than this.
(In reply to comment #1) > Bug 866434 (connect AudioNode output to AudioParam) is really an AudioParam > feature too, and is harder to implement than this. Right. Note that these tracking bugs are mostly about changes to interfaces, which is why I charged bug 866434 to AudioNode.
Assignee: nobody → ehsan
Attached patch Patch (v1)Splinter Review
Attachment #746065 - Flags: review?(roc)
Comment on attachment 746065 [details] [diff] [review] Patch (v1) Review of attachment 746065 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/media/AudioEventTimeline.h @@ +117,2 @@ > }; > + float* mCurve; Add a comment identifying the sample rate used here @@ +396,5 @@ > + { > + double ratio = (t - startTime) / duration; > + if (ratio >= 1.0) { > + return aCurve[aCurveLength - 1]; > + } I think it would be a good idea to handle negative ratios here. ::: content/media/webaudio/compiledtest/TestAudioEventTimeline.cpp @@ +9,5 @@ > #include <sstream> > #include <limits> > > using namespace mozilla::dom; > +using mozilla::ArrayLength; using namespace mozilla;
Attachment #746065 - Flags: review?(roc) → review+
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #4) > Comment on attachment 746065 [details] [diff] [review] > Patch (v1) > > Review of attachment 746065 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: content/media/AudioEventTimeline.h > @@ +117,2 @@ > > }; > > + float* mCurve; > > Add a comment identifying the sample rate used here Hmm, there is no sample rate per se, we just intrapolate our position inside the curve buffer depending on how far along in time we are. I'll add a comment to make that more clear. > @@ +396,5 @@ > > + { > > + double ratio = (t - startTime) / duration; > > + if (ratio >= 1.0) { > > + return aCurve[aCurveLength - 1]; > > + } > > I think it would be a good idea to handle negative ratios here. The ratio can never be negative because the code in GetValueAtTime ensures that this is only called for ticks after mTime. I'll add a MOZ_ASSERT to document that.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
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.

Attachment

General

Created:
Updated:
Size: