<B>unsigned int </B><B></B><I>mode</I><B>,</B><BR>
<B>const int *</B><I>samplelist</I><B>,</B><BR>
<B>int </B><B></B><I>samplelistnum</I><BR>
<B>);</B><BR>
<H3>Parameters</H3>
<TABLE>
<TRVALIGN=top><TD><I>name_or_data</I></TD>
<TD>Name of song or pointer to data containing song to load (if loading from memory and not file). On PlayStation 2 data must be 16 byte aligned if loading from memory.<BR>
</TD><TRVALIGN=top><TD><I>offset</I></TD>
<TD>Optional. 0 by default. If > 0, this value is used to specify an offset in a file, so fmod will seek before opening.<BR>
</TD><TRVALIGN=top><TD><I>length</I></TD>
<TD>Optional. 0 by default. If > 0, this value is used to specify the length of a memory block when using FSOUND_LOADMEMORY, or it is the length of a file or file segment if the offset parameter is used. On PlayStation 2 this must be 16 byte aligned for memory loading.<BR>
</TD><TRVALIGN=top><TD><I>mode</I></TD>
<TD>Mode for opening song. With module files, only FSOUND_LOADMEMORY, FSOUND_NONBLOCKING, FSOUND_LOOP_NORMAL, or FSOUND_LOOP_OFF are supported. For FSB files, FSOUND_2D, FSOUND_HW3D, FSOUND_FORCEMONO also work.<BR>
</TD><TRVALIGN=top><TD><I>samplelist</I></TD>
<TD>Optional. Pointer to array of sample indicies to load. Leave as NULL if you want all samples to be loaded (default behaviour). See Remarks for more on this.<BR>
</TD><TRVALIGN=top><TD><I>samplelistnum</I></TD>
<TD>Optional. Number of entries in the samplelist array.<BR>
</TD></TABLE>
<H3>Return Value</H3>
On success, a FMUSIC_MODULE handle is returned.<BR>
On failure, NULL is returned.<BR>
<H3>Remarks</H3>
Loading a song from a memory handle is dangerous in one respect, if the data is corrupted or truncated, then FMUSIC could crash internally trying to load it.<BR>
On PlayStation 2 the data and length pointer must be 16 byte aligned for DMA purposes.<BR>
The samplelist and samplelistnum parameters are useful for limiting the amount of data fmod loads. This feature is for the FSB format only. It is especially useful if you have a bank of sounds and want to randomize the loading a bit by telling which sounds to load with random values, and consequently which not to load.<BR>
On PlayStation 2, samplelistnum has a limit of 1536 entries.<BR>
___________________<BR>
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation2, GameCube<BR>