In order to mute and unmute sound in Cocos2D iPhone, use the following code.

if ([[SimpleAudioEngine sharedEngine] mute]) {
            // This will unmute the sound
            [[SimpleAudioEngine sharedEngine] setMute:0];
else {
             //This will mute the sound
             [[SimpleAudioEngine sharedEngine] setMute:1];



One Comment

  1. Thomas August 25, 2011 at 3:45 pm

    Thanks, that was just what I needed


Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.