Skip to content

Commit

Permalink
noise playback rates
Browse files Browse the repository at this point in the history
  • Loading branch information
lukephills committed May 20, 2015
1 parent 406fda6 commit 16214f9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Tone/source/Noise.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,26 @@ define(["Tone/core/Tone", "Tone/source/Source"], function(Tone){
}
});

/**
* The playback speed. 1 is normal speed.
* Added playback speed option for noises
*
* @memberOf Tone.Noise#
* @type {number}
* @name playbackRate
*/
Object.defineProperty(Tone.Noise.prototype, "playbackRate", {
get : function(){
return this._playbackRate;
},
set : function(rate){
this._playbackRate = rate;
if (this._source) {
this._source.playbackRate.value = rate;
}
}
});

/**
* internal start method
*
Expand Down

0 comments on commit 16214f9

Please sign in to comment.