New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

audio-decode

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-decode

Decode audio data in node or browser

Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
237K
-37.32%
Maintainers
2
Weekly downloads
 
Created
Source

audio-decode Build Status unstable Greenkeeper badge

Convert mp3/wav audio data to AudioBuffer.

npm install audio-decode

const decode = require('audio-decode');
const buffer = require('audio-lena/mp3');

//as a callback
decode(buffer, (err, audioBuffer) => {});

//as a promise
decode(buffer).then(audioBuffer => {}, err => {});

API

let promise = decode(source, options?, callback?)

Decode source, based on options and fire callback when done, or resolve a promise if no callback passed. Source type can be: ArrayBuffer, ArrayBufferView, Buffer, Blob, File or data-uri string.

Possible options may include context property for web-audio-api context. If not defined, the audio-context is used.

Supported formats

Shipped by default:

To enable additional format, install it as a dependency npm install --save flac.js and require once require('flac.js').

Additional formats available:

Credits

License

MIT © audiojs.

Keywords

audiojs

FAQs

Package last updated on 17 Jun 2017

Did you know?

Socket

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.

Install

Related posts