MusHandleWaveAddress()

Syntax

unsigned short *MusHandleWaveAddress(musHandle handle);

Arguments

handle
the sound handle

Description

It gets the address of the wave lookup table being used for the sound channels associated with the specified sound handle. The wave lookup table is used by the library to convert internal sample numbers in songs and sound effect banks to sample bank indexes.

The handle must be a sound handle returned by MusStartSong(), MusStartSongFromMarker(), MusStartEffect(), or MusStartEffect2(). If a handle of zero is supplied, this function will always return zero.

Return Value

Wave table lookup address.

Example

unsigned short *DuplicateLookUp(musHandle handle)
{
  int i, count;
  unsigned short *src, *dest;

  count = MusHandleWaveCount(handle);
  dest = MemMalloc(sizeof(unsigned short)*count);
  src = MusHandleWaveAddress(handle);

  for (i=0; i<count; i++)
    dest[i]=src[i];

  return (dest);
}

See Also

MusHandleWaveCount()