MusHandleAsk()

Syntax

int MusHandleAsk(musHandle handle);

Arguments

handle
the sound handle

Description

It determines how many channels associated with the specified sound handle are currently being processed.

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

Number of channels currently being processed for the specified sound handle.

Example

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

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

void AlwaysTriggerSoundEffect(void)
{
  static unsigned long handle=0;

  if (MusHandleAsk(handle)==0)
  handle = MusStartEffect(RETRIGGER_SOUND);
}

See Also

MusAsk(), MusStartSong(), MusStartEffect(), MusStartEffect2()