title: stream volume in SoundPool vs volume in AudioManager
body: <p>I am so confused...</p>
  
  <p>SoundPool.play(int soundID, <strong>float leftVolume, float rightVolume</strong>, int priority, int loop, float rate)</p>
  
  <p>volume here is from 0.0 to 1.0</p>
  
  <p>Tutorials I've seen recommend to calculate stream volume as:</p>
  
  <pre><code>AudioManager mgr = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
  
  int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
  
  streamVolume = streamVolume / AudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
  
  mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, 0, 1f);
  </code></pre>
  
  <p>which makes sense. </p>
  
  <p>I would assume that this volume would override global media volume set by user in phone and I can change volume for my app independently by changing stream volume in soundPool.</p>
  
  <p>But in reality it works like multiplier - if I set 0.5 for volume in soundpool, the actual volume will be always half of the global one. Very easy to reproduce:</p>
  
  <ol>
  <li>set global media volume in
  phone settings to max</li>
  <li>set volume in activity using soundpool.play to 0.5 - play sound</li>
  <li>set volume in soundpool.play to 1 - play sound, it will be two times louder</li>
  </ol>
  
  <p>Can somebody explain why it works like that? is volume passed to SoundPool.play method really a multiplier to the global volume?</p>