を作成しましAVAudioPlayer
たが、ユーザーがボタンをクリックしたときにミュートしたいと思います。
ここで私が試したこと:
player.volume = 1.0 //when first time i initiate my player
- (IBAction)speakerOnOff:(id)sender {
if (player.volume == 1.0) {
[player setVolume: 0.0];
NSLog(@"1volume is:%f",player.volume);
}else if (player.volume == 0.0) {
[player setVolume: 1.0];
NSLog(@"2volume is:%f",player.volume);
}
}