Reputation: 3709
I am working on iphone app. I want to tap a button for playing an .wav file. then I want to check if the volume of iphone is mute then make it louder and play the .wav file. Is it possible programmatically?
Upvotes: 0
Views: 748
Reputation: 768
You can try to check the volume by,
[[MPMusicPlayerController iPodMusicPlayer] volume];
set the volume by,
[[MPMusicPlayerController iPodMusicPlayer] setVolume: value];
Upvotes: 1
Reputation: 958
I think you can do this.... http://iphoneincubator.com/blog/tutorial/how-to-play-audio-with-the-iphone-sdk
this link for audio play..
when you are able to play sound,then for mute the sound just write soundname.volume = 0;
and when you want to up the volume then just write soundname.volume=5
Upvotes: 1
Reputation: 3075
I believe not. iOS only allows the "user" to change settings like these.
Even if it was possible, I would highly doubt if it would pass the App Store terms of publication.
Upvotes: 1