NNS_SndArcLoadBank*

Syntax

#include <nnsys/snd.h>

#define NNS_SND_ARC_LOAD_BANK ( 1 << 1 )
#define NNS_SND_ARC_LOAD_WAVE ( 1 << 2 )
BOOL NNS_SndArcLoadBank( int bankNo, NNSSndHeapHandle heap );
BOOL NNS_SndArcLoadBankEx( int bankNo, u32 loadFlag, NNSSndHeapHandle heap );

Arguments

bankNo Bank number.
heap Sound heap handle.
loadFlag Flag that designates the data to be loaded.

Return Values

Returns a value that indicates whether or not the load was successful.

Description

Loads the bank data to the heap.

The NNS_SndArcLoadBank function loads the waveform archive associated with the bank data at the same time as it loads the bank data. The NNS_SndArcLoadBankEx function designates with loadFlag which of the two types of data to load. The argument loadFlag takes the following macros:

Table: Load Flags

Macros Value Description
NNS_SND_ARC_LOAD_BANK 1 << 1 Bank data.
NNS_SND_ARC_LOAD_WAVE 1 << 2 Waveform archive.

The memory necessary for loading is automatically allocated from the sound heap heap using the NNS_SndHeapAlloc function. If memory allocation fails, the process is interrupted and FALSE is returned.

The sound data already resident in memory is not loaded. Execution of the NNS_SndArcGetFileAddress function will determine if the sound data is resident in memory. In addition, the NNS_SndArcSetFileAddress function sets the address of the successfully loaded data.

If you wish to limit the size of data that can be loaded at one time, use the NNS_SndArcSetLoadBlockSize function to specify the load block size.

Note

Use this function only for sound archives initialized using the NNS_SndArcInit function. This function cannot be used with sound archives initialized using the NNS_SndArcInitOnMemory function.

See Also

NNS_SndHeapAlloc, NNS_SndArcGetFileAddress, NNS_SndArcSetFileAddress, NNS_SndArcSetLoadBlockSize, NNS_SndArcInit, NNS_SndArcInitOnMemory

Revision History

2007/10/17 Added descriptions related to the NNS_SndArcSetLoadBlockSize function.
2004/06/01 Initial version.


CONFIDENTIAL