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

## MusStartSongFromMarker()

Start a song from a marker.

Syntax

    musHandle MusStartSongFromMarker(void *addr, int marker);

Arguments

- addr is the address of binary song data

- marker is the marker number to start from

Explanation
Start the binary song located at the specified address from the specified marker. 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, this function will use it and then clear the override.

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

The marker value must be in the range 0 to 255 and be located in the specified song. If the marker is not found in the specified song, this function may not return and will have unpredictable results.

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 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
MusSetMarkerCallback()
MusStartSong()
MusHandleAsk()
MusHandleSetFreqOffset()
MusHandleSetPan()
MusHandleSetVolume()
MusHandleStop()
MusSetMasterVolume()
MusAsk()
MusStop()

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