New issue
Advanced search Search tips
Starred by 58 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
Top-Starred-Bugs


Sign in to add a comment

AudioContext needs to support optional sample rate parameter.

Project Member Reported by rtoy@chromium.org, Nov 11 2014

Issue description

See https://github.com/WebAudio/web-audio-api/issues/300

But the options object is not yet specified.
 

Comment 1 by rtoy@chromium.org, Dec 11 2015

Status: Available

Comment 2 by rtoy@chromium.org, Dec 11 2015

 Issue 73062  has been merged into this issue.

Comment 3 by tdh...@gmail.com, Apr 13 2016

I'm pretty sure this isn't available actually.

Comment 4 by rtoy@chromium.org, Apr 13 2016

tdhutt@  I don't quite understand what you're saying.  Chrome certainly doesn't have it.  And the spec hasn't been updated to include this yet, but the issue is marked ready for editing so it's been generally agreed upon to include it.

Comment 5 by tdh...@gmail.com, Apr 13 2016

Ah sorry I thought "Available" meant "Available for users to use"... I guess it actually means "Available for people to fix"?

Comment 6 by rtoy@chromium.org, Apr 13 2016

Status: available means it's a valid issue that needs to be fixed.  Well, once the spec is updated with the correct text.
Project Member

Comment 7 by sheriffbot@chromium.org, Apr 14 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by rtoy@chromium.org, Apr 14 2017

Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)
This is now part of the spec, so we need to implement this.
Here is an extract from the spec https://webaudio.github.io/web-audio-api/#idl-def-AudioContextOptions :

---
dictionary AudioContextOptions {
             (AudioContextLatencyCategory or double) latencyHint = "interactive";
             float                                   sampleRate;
};

sampleRate of type float
Set the sampleRate to this value for the AudioContext that will be created. The supported values are the same as the sample rates for an AudioBuffer. A NotSupportedError exception must be thrown if the specified sample rate is not supported.

If sampleRate is not specified, the preferred sample rate of the output device for this AudioContext is used.

An implementation must support sample rates in at least the range 8000 to 96000.
---
var context = new AudioContext();
alert(context.sampleRate);

The context.sampleRate differs from my system information.
I set the recoring sample rate 44100 but context.sampleRate is 96000.

I think it is a bug, am I right?
Hello. This is an automatic reply. I have no access to email until
Saturday night 20:00 (GMT+2).
The audio context adopts the sample rate of the output device rather than the input device.
Hello. This is an automatic reply. I have no access to email until
Saturday night 20:00 (GMT+2).
Thank you Mr. jbnesl.
You are my hero! :)

Hello. This is an automatic reply. I have no access to email until
Saturday night 20:00 (GMT+2).

Sign in to add a comment