示例#1
0
 //--Public Methods
 public VoiceManager(int voiceCount)
 {
     stealingMethod = VoiceStealEnum.Quietest;
     polyphony      = voiceCount;
     //initialize voice containers
     voicePool = new Voice[voiceCount];
     VoiceNode[] nodes = new VoiceNode[voiceCount];
     for (int x = 0; x < voicePool.Length; x++)
     {
         voicePool[x] = new Voice();
         nodes[x]     = new VoiceNode();
     }
     vnodes = new Stack <VoiceNode>(nodes);
     //free voice list
     freeVoices   = new LinkedList <Voice>(voicePool);
     activeVoices = new LinkedList <Voice>();
     registry     = new VoiceNode[Synthesizer.DefaultChannelCount, Synthesizer.DefaultKeyCount];
 }
 //--Public Methods
 public VoiceManager(int voiceCount)
 {
     stealingMethod = VoiceStealEnum.Quietest;
     polyphony = voiceCount;
     //initialize voice containers
     voicePool = new Voice[voiceCount];
     VoiceNode[] nodes = new VoiceNode[voiceCount];
     for (int x = 0; x < voicePool.Length; x++)
     {
         voicePool[x] = new Voice();
         nodes[x] = new VoiceNode();
     }
     vnodes = new Stack<VoiceNode>(nodes);
     //free voice list
     freeVoices = new LinkedList<Voice>(voicePool);
     activeVoices = new LinkedList<Voice>();
     registry = new VoiceNode[Synthesizer.DefaultChannelCount, Synthesizer.DefaultKeyCount];
 }