// Pre-load music and sound effects
Simpleaudioengine: sharedengine ()-> preloadbackgroundmusic (ccfileutils: sharedfileutils ()-> fullpathfromrelativefile ("fashu1.wav", "fashu1.wav "));
Simpleaudioengine: sharedengine ()-> preloadeffect (ccfileutils: sharedfileutils ()-> fullpathfromrelativefile ("fashu1.wav", "fashu1.wav "));
// Set the default volume
Simpleaudioengine: sharedengine ()-> setjavastsvolume (0.5 );
Simpleaudioengine: sharedengine ()-> setbackgroundmusicvolume (0.5 );
// Play background music
Simpleaudioengine: sharedengine ()-> playbackgroundmusic (ccfileutils: sharedfileutils ()-> fullpathfromrelativefile ("fashu1.wav", "fashu1.wav "));
// Stop background music
Simpleaudioengine: sharedengine ()-> stopbackgroundmusic ();
// Pause background music
Simpleaudioengine: sharedengine ()-> pausebackgroundmusic ();
// Continue playing background music
Simpleaudioengine: sharedengine ()-> resumebackgroundmusic ();
// Background music
Simpleaudioengine: sharedengine ()-> rewindbackgroundmusic ();
// Whether the background music is playing
If (simpleaudioengine: sharedengine ()-> isbackgroundmusicplaying ())
{Cclog ("playing ");}
Else cclog ("not playing ");
// Play the sound and obtain the sound ID
Simpleaudioengine: sharedengine ()-> playeffect (ccfileutils: sharedfileutils ()-> fullpathfromrelativefile ("fashu1.wav", "fashu1.wav "));
// Replay sound effects
Simpleaudioengine: sharedengine ()-> playeffect (STD: string (ccfileutils: sharedfileutils ()-> fullpathfromrelativepath (music_file). c_str (), true );
// Stop Playing Sound Effects
Simpleaudioengine: sharedengine ()-> stopeffect (partition tid );
// Release sound effects
Simpleaudioengine: sharedengine ()-> unloadeffect (STD: string (ccfileutils: sharedfileutils ()-> fullpathfromrelativepath (music_file). c_str ());
// Increase the background music volume
Simpleaudioengine: sharedengine ()-> setbackgroundmusicvolume (simpleaudioengine: sharedengine ()-> getbackgroundmusicvolume () + 0.1f );
// Reduce the background music volume
Simpleaudioengine: sharedengine ()-> setbackgroundmusicvolume (simpleaudioengine: sharedengine ()-> getbackgroundmusicvolume ()-0.1f );
// Increase the background sound volume
Simpleaudioengine: sharedengine ()-> setjavastsvolume (simpleaudioengine: sharedengine ()-> getjavastsvolume () + 0.1f );
// Reduce the background sound volume
Simpleaudioengine: sharedengine ()-> setjavastsvolume (simpleaudioengine: sharedengine ()-> getjavastsvolume ()-0.1f );
// Pause the sound effect
Simpleaudioengine: sharedengine ()-> pauseeffect (partition tid );
// Resume the sound effect
Simpleaudioengine: sharedengine ()-> resumeeffect (partition tid );