问题
My game works fine in the simulator and on an actual iPod Touch device, but when I run it on my iPad 2 device the sound doesn't play and the sound effects don't play.
Here is my code to start up the background music. Keep in mind this works on the simulator AND on an actual iPod Touch device:
SoundEffect.MasterVolume = 1.0f;
SoundEffect soundMusic = (new ContentManager(screenManager.Game.Services, "Content")).Load<SoundEffect>("Music");
SoundEffectInstance soundMusicInstance = soundMusic.CreateInstance();
soundMusicInstance.IsLooped = true;
soundMusicInstance.Play();
Why doesn't this work on iPad?
来源:https://stackoverflow.com/questions/11963098/sound-not-working-in-ios-for-ipad