private static bool _IsValidSubItem(AudioSubItem item) { switch (item.SubItemType) { case AudioSubItemType.Clip: return(item.Clip != null); case AudioSubItemType.Item: return(item.ItemModeAudioID != null && item.ItemModeAudioID.Length > 0); } return(false); }
/// <summary> /// Copy constructor /// </summary> public AudioSubItem(AudioSubItem orig, AudioItem item) { SubItemType = orig.SubItemType; if (SubItemType == AudioSubItemType.Clip) { Clip = orig.Clip; } else if (SubItemType == AudioSubItemType.Item) { ItemModeAudioID = orig.ItemModeAudioID; } Probability = orig.Probability; DisableOtherSubitems = orig.DisableOtherSubitems; Clip = orig.Clip; Volume = orig.Volume; PitchShift = orig.PitchShift; Pan2D = orig.Pan2D; Delay = orig.Delay; RandomPitch = orig.RandomPitch; RandomVolume = orig.RandomVolume; RandomDelay = orig.RandomDelay; ClipStopTime = orig.ClipStopTime; ClipStartTime = orig.ClipStartTime; FadeIn = orig.FadeIn; FadeOut = orig.FadeOut; RandomStartPosition = orig.RandomStartPosition; for (int i = 0; i < orig.individualSettings.Count; ++i) { individualSettings.Add(orig.individualSettings[i]); } this.item = item; }