Miles Sound System SDK 7.2a

AIL_decompress_ASI

The function AIL_decompress_ASI decompresses a digital sound with the ASI decoder for the passed file extension and returns a standard PCM wave file image.

S32 AIL_decompress_ASI(
  void const * indata,
  U32 insize,
  char const * filename_ext,
  void * *wav,
  U32 *wavesize,
  AILLENGTHYCB callback
);

In Parameters

indata
contains the compressed input data.
insize
is the length of the compressed data in bytes.
filename_ext
is a filename whose extension determines what ASI decoder to use. For example, to use the MPEG Layer 3 decoder, you would specify ".mp3". The Miles voice chat codecs use extensions of ".v29", ".v24", and ".v12". Future decoders will have their own extensions.
callback
should be set to the address of the callback function which is invoked at several stages of the decompression process. See AIL_compress_ASI for a description of this callback.

Out Parameters

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

The output wave file image is a standard PCM wave file - you can write it directly to disk and any WAV file player will be able to play it.


Group: Utility Services
Related Functions: AILLENGTHYCB, AIL_compress_ASI, AIL_decompress_ADPCM, AIL_mem_free_lock
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.