views:

448

answers:

4

Hi, I am trying to increase the volume of my Audio Output using the speakHere example from Apple. The volume is already set to max with :

// set the volume of the queue XThrowIfError (AudioQueueSetParameter(mQueue, kAudioQueueParam_Volume, 1.0), "set queue volume");

However, the output is directed to the ear-piece speaker, which is not as loud as the bottom-left-speaker on the iPhone. An example of this can be seen nicely in the 'Voice Memos' that comes with the iPhone. They provide a 'Speaker-Button' that toggles between the two speakers. Does anybody have an idea how that is done? What do I need to output my Audio to the bottom speaker? Any tips, hints, answers will be much appreciated. Thanks you in advance Al

+1  A: 

Take a look at AudioSessionSetProperty, the kAudioSessionProperty_OverrideCategoryDefaultToSpeaker property in particular.

Neil Mix
A: 

Thanks for the reply. That gets me over the first hurdle, which is my main problem. The description says 'Available in iPhone OS 3.1 and later'. Any idea how directing the sound to the speaker was achieved before OS 3.1 ?

Alan A.
A: 

look at the kAudioSessionProperty_OverrideAudioRoute property

anon
A: 

can anybody tell me how to disable external volume control slider from our application. i want to control the sound only from my application and disable the external one.

Sumit