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 989571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:48:52+00:00 2026-05-16T05:48:52+00:00

I need your help. How should I proceed to change the sound volume in

  • 0

I need your help. How should I proceed to change the sound volume in my app. I don’t want to use a volume slider. Instead I have an UIImageView which is a volume knob, in which I rotate clockwise to increase, and anti clockwise to decrease the sound volume. The rotation is just an animation and I’ve already done that part.

I need your help and advice on how to increase/decrease the volume. Thanks

  • 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-16T05:48:52+00:00Added an answer on May 16, 2026 at 5:48 am

    I would be careful calling setValue on an MPVolumeView since it probably won’t do anything other than update the appearance of the slider, but not the actual device volume level. You would instead have to call _commitVolumeChange which is private API and will likely get your app rejected.

    A short answer to how to control volume: It really depends on what you’re trying to control the volume of.

    If you want a “controls every sound within the app” sort of control then you can use an MPVolumeView but you cannot change it’s value programmatically. You would then only be able to change the volume by either moving the slider with a touch or using the volume buttons on the side of the device. The best thing to do is create a global object that stores the volume level which any of your objects can read before they play their sound.

    If it’s an AVAudioPlayer object, you’d create the object and use [theAudioPlayerObject setVolume: someFloat]; where someFloat is a value between 0.0 and 1.0.

    If it’s a SystemSound object, you can’t control volume.

    If it’s an AudioQueue you’d change it via AudioQueueSetParameter

    Like I said.. it all depends on how you are playing the sound.

    Update based on comment

    For that particular example, you would set the volume like this:

    Add to the AudioStreamer.h file

    - (void)setVolume:(float)Level;
    

    Add to the AudioStreamer.m file

    - (void)setVolume:(float)Level
    {
    
        OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);
    
        if (errorMsg) {
            NSLog(@"AudioQueueSetParameter returned %d when setting the volume.", errorMsg);
        }
    
    }
    

    Add to the view controller for where the volume knob will be (this goes in the .m file.. i just did this as a couple UIButtons real quick, you’ll have to do your own) and set up an IBAction to change the volume for a given value (you can pass in 0.0 thru 1.0 as a float)

    - (IBAction)volumeUp:(id)sender
    {
    
        [streamer setVolume:1.0];
    
    }
    
    - (IBAction)volumeDown:(id)sender
    {
    
        [streamer setVolume:0.0];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't have much experience in frameworks or languages, so i need your help.
I need your help. Say I have a code inside a for statement similar
I need your help again. This should be a function for php. I've got
today i need your help to get an specific sql select query. i have
Hello i have the this problem, i need your help to figure out what
I really need your help since I have a frustrating problem. I'm downloading data
I have a scenario and I really need your help. I have a Silverlight
I am bit new with Rails (3.) and need your help to use renamed
I tried a lot, now I need your help. What I want to do
i need your help.I need to insert data dynamically but insertion should be from

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.