开发者

Problem sound volume when testing on a device

I play a very short and basic mp3 sound effect in my application. It sounds great on the AVD emulator but doesn't sound at all on my external device. I use the Android plugin for Eclipse on Mac OSX and my external device is a HTC Desire.

I am using this code :

MediaPlayer media_player = Me开发者_高级运维diaPlayer.create(Play.this, R.raw.my_sound);
media_player.start();
media_player.setVolume(1, 1);

which is very simple and should work.

I also tried to use a SoundPool. Again, it sounds as it should on the AVD emulator but again no sound on my mobile device is set.

Before somebody asks, I of course set my device sound volume to maximum and no silent mode or anything like that.

Any idea?

Thanks in advance!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜