static SoundM() { Current = new SoundM(); Sound.Initialize(); string[] files = System.IO.Directory.GetFiles(@"Sounds", "*", System.IO.SearchOption.TopDirectoryOnly); foreach(string path in files) { string name = path.Split('\\')[1]; name = name.Split('.')[0]; Sound s = new Sound(); s.ReadSoundFile(path); Current.Album.Add(name, s); } App.Current.Exit += Current_Exit; }
/// <summary> /// このサウンドのクローンコピーを作ります /// </summary> /// <returns></returns> public Sound Clone() { Sound s = new Sound(); s.source = source; s.Gain = Gain; s.Position = Position; s.Velocity = Velocity; return s; }