Beispiel #1
0
        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;
        }
Beispiel #2
0
        /// <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;
        }