private void ReadInstruments(Stream stream) { Instruments.Clear(); for (uint i = 0; i < numberOfInstruments; i++) { XM_Instrument inst = new XM_Instrument(); Instruments.Add(inst); inst.ReadFromStream(stream, ref i); } }
protected override void ResetChannelInstrument(ModuleMixerChannel mc) { XM_Instrument instrument = (XM_Instrument)module.Instruments[(int)mc.instrumentIndex - 1]; mc.instrumentPosition = 2; mc.instrumentLength = instrument.sample.length; mc.loopType = instrument.sample.loopType; mc.instrumentLoopStart = instrument.sample.loopStart; mc.instrumentLoopEnd = instrument.sample.loopEnd; mc.currentFineTune = instrument.sample.finetune; mc.vibratoCount = 0; mc.tremoloCount = 0; mc.arpeggioCount = 0; }