Bug 82348 - Audio Element playbackrate < .5 are rounded up
Summary: Audio Element playbackrate < .5 are rounded up
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 09:07 PDT by Terry Ryan
Modified: 2012-04-04 12:50 PDT (History)
1 user (show)

See Also:


Attachments
Html page and m4a file for testing the audio results in bug report. (339.48 KB, application/zip)
2012-03-27 09:08 PDT, Terry Ryan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Ryan 2012-03-27 09:07:42 PDT
When using the playbackrate attribute of the audio element, rates less then .5 are rounded up to .5. 

The attached example shows this in action.  There are several buttons that playback the content at different rates. 
Playback rates for values from .5-2 are accurate.
The page predicts playback duration for each button press based on audio duration/rate. 
Under .5 always yield actual durations approximate to predicted rates
Over .5 always yield actual durations approximate durations based on a .5 rate.

A casual listen to the audio at a ridiculously slow playback rate (say .1) will clearly sound like only half speed.
Comment 1 Terry Ryan 2012-03-27 09:08:59 PDT
Created attachment 134083 [details]
Html page and m4a file for testing the audio results in bug report.
Comment 2 Eric Carlson 2012-03-27 14:16:13 PDT
Not all media engines are able to play back audio at arbitrary rates. In this case the lowest rate supported is apparently 0.5, so it is being clamped to that rate.
Comment 3 Terry Ryan 2012-03-27 14:26:25 PDT
(In reply to comment #2)
> Not all media engines are able to play back audio at arbitrary rates. In this case the lowest rate supported is apparently 0.5, so it is being clamped to that rate.

Thanks for looking at this.

Is playing at .5 the right behavior in that case? Wouldn't throwing an error be preferred?
Comment 4 Eric Carlson 2012-04-04 12:39:16 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > Not all media engines are able to play back audio at arbitrary rates. In this case the lowest rate supported is apparently 0.5, so it is being clamped to that rate.
> 
> Thanks for looking at this.
> 
> Is playing at .5 the right behavior in that case? Wouldn't throwing an error be preferred?

There was a discussion about this about 18 months ago on the HTML5 mailing list. The spec editor feels strongly that a UA should do whatever tricks it has to to make it appear that playback is progressing at playbackRate, for example seeking and playing a snippet, seeking again, etc. 

A bug was filed against the HTML spec about this, but it was closed as WONTFIX. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=10837 for a discussion.

WebKit previously returned the actual playback rate, ie. the rate at which the media engine was playing, but because of the spec change it was updated to always return whatever value was last set.
Comment 5 Terry Ryan 2012-04-04 12:50:23 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Not all media engines are able to play back audio at arbitrary rates. In this case the lowest rate supported is apparently 0.5, so it is being clamped to that rate.
> > 
> > Thanks for looking at this.
> > 
> > Is playing at .5 the right behavior in that case? Wouldn't throwing an error be preferred?
> 
> There was a discussion about this about 18 months ago on the HTML5 mailing list. The spec editor feels strongly that a UA should do whatever tricks it has to to make it appear that playback is progressing at playbackRate, for example seeking and playing a snippet, seeking again, etc. 
> 
> A bug was filed against the HTML spec about this, but it was closed as WONTFIX. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=10837 for a discussion.
> 
> WebKit previously returned the actual playback rate, ie. the rate at which the media engine was playing, but because of the spec change it was updated to always return whatever value was last set.

Thanks for detailed response.