Miles Sound System SDK 7.2a

AIL_find_DLS

The function AIL_find_DLS returns pointers and sizes to the DLS and XMIDI chunks inside a merged XMIDI file image.

S32 AIL_find_DLS(
  void const * data,
  U32 size,
  void * *XMI,
  U32 *XMI_size,
  void * *dls,
  U32 *dlssize
);

In Parameters

data
points to a file image containing an XMIDI file with embedded DLS data.
size
is the length of the data.

Out Parameters

XMI
should be the address of a " void* " pointer that will return with the pointer to the XMIDI chunk. This parameter can be NULL if you don't need it.
XMI_size
should be the address of an unsigned 32-bit integer that will return with the size of the XMIDI chunk. This parameter can be NULL if you don't need it.
dls
should be the address of a " void* " pointer that will return with the pointer to the DLS or MLS chunk. This parameter can be NULL if you don't need it.
dlssize
should be the address of an unsigned 32-bit integer that will return with the size of the DLS or MLS chunk. This parameter can be NULL if you don't need it.

Returns

1, if the call was successful, or 0 if the call failed.

Discussion

This function returns pointers inside the original data pointer - do NOT call AIL_mem_free_lock on these pointers. If you want to obtain copies of the XMIDI and DLS chunks inside the original file image, you can use the AIL_extract_DLS function.

This function does not decompress the DLS data in the merged XMIDI file - if you need to decompress the data, use AIL_extract_DLS.

A good way to decide whether to use AIL_extract_DLS or AIL_find_DLS is whether the DLS data is compressed. If the data is uncompressed, then you can pass it directly to AIL_DLS_load_memory, so AIL_find_DLS can be used. If the data is compressed, then you must decompress it with AIL_extract_DLS before handing it off to AIL_DLS_load_memory. You can determine whether the data is compressed or not with the AIL_file_type function.


Group: Utility Services
Related Functions: AIL_DLS_load_file, AIL_DLS_load_memory, AIL_compress_DLS, AIL_extract_DLS, AIL_file_type, AIL_filter_DLS_with_XMI, AIL_find_DLS, AIL_mem_free_lock, AIL_merge_DLS_with_XMI
Related Basic Types: S32, U32, void *, void const *

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.