Skip to content

Commit

Permalink
Close old AudioContexts
Browse files Browse the repository at this point in the history
  • Loading branch information
Costava committed Jun 22, 2016
1 parent 2ccc0dd commit febde11
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/conductor.js
Expand Up @@ -175,6 +175,7 @@ function Conductor(tuning, rhythm) {
* Remove all instruments and recreate AudioContext
*/
conductor.destroy = function() {
conductor.audioContext.close();
conductor.audioContext = new AudioContext();
conductor.instruments.length = 0;
conductor.masterVolume = conductor.audioContext.createGain();
Expand Down

0 comments on commit febde11

Please sign in to comment.