0

According to the docs the MediaPlayer setVolume(float, float) needs to be given a logarithmically scaled value:

Note that the passed volume values are raw scalars. UI controls should be scaled logarithmically.

I was wondering how to do this? Should I just give a log(volume) to it?

Peterdk
  • 15,137
  • 19
  • 99
  • 140

2 Answers2

0

Just give values between 0.0f (mute) and 1.0f (full volume)

rgrocha
  • 1,486
  • 10
  • 19
0

For Android MediaPlayer.setVolume, searching the web seems to show 0.0f for no sound, 1.0f for full sound.

Neal
  • 380
  • 4
  • 9