예제 #1
0
파일: Song.cs 프로젝트: meds/ChicksnVixens
 public void HintBeginPreload()
 {
     if(sound == null)
     {
         sound = new SoundEffectInstance(device.Root);
         preloading.Add(this);
         sound.mediaElement.DownloadProgressChanged += (o, e) => CheckFinishedDownload();
         sound.mediaElement.MediaFailed += (o, e) => { downloadFailed = true; DonePreloading(); };
         sound.SetSourceForSong(uri);
         CheckFinishedDownload(); // just in case :)
     }
 }