我的游戏在模拟器和实际的iPod Touch设备上运行良好,但是当我在iPad 2设备上运行时,声音无法播放且声音效果无法播放。
这是启动背景音乐的代码。请记住,这适用于模拟器和实际的iPod Touch设备:
SoundEffect.MasterVolume = 1.0f;
SoundEffect soundMusic = (new ContentManager(screenManager.Game.Services, "Content")).Load<SoundEffect>("Music");
SoundEffectInstance soundMusicInstance = soundMusic.CreateInstance();
soundMusicInstance.IsLooped = true;
soundMusicInstance.Play();
为什么这不适用于iPad?