NNS_SndArcStrmPrepareEx

C Specification

#include <nnsys/snd.h>
BOOL NNS_SndArcStrmPrepareEx(
NNSSndStrmHandle* handle,
int playerNo,
int playerPrio,
int strmNo,
u32 offset );

Arguments

handle Pointer to a stream handle
playerNo The Player number
playerPrio This is the player priority A greater value denotes a higher priority
strmNo This is the stream number
offset This is the starting offset position It is in msec

Return Values

If playback succeeds TRUE. If it fails FALSE.

Description

This function specifies the player number and player priority, and carries out preparations for the stream.

The sound archive stream library must be initialized in advance using the NNS_SndArcStrmInit function.

The stream handle handle needs to be initialized only once in advance using the NNS_SndStrmHandleInit function. Calling this function releases the stream already attached to the stream handle (this does not mean it is stopped). If playback succeeds, the stream is attached to the stream handle.

If -1 is specified for the player number playerNo and player priority playerPrio, the parameters specified with the sound data are used.

If a non-zero value is set for the start offset position offset, it is possible to play from the middle of the stream data.

You can check whether the preparations are completed with the NNS_SndArcStrmIsPrepared function. Call the NNS_SndArcStrmStartPrepared function to play back the streams for which preparations are completed.

The channels used for stream playback are set aside in this function. If the channels set aside were being used by sequence playback, the sound being produced is automatically stopped. To control the timing of the channel set aside the NNS_SndArcStrmAllocChannel function needs to be called in advance.

If the stream data is in stereo, channel 0 is output from the left and channel 1 from the right. These settings can be changed with the NNS_SndArcStrmSetChannelPan function.

Playback failure may be the result of the following factors:

  • The stream number is invalid.
  • The priority is lower than the stream already being played.
  • The priority is lower than the stream already being played.

See Also

NNS_SndArcStrmInit, NNS_SndStrmHandleInit, NNS_SndArcStrmIsPrepared, NNS_SndArcStrmStartPrepared, NNS_SndArcStrmAllocChannel, NNS_SndArcStrmSetChannelPan

Revision History

11/26/2004 Extracted from description of NNS_SndArcStrmPrepare function.


CONFIDENTIAL