Najeebullah Shah
Najeebullah Shah

Reputation: 3709

Programmatically make the volume full from mute

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

Answers (3)

edie
edie

Reputation: 768

You can try to check the volume by,

[[MPMusicPlayerController iPodMusicPlayer] volume];

set the volume by,

[[MPMusicPlayerController iPodMusicPlayer] setVolume: value];

Upvotes: 1

Emon
Emon

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

Devraj
Devraj

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

Related Questions