1

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 = MediaPlayer.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!

thomaus
  • 6,170
  • 8
  • 45
  • 63
  • 1
    Are you sure you set the Media volume to max on your mobile and not just the ringer volume ? – Abhinav Manchanda Feb 03 '11 at 08:43
  • But there is still one thing which remains strange for me. To detect the bug, I made a test by using another game application, similar to mine, which has a similar sound effect and it was working fine when the Media volume was set to 0... Why is it so? – thomaus Feb 03 '11 at 09:19

0 Answers0