YosiFZ
YosiFZ

Reputation: 7900

SystemSoundID Volume

I am using :

SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID);
AudioServicesPlaySystemSound(soundID);

for playing sounds in my app.

I have an issue that when i press the volume buttons of the device in iPhone4 iPad it control the volume of the sounds, but in iPhone 3gs and iPod4 the volume buttons not control the app sound so the sounds always play in high volume.

Upvotes: 2

Views: 1083

Answers (1)

sagarkothari
sagarkothari

Reputation: 24810

There is a way to access volume within application.
MPVolumeView control is used for that. Import MediaPlayer.framework in your project. Try to add subview of MPVolumeView in your subview. If you got some trouble while implementing this, feel free to have a quick look for implementation.

Upvotes: 1

Related Questions