Skip to content

Instantly share code, notes, and snippets.

@mohayonao
Last active November 17, 2016 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohayonao/89fd55526cef5a60364e860695a4bf75 to your computer and use it in GitHub Desktop.
Save mohayonao/89fd55526cef5a60364e860695a4bf75 to your computer and use it in GitHub Desktop.
  1. copy files

  2. build & start server

$ npm install
$ npm run build
$ python -m http.server
  1. test in your browser's dev tools
$ open http://127.0.0.1:8000
<script src="bundle.js"></script>
"use strict";
require("promise-decode-audio-data");
var AudioContext = global.AudioContext || global.webkitAudioContext;
var audioContext = new AudioContext();
var audioData = new Uint32Array(1024).buffer;
console.log(audioContext.decodeAudioData(audioData));
// → Promise
{
"name": "@mohayonao/pdad-test",
"version": "0.0.0",
"devDependencies": {
"browserify": "^13.1.1",
"promise-decode-audio-data": "^0.3.0"
},
"scripts": {
"build": "browserify index.js -o bundle.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment