Separate names with a comma.
Discussion in 'iOS Programming' started by bbrosemer, Feb 11, 2009.
Does anyone know a way to link a UIPickerView with Volume Control of the device?
It's not possible with the official APIs. The only way to control the actual device volume is MPVolumeView.
Ugh .... so is there a way to at least control my app's volume rather then the hardware itself... I know or I think you can while a sound is playing but can I change it pre a sound playing.
Yeah, you can do that. Depends how you're playing your sounds but there should be a method for setting the 'gain'. Use that to control volume.
Instead of that hassle what i decided to do was make 30 copies of the file with each varying sound levels... luckily the file was small so I load them into memory when they get called rather then as the app is loading ... So it works fine with no lag ...
So, you have a volume control, via UIPickerView, with 30 distinct volume settings?
Sorta I took a short sound .. which I wanted to vary the volume and whenever a different row in the picker is selected it chooses the sound that correlates to the volume i wanted aka I made the 30 sounds have different DB levels. Aka it is more of a pseudo way of doing volume control. Not how I wanted to do it but luckily since the sound file is small it works fine and without delay.