NNS_SndArcPlayerStartSeq*

Syntax

#include <nnsys/snd.h>
BOOL NNS_SndArcPlayerStartSeq( NNSSndHandle* handle, int seqNo );
BOOL NNS_SndArcPlayerStartSeqEx( NNSSndHandle* handle, int playerNo, int bankNo, int playerPrio, int seqNo );

Arguments

handle Sound handle pointer.
seqNo Sequence number.
playerNo Player number.
bankNo Bank number.
playerPrio Player priority. The value is in the range of 0 to 127. A greater value indicates higher priority.

Return Values

If playback succeeds, TRUE. If it fails, FALSE.

Description

Plays the sequence.

With NNS_SndArcPlayerStartSeq, the player number and other parameters are read from the sound data. With NNS_SndArcPlayerStartSeqEx, the program can specify the player number, bank number, and player priority. If any of these parameters (playerNo, bankNo, and playerPrio) is set to -1, it is configured using the parameters specified in the sound data.

The sound archive must first be initialized with NNS_SndArcInit or NNS_SndArcInitOnMemory.

The sound handle (handle) must be initialized once, in advance, with the NNS_SndHandleInit function. When this function is called, the sequence already bound to the sound handle will be unbound (but not stopped). If playback is successful, the sequence will be bound to the sound handle.

This function calls NNS_SndArcGetFileAddress to determine if the required sound data is loaded into memory. If the data is not there, it attempts to load it into the player heap. If there is no player heap or the player heap is not large enough, playback fails.

The function internally calls NNS_SndPlayerSetSeqNo so that you can later use NNS_SndPlayerStopSeqBySeqNo to stop playback by sequence number.

If you want to reset the channel priority and volume settings specified by the sound data, call the NNS_SndPlayerSetChannelPriority or NNS_SndPlayerSetInitialVolume function immediately after starting the sequence.

Playback failure may be the result of the following factors.

  • Sequence archive number is invalid
  • Priority is lower than the sequence already playing
  • Data is not in memory or cannot be loaded

See Also

NNS_SndArcInit
NNS_SndArcInitOnMemory
NNS_SndHandleInit
NNS_SndArcGetFileAddress
NNS_SndPlayerStopSeqBySeqNo
NNS_SndPlayerSetSeqNo
NNS_SndPlayerSetChannelPriority
NNS_SndPlayerSetInitialVolume

Revision History

2004/11/30 Corrected the return value type.
2004/06/01 Extended NNS_SndArcPlayerStartSeqWithPlayerNo and changed it to NNS_SndArcPlayerStartSeqEx. Explanation of player heap was added.
2004/04/19 Manuals for NNS_SndArcPlayerStartSeq and NNS_SndArcPlayerStartSeqWithPlayerNo were combined.
2004/04/01 Initial version.


CONFIDENTIAL