mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
use 'this.now()' instead of Tone.now()
This commit is contained in:
parent
f6bd45036e
commit
e3d9cd136a
1 changed files with 4 additions and 4 deletions
|
@ -294,7 +294,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/source
|
||||||
set : function(loopStart){
|
set : function(loopStart){
|
||||||
this._loopStart = loopStart;
|
this._loopStart = loopStart;
|
||||||
//get the current source
|
//get the current source
|
||||||
var event = this._state.get(Tone.now());
|
var event = this._state.get(this.now());
|
||||||
if (event && event.source){
|
if (event && event.source){
|
||||||
event.source.loopStart = this.toSeconds(loopStart);
|
event.source.loopStart = this.toSeconds(loopStart);
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/source
|
||||||
set : function(loopEnd){
|
set : function(loopEnd){
|
||||||
this._loopEnd = loopEnd;
|
this._loopEnd = loopEnd;
|
||||||
//get the current source
|
//get the current source
|
||||||
var event = this._state.get(Tone.now());
|
var event = this._state.get(this.now());
|
||||||
if (event && event.source){
|
if (event && event.source){
|
||||||
event.source.loopEnd = this.toSeconds(loopEnd);
|
event.source.loopEnd = this.toSeconds(loopEnd);
|
||||||
}
|
}
|
||||||
|
@ -349,7 +349,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/source
|
||||||
set : function(loop){
|
set : function(loop){
|
||||||
this._loop = loop;
|
this._loop = loop;
|
||||||
//get the current source
|
//get the current source
|
||||||
var event = this._state.get(Tone.now());
|
var event = this._state.get(this.now());
|
||||||
if (event && event.source){
|
if (event && event.source){
|
||||||
event.source.loop = loop;
|
event.source.loop = loop;
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/source
|
||||||
set : function(rate){
|
set : function(rate){
|
||||||
this._playbackRate = rate;
|
this._playbackRate = rate;
|
||||||
//get the current source
|
//get the current source
|
||||||
var event = this._state.get(Tone.now());
|
var event = this._state.get(this.now());
|
||||||
if (event && event.source){
|
if (event && event.source){
|
||||||
event.source.playbackRate.value = rate;
|
event.source.playbackRate.value = rate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue