How to control the Volume?

Discussion in 'iOS Programming' started by nacho4d, Oct 27, 2008.

  1. nacho4d macrumors newbie

    Joined:
    Jul 13, 2008
    #1
    Hi everyone .
    I am writting an app and just realized that in first generation of iPod touch there is no control for Volume in the left side.
    So I have to implement the volume adjuster.

    Can you give me some ideas about what should I do?:confused:

    Since, I am very very new to coreAudio and I am hopping this can be accomplished without coreAudio.:confused:

    But if no, then coreAudio is what I have to study!

    Thanks in advance.:)
     
  2. developer.in macrumors newbie

    Joined:
    Nov 5, 2008
    #2
    Try the method AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, gain);
    gain is a float value giving the difference in the volume from current volume
     
  3. nacho4d thread starter macrumors newbie

    Joined:
    Jul 13, 2008
    #3
    Thank you very much developer.in:)
     
  4. Pring macrumors 6502

    Joined:
    Sep 17, 2003
    #4
    Also look into MPVolumeView. The 'gain' only lets you control your volume relative to the iPhone/iPod system volume whereas MPVolumeView lets you control the system volume.

    Or rather, it gives the user the option to change it. You cannot programatically alter the system volume, only allow the user to do it with MPVolumeView.
     
  5. msavarese macrumors newbie

    Joined:
    Oct 13, 2008
    #5
    AudioQueueSetParameter is what you are looking for if you are doing the audio queues which most everyone is. the problem with the gain though it is not a global variable so you have to set every sound you have to the gain level. I am using a value between 0.0 and 1.0.
     

Share This Page