Bug 111952 - WebKit uses the duration argument passed to AudioBufferSourceNode.start as the length of the buffer when looping
Summary: WebKit uses the duration argument passed to AudioBufferSourceNode.start as th...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 20:29 PDT by Ehsan Akhgari [:ehsan]
Modified: 2013-03-11 10:34 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ehsan Akhgari [:ehsan] 2013-03-10 20:29:33 PDT
The spec says:

"Note that the default values for loopStart and loopEnd are both 0, which indicates that looping should occur from the very start to the very end of the buffer. "

According to this, WebKit's behavior in this test case <http://people.mozilla.org/~eakhgari/webaudio/loop-webkitbug.html> is wrong.  The looping sound when pressing both the first and second buttons should be the same.
Comment 1 Ehsan Akhgari [:ehsan] 2013-03-10 20:32:14 PDT
I can reproduce this in Chrome Canary, but it seems like WebKit Nightly cannot decode ogg files, so I cannot run the test there.
Comment 2 Ehsan Akhgari [:ehsan] 2013-03-10 20:34:39 PDT
Furthermore, the spec says:

"in loop mode will continue playing until it reaches the actualLoopEnd position in the buffer (or the end of the buffer), at which point it will wrap back around to the actualLoopStart position in the buffer, and continue playing according to this pattern", which seems to suggest that the duration argument should be completely ignored in looping mode.
Comment 3 Chris Rogers 2013-03-10 22:48:39 PDT
Let me have a look.  There may be some work in the spec we need to do.
Comment 4 Ehsan Akhgari [:ehsan] 2013-03-11 08:32:08 PDT
(In reply to comment #3)
> Let me have a look.  There may be some work in the spec we need to do.

Are you planning to change the spec for this?  I'm currently implementing what the current spec says, and this just seems like a bug in WebKit.
Comment 5 Chris Rogers 2013-03-11 10:34:53 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Let me have a look.  There may be some work in the spec we need to do.
> 
> Are you planning to change the spec for this?  I'm currently implementing what the current spec says, and this just seems like a bug in WebKit.

Let me take a closer look today