melonJS
    Preparing search index...

    Function mute

    • Mute or unmute the specified sound. Playback continues; only the audible output is suppressed.

      Parameters

      • sound_name: string

        Audio clip name (case-sensitive).

      • Optionalid: number

        Sound instance ID. When omitted, all sounds in the group are affected.

      • shouldMute: boolean = true

        true to mute, false to unmute. Defaults to true.

      Returns void

      // mute the background music
      me.audio.mute("awesome_music");