Play an audio with a higher frequency
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- audio-video-rtc, web-dev
Research direction
The issue provides only a JavaScript snippet using AudioContext.createOscillator and oscillator_node.frequency.value; start by checking the Web Audio API specification and relevant browser tests for the nominal frequency range. A useful resolution would state whether frequencies above 23 kHz are supported and identify the corresponding test or documentation change, but no repository file is named.
Written by the indexing model from the issue text.
Description
We are using createOscillator in AudioContext to play audio with a specified frequency. If we are using a frequency of more than 23kHz, we are getting an error as below
Oscillator.frequency.value 23000 outside nominal range [-22050, 22050]; value will be clamped.
Can you please let us know how can we play an audio with a higher frequency
we use the below code to generate the audio.
const ctx = new AudioContext()
const oscillator_node = ctx.createOscillator();
oscillator_node.type="sine";
// frequency in khz
const frequency = 10;
oscillator_node.frequency.value = frequency * 1000;
oscillator_node.connect(ctx.destination);
oscillator_node.start();
setTimeout(() => {
oscillator_node.stop()
}, 5000);
Thanks in advance
- Dominant language
- HTML
- Stars
- 6.2k
- Forks
- 3.9k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 586
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from web-platform-tests/wpt
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
web-platform-tests/wpt#62635 ·
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
web-platform-tests/wpt#62623 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
web-platform-tests/wpt#62525 ·
-
wdspec: bidi_session fixture swallows setup failures, reporting them as bare StopAsyncIteration Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
web-platform-tests/wpt#62500 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
web-platform-tests/wpt#62415 · 2 comments ·
All issues in web-platform-tests/wpt
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
sugarlabs/musicblocks#8826 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
home-assistant/core#182762 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
clawsweeper:bulk-filed clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100