N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
Mus - Mus Library
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential




Mus Library Reference


MusSetMarkerCallback()

Set the marker callback function.

Syntax

  void MusSetMarkerCallback(void *callback);

Arguments

  • callback is the callback function address

Explanation
Sets the callback function for a synchronous marker. This function specifies the address of the function to inform when a marker prepared in a function by the programmer appears during playback of a song. The callback argument takes on the LIBMUScb_marker definition set with typedef in libmus.h

  typedef void(*LIBMUScb_marker)  (musHandle, int);

The parameters passed to the callback function are the handle of the song that generated the callback and the number of synchronous markers found.

Note: The callback function is called from the library thread, so it is best to process it quickly.

Return Value
None

Example

  void GameSongCallback(musHandle handle, int marker)
  {
    if (handle==gamesong_handle)
      gamesong_position = marker;
  }

  void GameSongStart(void)
  {
    gamesong_position = 0;
    gamesong_handle = MusStartSongFromMarker(&song_data, 1);
    MusSetMarkerCallback(GameSongCallback);
  }

See Also
MusStartSongFromMarker()


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1999