Miles Sound System SDK 7.2a

AIL_compress_ASI

The function AIL_compress_ASI compresses a digital sound with an ASI encoder capable of writing the file type described by the filename_ext parameter.

S32 AIL_compress_ASI(
  AILSOUNDINFO const *info,
  char const * filename_ext,
  void * *outdata,
  U32 *outsize,
  AILLENGTHYCB callback
);

In Parameters

info
describes the sound data to compress.
filename_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". The Miles voice chat codecs use extensions of ".v29", ".v24", and ".v12". Future encoders will have their own extensions.
callback
should be set to the address of the callback function of the AILLENGTHYCB type. Pass 0 if callbacks are not necessary.

Out Parameters

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

Note that the only MSS ASI encoder currently available is the MSS MPEG Layer 3 encoder, and it must be purchased separately (in addition, it isn't redistributable). We plan to have more audio ASI encoders soon (including a Bink audio codec).

Multichannel (> 2 channels) data is not supported.

You must free the pointer returned in outdata with AIL_mem_free_lock.

You can use the AIL_WAV_info function to automatically fill the input info structure.

Compressing with the MSS MPEG Layer 3 encoder is very slow!


Group: Utility Services
Related Functions: AILLENGTHYCB, AIL_WAV_info, AIL_compress_ADPCM, AIL_decompress_ASI, AIL_mem_free_lock
Related Basic Types: S32, U32, char const *, void *
Related Structures: AILSOUNDINFO

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