Skip to content

Commit

Permalink
Update audio-context
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Apr 30, 2017
1 parent d8404d3 commit fcd53ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# audio-buffer-utils [![Build Status](https://travis-ci.org/audiojs/audio-buffer-utils.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-utils) [![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges)

[![Greenkeeper badge](https://badges.greenkeeper.io/audiojs/audio-buffer-utils.svg)](https://greenkeeper.io/)
# audio-buffer-utils [![Build Status](https://travis-ci.org/audiojs/audio-buffer-utils.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-utils) [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Greenkeeper badge](https://badges.greenkeeper.io/audiojs/audio-buffer-utils.svg)](https://greenkeeper.io/)

Utility functions for [_AudioBuffers_](https://github.com/audiojs/audio-buffer) in web-audio and node. Optimized for performance.

Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ module.exports = {
*/
function create (len, channels, rate, options) {
if (!options) options = {}
if (!options.context) options.context = context
return new AudioBuffer(channels, len, rate, options);
}

Expand Down Expand Up @@ -89,7 +88,7 @@ function shallow (buffer) {
//workaround for faster browser creation
//avoid extra checks & copying inside of AudioBuffer class
if (isBrowser) {
return context.createBuffer(buffer.numberOfChannels, buffer.length, buffer.sampleRate);
return context().createBuffer(buffer.numberOfChannels, buffer.length, buffer.sampleRate);
}

return create(buffer.length, buffer.numberOfChannels, buffer.sampleRate);
Expand Down

0 comments on commit fcd53ac

Please sign in to comment.