Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3456704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:46:11+00:00 2026-05-18T09:46:11+00:00

I am so confused… SoundPool.play(int soundID, float leftVolume, float rightVolume , int priority, int

  • 0

I am so confused…

SoundPool.play(int soundID, float leftVolume, float rightVolume, int priority, int loop, float rate)

volume here is from 0.0 to 1.0

Tutorials I’ve seen recommend to calculate stream volume as:

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);

which makes sense.

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.

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:

  1. set global media volume in
    phone settings to max
  2. set volume in activity using soundpool.play to 0.5 – play sound
  3. set volume in soundpool.play to 1 – play sound, it will be two times louder

Can somebody explain why it works like that? is volume passed to SoundPool.play method really a multiplier to the global volume?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:46:11+00:00Added an answer on May 18, 2026 at 9:46 am

    Yes, the volume parameters are with respect to the global volume. If you want to play a sound at the current volume setting just pass “1” as the volume.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Confused with the problem here. New to C, as made obvious by the below
Very confused here, trying out the yuicompressor on a simple javascript file. My js
iam confused. Iam trying to read an Value from an oracle table, format: timestamp(6).
confused by the encoding stuff. are Encoding.UTF8.GetBytes and Convert.FromBase64String are the same?
confused how to achieve this maybe with FULL OUTER or a UNION. I want
Confused by java compilation process OK i know this: We write java source code,
Duplicate: Confused about hashes How can SHA encryption create unique 40 character hash for
Being confused again after reading about this anti-pattern and the many concerns about it
Im confused, I passed a matrix datatype into the this.graphics.beginBitmapFill(); and i get Implicit
Really confused - Guess it has to do with a single character placement at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.