How to control the Volume?

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

  1. nacho4d macrumors newbie

    Jul 13, 2008
    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. macrumors newbie

    Nov 5, 2008
    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

    Jul 13, 2008
    Thank you very much
  4. Pring macrumors 6502

    Sep 17, 2003
    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

    Oct 13, 2008
    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