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

Fix all AudioBuffer WPTs #21602

Merged
merged 10 commits into from Sep 19, 2018

Check AudioBuffer options constraints

  • Loading branch information
ferjm committed Sep 19, 2018
commit 5307766ed220db601091dd8e50a93688bbd3b6a7
@@ -77,7 +77,9 @@ impl AudioBuffer {
window: &Window,
options: &AudioBufferOptions,
) -> Fallible<DomRoot<AudioBuffer>> {
if options.numberOfChannels > MAX_CHANNEL_COUNT ||
if options.length <= 0 ||
options.numberOfChannels <= 0 ||
options.numberOfChannels > MAX_CHANNEL_COUNT ||
*options.sampleRate < MIN_SAMPLE_RATE ||
*options.sampleRate > MAX_SAMPLE_RATE
{
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.