public Voice GetFreeVoice() { if (FreeVoices.Length > 0) { var voice = FreeVoices.First.Value; FreeVoices.RemoveFirst(); return(voice); } return(StealQuietestVoice()); }
public Voice GetFreeVoice() { if (FreeVoices.Length > 0) { var voice = FreeVoices.First.Value; FreeVoices.RemoveFirst(); return(voice); } switch (StealingMethod) { case VoiceStealingMethod.Oldest: return(StealOldest()); case VoiceStealingMethod.Quietest: return(StealQuietestVoice()); default: return(null); } }