public bool RemoveOscillator(InstrumentOscillatorInfo osc) { if (osc == null) { return(false); } return(mOscillators.Remove(osc)); }
public bool AddOscillator(InstrumentOscillatorInfo osc) { if (osc == null) { return(false); } if (mOscillators.Contains(osc)) { return(false); } mOscillators.Add(osc); return(true); }
public bool IsEquivalentTo(InstrumentOscillatorInfo oscillator) { if (oscillator == null) { return(false); } if ((mTarget != oscillator.mTarget) || (mRate != oscillator.mRate) || (mWidth != oscillator.mWidth) || (mBase != oscillator.mBase)) { return(false); } if (mStartTable.Count != oscillator.mStartTable.Count) { return(false); } for (var i = 0; i < mStartTable.Count; ++i) { if (mStartTable[i] != oscillator.mStartTable[i]) { return(false); } } if (mReleaseTable.Count != oscillator.mReleaseTable.Count) { return(false); } for (var i = 0; i < mReleaseTable.Count; ++i) { if (mReleaseTable[i] != oscillator.mReleaseTable[i]) { return(false); } } return(true); }