Miles Sound System SDK 7.2a

AIL_compress_DLS

The function AIL_compress_DLS compresses a DLS file with either IMA ADPCM compression or with an ASI encoder specified by the compress_ext parameter.

S32 AIL_compress_DLS(
  void const * dls,
  char const * compression_ext,
  void * *mls,
  U32 *mlssize,
  AILLENGTHYCB callback
);

In Parameters

dls
points to a file image containing the DLS file.
compression_ext
is a filename whose extension determines what ASI codec to use. For example, to use the MPEG Layer 3 encoder, you would specify ".mp3". Future encoders will have their own extensions. To use IMA ADPCM compression only, pass in NULL for this parameter.
callback
should be set to the address of the callback function which is invoked at several stages of the compression process. See AILLENGTHYCB for a description of this callback.

Out Parameters

mls
should be the address of a "void *" pointer that will return with the pointer to the new compressed DLS file image. This parameter can be NULL if you don't need it.
mlssize
should be the address of an unsigned 32-bit integer that will return with the size of the new compressed DLS file image. 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

You must free the pointer returned in mls with AIL_mem_free_lock.

Depending on the number of wave samples to compress, this function can take up to 30 seconds to return.

Compressing a DLS file using the MPEG Layer 3 encoder takes a long time.

You must decompress DLS files with the AIL_extract_DLS function before passing them to AIL_DLS_load_file.

Compressed DLS file usually have an ".MLS" extension.


Group: Utility Services
Related Functions: AILLENGTHYCB, AIL_DLS_load_file, AIL_extract_DLS, AIL_find_DLS, AIL_mem_free_lock, AIL_merge_DLS_with_XMI
Related Basic Types: S32, U32, char const *, void *, void const *

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