Skip to main content

Music

Music controls the single global CD-XA stream. Import a PCM WAV with Streaming Music (CD-XA) enabled, then use its filename stem.

MethodReturnsDescription
Music.Play(name[, loop])booleanStarts a registered stream; loop defaults to true.
Music.Stop()booleanStops the active stream.
Music.SetVolume(volume)booleanSets volume from 0 (silent) to 1 (full level); can be called before Play.
Music.IsPlaying()booleanReads stream state.
function Start(gameObjectId)
Music.SetVolume(0.75)
if not Music.Play("title_theme", true) then
Log.Print("title_theme is unavailable")
end
end

In Play Mode, the same filename stem selects the WAV preview. No AudioSource component is required. Music follows the Game view's pause and mute controls.

A build can register up to eight streaming tracks and play one at a time. Music uses the CD-ROM path rather than resident VAG sample memory. Scene loading can temporarily suspend the stream. See Audio Import.

The PS1 stream clock follows elapsed VBlanks, independently of render FPS. After a scene-data load, resuming the suspended track restarts it from the beginning; seamless or sample-accurate continuation is not provided.