CSharpSynth.Sequencer.MidiSequencer.SwitchSection C# (CSharp) Method

SwitchSection() public method

public SwitchSection ( int trackIndex, MidiTrack section, float offset ) : void
trackIndex int
section CSharpSynth.Midi.MidiTrack
offset float
return void
        public void SwitchSection(int trackIndex, MidiTrack.Section section, float offset)
        {
            if ((trackIndex != trackNumber) || (trackSection != section)) {
                trackNumber = trackIndex;
                eventIndex = section.EventIndex;
                sampleTime = (int)section.StartSample;
                trackSection = section;

                SeekToFirstNote();
                SilentProcess(SynthHelper.getSampleFromTime(synth.SampleRate, (_MidiFile.MicroSecondsPerQuarterNote / 1000000f) * offset * 4));
                synth.NoteOffAll(false);
            }
        }