views:

28

answers:

1

Hi,

I am unable to adjust volume of sounds in my app when testing on new iPhone 4 (tried two devices) it works on an iPad and my colleague just told me that on 3Gs with iOS 4 the volume goes down when trying to increase ... that's something doesn't make sense at all.

I am using AudioToolbox/AudioServices.h to just play short sounds in a game that are Wav format. It definitely looks like that the software version affects that a lot but I have no idea how to fix it ... anyone? :)

Thanks,

Ondrej

+1  A: 

Hi I was having the same problem, I found out it's because I hadn't set the Session category:

NSError *setCategoryError = nil; 
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &setCategoryError]; 

if (setCategoryError) { //handle error } 

you can find out more about sessions Here: http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Cookbook/Cookbook.html#//apple_ref/doc/uid/TP40007875-CH6-SW6

Leg10n