/// <summary> /// Initializes a new instance of the <see cref="MMLPlayer"/> class. /// </summary> public MMLPlayer() { midiOut = new SoundGenerator(); for (int i = 0; i < channels.Length; i++) { channels[i] = new MMLChannel(i, GetNoteTime, ChangeTempo, midiOut.ChangeDuty, midiOut.Send, midiOut.ChangeMode, midiOut.EnableEnvelope); } ResetChannels(); }
/// <summary> /// Initializes a new instance of the <see cref="MMLPlayer"/> class. /// </summary> public MMLPlayer() { this.midiOut = new SoundGenerator(); for (int i = 0; i < channels.Length; i++) { channels[i] = new MMLChannel(i, this.GetNoteTime, this.ChangeTempo, this.midiOut.ChangeDuty, this.midiOut.Send, this.midiOut.ChangeMode, this.midiOut.EnableEnvelope); } this.ResetChannels(); }