我正在使用andEngine 开发游戏。我想为这个游戏添加背景声音。我尝试实现声音,但没有播放声音。请帮帮我。这是我的代码:
onLoadEngine()
return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE,
new FillResolutionPolicy(), this.mCamera).setNeedsSound(true))
onLoadResources()
Sound bgSound;
SoundFactory.setAssetBasePath("gfx/");
this.bgSound = SoundFactory.createSoundFromAsset(this.mEngine.getSoundManager(), this, "bg.mid");
bgSound.setLoopCount(-1);
bgSound.play();