NNS_SndArcLoadWaveArc

Syntax

#include <nnsys/snd.h>
BOOL NNS_SndArcLoadWaveArc( int waveArcNo, NNSSndHeapHandle heap );

Arguments

waveArcNo Waveform archive number.
heap Sound heap handle.

Return Values

Returns a value that indicates whether the load was successful.

Description

Loads the waveform archive to the heap.

The memory necessary for loading is automatically allocated from the sound heap heap with 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 want 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.

You can load waveforms individually by setting the s option in the waveform archive section of the sound archive definition file. However, when the s option is set, this function loads only the waveform archive header and the waveform table. (The waveform(s) themselves are loaded by use along with the NNS_SndArcLoadBank function and similar functions.) Conversely, if you do not set the s option, this function loads the entire waveform archive.

Waveform tables loaded when the s option is set are used by the NITRO-Composer component to manage which waveforms have finished loading. The size of a waveform table increases by 32 bytes per every 4 waveforms, in direct proportion to the number of waveforms in the waveform archive.

See Also

NNS_SndHeapAlloc
NNS_SndArcGetFileAddress
NNS_SndArcSetFileAddress
NNS_SndArcSetLoadBlockSize
NNS_SndArcInit
NNS_SndArcInitOnMemory

Revision History

2009/06/29 Added description of individual (segmented) loading.
2007/10/17 Added description of the NNS_SndArcSetLoadBlockSize function.
2004/06/01 Initial version.


CONFIDENTIAL