
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
audio-context
Advanced tools
Creates a WebAudio context singleton with the given options. Returns null
if not supported.
var audioCtx = require('audio-context')()
You can also create an OfflineAudioContext
in case you would like to process (faster) without any rendering.
var offlineContext = require('audio-context')({offline: true})
ctx = createContext(options|sampleRate)
Returns a singleton audio context for the given sampleRate
.
The options:
sampleRate
- if specified, will set the context sampleRate.latencyHint
- if specified, will control latency. One of 'balanced'
, 'playback'
, 'interaction'
(default) or number.offline
- if specified, will create OfflineAudioContext.length
- if specified, will set number of frames for offline context.channels
- if specified, will set number of channels for offline context.{...contextAttributes}
any other options for the context.Handles vendor prefixing for audio contexts. Returns null
if we are not in a browser, or if the context is not available, or if there was an error creating the context.
# Run tests in tape-run's default browser
npm test
# Run in a specified browser.
# See https://github.com/juliangruber/tape-run#runopts for options
npm test -- --browser firefox
MIT
FAQs
A WebAudio Context singleton
The npm package audio-context receives a total of 5,981 weekly downloads. As such, audio-context popularity was classified as popular.
We found that audio-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.