Esempio n. 1
0
        protected void MergeAudioEvents()
        {
            int count = LoaderSettings.EventPlayerThreads;

            MIDINoteEvents = new MIDIEvent[count][];
            Parallel.For(0, count, new ParallelOptions()
            {
                CancellationToken = cancel
            }, i =>
            {
                try
                {
                    MIDINoteEvents[i] = TimedMerger <MIDIEvent> .MergeMany(parsers.Select(p => new SkipIterator <MIDIEvent>(p.NoteEvents, i, count)).ToArray(), e =>
                    {
                        return(e.time);
                    }).ToArray();
                }
                catch (OperationCanceledException)
                {
                }
            });
        }
Esempio n. 2
0
        protected void MergeControlEvents()
        {
            int count = LoaderSettings.EventPlayerThreads;

            MIDIControlEvents = TimedMerger <MIDIEvent> .MergeMany(parsers.Select(p => p.ControlEvents).ToArray(), e => e.time).ToArray();
        }