JSPM

fetch-as-audio-buffer

0.10.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q22035F
  • License MIT

util function to fetch audio buffer

Package Exports

  • fetch-as-audio-buffer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fetch-as-audio-buffer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fetchAsAudioBuffer

NPM Version License

util function to fetch audio buffer

Installation

npm install fetch-as-audio-buffer

downloads:

API

  • fetchAsAudioBuffer(audioContext, url): any
    • audioContext: AudioContext
    • url: string url of target file - returns Promise<AudioBuffer>
    • url: string[] case of multiple targets - returns Promise<AudioBuffer[]>

Usage

var audioContext = new AudioContext();

fetchAsAudioBuffer(audioContext, "amen.wav").then(function(result) {
  console.log(result); // result is AudioBuffer
});
var audioContext = new AudioContext();

fetchAsAudioBuffer(audioContext, [ "bd.wav", "sd.wav", "hh.wav" ]).then(function(result) {
  console.log(result); // result is Array of AudioBuffer
});

License

MIT