1

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,625
  • 20
  • 101
  • 140

2 Answers2

0

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

rgrocha
  • 1,461
  • 10
  • 19
0

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

Neal
  • 379
  • 4
  • 9