# NNS_SndPlayerSetTrackMute*

## Syntax

      #include <nnsys/snd.h>

      void NNS_SndPlayerSetTrackMute(
              NNSSndHandle* handle,
              u16 trackBitMask,
              BOOL flag );
      void NNS_SndPlayerSetTrackMuteEx(
              NNSSndHandle* handle,
              u16 trackBitMask,
              NNSSndSeqMute mute );

## Arguments

`handle` | The sound handle pointer.
`trackBitMask` | This is the track bit mask.
`flag` | Flag to indicate whether to mute or cancel. When `TRUE`, mute is applied; when `FALSE`, mute is canceled.
`mute` | Represents the mute setting.

## Return Values

None.

## Description

Mutes and stops a sequence track.

The sequence tracks bound to the sound handle `handle` can be muted and/or stopped. This function does not perform any action if the sound handle is invalid.

Use `trackBitMask` to specify the tracks to be set. The tracks are identified from the lower bit in sequence: Track 0, Track 1, Track 2 .... All tracks that have enabled bits will have their mute settings changed. For example, to change the mute settings of Track 2 and Track 5, use (1 << 2) | (1 << 5); i.e., 0x0024.

When you mute using the `NNS_SndPlayerSetTrackMute` function, the sound that is playing stops immediately. To not stop the sound immediately, use the `NNS_SndPlayerSetTrackMuteEx` function.

Select from the following values for the mute setting `mute`:

Table. NNSSndSeqMute

Label | Description
--- | ---
NNS_SND_SEQ_MUTE_OFF | Releases mute.
NNS_SND_SEQ_MUTE_NO_STOP | Mutes without stopping the currently playing sound.
NNS_SND_SEQ_MUTE_RELEASE | Mutes after releasing the sound that is playing.
NNS_SND_SEQ_MUTE_STOP | Immediately stops the currently playing sound and mutes.

### Note

The `NNS_SndPlayerSetTrackMuteEx` function can only be used with SDK version 3.1 and later.

When you mute tracks using the `NNS_SndPlayerSetTrackMute` function or when `NNS_SND_SEQ_MUTE_STOP` is specified by the `NNS_SndPlayerSetTrackMuteEx` function, all playing sounds are forcibly stopped and no subsequent sounds will be played. If mute is canceled, sound will be produced but not begin to play immediately. Note that sound will begin to play on the next note-on.

If a mute setting is already configured in the sequence data, the value that is set later will be valid.

## See Also

None.

## Revision History

2006/03/20 Added the NNS_SndPlayerSetTrackMuteEx function
2004/06/01 Revised the text to state that the Sound Handle binds to the sequence
2004/04/01 Initial version

CONFIDENTIAL