0
此代碼工作正常運行在模擬器中運行時,當拋出UnauthorizedAccessException:MediaPlayer的手機
menuAudio = ScreenManager.Game.Content.Load<Song>("music\\MenuEntry");
// Kick off the music for the title screen
if (MediaPlayer.State != MediaState.Playing)
{
MediaPlayer.IsRepeating = true;
MediaPlayer.Play(menuAudio);
MediaPlayer.Volume = 1f;
}
但是當我運行它在手機上調試,我得到嘗試播放menuAudio首歌的時候一個UnauthorizedAccessException 。
任何援助將不勝感激。