Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OfflineAudioContext.suspend can suspend before the given time #1822

Closed
rtoy opened this issue Jan 22, 2019 · 4 comments
Closed

OfflineAudioContext.suspend can suspend before the given time #1822

rtoy opened this issue Jan 22, 2019 · 4 comments
Milestone

Comments

@rtoy
Copy link
Member

rtoy commented Jan 22, 2019

As currently defined, OfflineAudioContext.suspend(t) can suspend at a
time before t because it rounds down
(https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-suspend).

This always catches me by surprise because it's really the only
WebAudio method that can make things happen before the specified
time.

I think it should round up to the next render quantum.

@rtoy
Copy link
Member Author

rtoy commented Jan 22, 2019

AFAIK, only chrome has implemented this, so it might be a good time to change this behavior before other browsers implement this method.

WDYT @padenot

@padenot
Copy link
Member

padenot commented Jan 22, 2019

I don't think rounding up has any usefulness, I'd rather error out, but maybe it's too late for this ?

Just to confirm, we haven't implemented this indeed.

@rtoy
Copy link
Member Author

rtoy commented Jan 22, 2019

Why error out? What do you mean by this?

Rounding down is confusing because if I specified a time t, the context could possibly be suspended before time t. And I always forget this and expect suspension at time t or greater.

@padenot
Copy link
Member

padenot commented Jan 23, 2019

I'm sorry I completely mis-read what you had written last evening. Your proposal sounds fine.

@mdjp mdjp added this to the Web Audio V1 milestone Jan 31, 2019
rtoy added a commit to rtoy/web-audio-api that referenced this issue Jan 31, 2019
…r quantum boundary

Instead of rounding down, we want to round up so that the actual
suspension time is never before the specified time.  It's really
confusing when the suspension happens before the given time because
nothing else in WebAudio works this way.
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 1, 2019
OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
@padenot padenot closed this as completed in 980d277 Feb 7, 2019
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 8, 2019
OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 8, 2019
OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}
aarongable pushed a commit to chromium/chromium that referenced this issue Feb 8, 2019
OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 21, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 22, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 26, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 27, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <tkentchromium.org>
Reviewed-by: Hongchan Choi <hongchanchromium.org>
Commit-Queue: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214

UltraBlame original commit: 5255301763d07829b256b6fc8022064ab01e500f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <tkentchromium.org>
Reviewed-by: Hongchan Choi <hongchanchromium.org>
Commit-Queue: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214

UltraBlame original commit: 5255301763d07829b256b6fc8022064ab01e500f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <tkentchromium.org>
Reviewed-by: Hongchan Choi <hongchanchromium.org>
Commit-Queue: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214

UltraBlame original commit: dcf9f8a30353c00c97b288f85ea84f95bd4d3d19
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <tkentchromium.org>
Reviewed-by: Hongchan Choi <hongchanchromium.org>
Commit-Queue: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214

UltraBlame original commit: 5255301763d07829b256b6fc8022064ab01e500f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <tkentchromium.org>
Reviewed-by: Hongchan Choi <hongchanchromium.org>
Commit-Queue: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214

UltraBlame original commit: dcf9f8a30353c00c97b288f85ea84f95bd4d3d19
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…suspend, a=testonly

Automatic update from web-platform-tests
Round up to the next render quantum for suspend

OfflineAudioContext.suspend rounds the time up to the next render
quantum instead of down.  It is sometimes confusing when suspend
occurs before the given time, which is different from how everything
else works in WebAudio.

A few tests need to be fixed because they computed the boundary by
rounding down instead of up.  One test needed to be adjusted because
the times were rounded to different boundaries instead of the same
boundary.

See also WebAudio/web-audio-api#1822

Bug: 927895
Change-Id: Ie6685c620dd38eb2a059901d13b907764ba1a2db
Reviewed-on: https://chromium-review.googlesource.com/c/1450536
Reviewed-by: Kent Tamura <tkentchromium.org>
Reviewed-by: Hongchan Choi <hongchanchromium.org>
Commit-Queue: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#630346}

--

wpt-commits: 1b1a627e597f15b60327191799b8081beac2a3cd
wpt-pr: 15214

UltraBlame original commit: dcf9f8a30353c00c97b288f85ea84f95bd4d3d19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants