mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
making sure that the type is never set to custom+partialCount
This commit is contained in:
parent
6c748e3e9d
commit
c20f703c40
1 changed files with 3 additions and 2 deletions
|
@ -62,7 +62,7 @@ function(Tone){
|
|||
* @type {Number}
|
||||
* @private
|
||||
*/
|
||||
this._partialCount = Tone.defaultArg(options.partialCount, 0);
|
||||
this._partialCount = options.partialCount;
|
||||
|
||||
/**
|
||||
* the phase of the oscillator
|
||||
|
@ -80,7 +80,7 @@ function(Tone){
|
|||
this._type = options.type;
|
||||
|
||||
//setup
|
||||
if (options.partialCount){
|
||||
if (options.partialCount && options.type !== Tone.Oscillator.Type.Custom){
|
||||
this.type = options.type + options.partialCount.toString();
|
||||
} else {
|
||||
this.type = options.type;
|
||||
|
@ -101,6 +101,7 @@ function(Tone){
|
|||
"detune" : 0,
|
||||
"phase" : 0,
|
||||
"partials" : [],
|
||||
"partialCount" : 0
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue