MusStartSong()

Syntax

musHandle MusStartSong(void *addr);

Arguments

addr
the address of binary song data

Description

It starts the binary song located at the specified address. The song data must be 32-bit aligned to allow for the pointers within the data to be accessed. The song started will use the default sample bank unless an override has been set with the MusPtrBankSetSingle() function. If a sample bank override has been specified then this function will use it and then clear the override.

The address of the song supplied in addr must be 32-bit aligned.

When this function is called for a new song, the song data is modified to reflect the song's base address (a list of offsets inside the song data are converted to pointers). Therefore, to move this song to a new address, the original data must be reacquired.

Return Value

Sound handle value.

Example

void PlayEntireSong(void *addr);
{
  unsigned long handle;

  handle = MusStartSong(addr);
  while (MusHandleAsk(handle))
    CallNormalProcessing();
}

See Also

MusHandleAsk(), MusHandleSetFreqOffset(), MusHandleSetPan(), MusHandleSetVolume(), MusHandleStop(), MusSetMasterVolume(), MusAsk(), MusStop()