示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="music"></param>
 public static void Load(Music music)
 {
     if (music == null)
     {
         throw new ArgumentNullException("music");
     }
     music.Handle = Mixer.LoadMusic(music.FileName);
     CurrentMusic = music;
 }
示例#2
0
 /// <summary>
 /// Loads a music sample from a byte array.
 /// </summary>
 /// <param name="data">data buffer</param>
 public Music(byte[] data)
 {
     Mixer.OpenInternal();
     this.Handle = Mixer.LoadMusic(data);
 }
示例#3
0
 /// <summary>
 /// Loads a music sample from a file.
 /// </summary>
 /// <param name="fileName">The file path to load from.</param>
 public Music(string fileName)
 {
     Mixer.OpenInternal();
     this.Handle = Mixer.LoadMusic(fileName);
     m_FileName  = fileName;
 }