/// <summary> /// SMF データを格納したストリームを読み込み、シーケンスを開始します。 /// </summary> /// <param name="stream">読み込まれるストリーム。</param> public void Load(Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } if (!stream.CanRead) { throw new NotSupportedException(); } SmfContainer container = new SmfContainer(stream); HandleConverter hc = new HandleConverter(this.preset); hc.Convert(container); if (this.sequencer != null) { this.sequencer.Stop(); } this.sequencer = new Sequencer(hc.Output, hc.Info); this.sequencer.Start(); this.sequencer.OnTrackEvent += this.OnTrackEvent; }
/// <summary> /// SMF データを格納したストリームを読み込み、シーケンスを開始します。 /// </summary> /// <param name="stream">読み込まれるストリーム。</param> public void Load(Stream stream) { if (stream == null) throw new ArgumentNullException("stream"); if (!stream.CanRead) throw new NotSupportedException(); SmfContainer container = new SmfContainer(stream); HandleConverter hc = new HandleConverter(this.preset); hc.Convert(container); if (this.sequencer != null) this.sequencer.Stop(); this.sequencer = new Sequencer(hc.Output, hc.Info); this.sequencer.Start(); this.sequencer.OnTrackEvent += this.OnTrackEvent; }