Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

arraybuffer-to-audiobuffer

miguelmota534MIT0.0.5

Convert ArrayBuffer to AudioBuffer

audio, array, arraybuffer, audiobuffer, converter

readme

arraybuffer-to-audiobuffer

Convert ArrayBuffer to AudioBuffer

Install

npm install arraybuffer-to-audiobuffer

Usage

Pass ArrayBuffer as first argument.

Takes an optional AudioContext as second argument, otherwise it'll create a new AudioContext.

Returns Promise which resolves to AudioBuffer.

const arrayBufferToAudioBuffer = require('arraybuffer-to-audiobuffer')

arrayBufferToAudioBuffer(arrayBuffer, audioContext)
.then(audioBuffer => {
  // do something with AudioBuffer
})

License

MIT

changelog

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

[0.0.3] - 2015-11-25

Changed

  • Use only one AudioContext instance instead of creating a new one each time.