Just a newbie question...

Blitz3D Forums/Blitz3D Beginners Area/Just a newbie question...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

edit: Mojokool actually mentioned the PlayMusic command, I missed that...

I think you need the PlayMusic command (as opposed to using LoadSound and PlaySound). In the help files under PlayMusic it says:

You can't 'preload' the audio like you can a sound sample via the LoadSound command.


This means you have to load the music the moment you want to use it. Using PlayMusic you specify where the file is to be found and it will load it *and* start playing. You can assign the music to a channel to change things like the volume, and to switch it off again:

Global music

; start playing music:
music = PlayMusic("music.mp3")

; change the volume to 0.9 (as an example):
ChannelVolume(music,0.9)

; stop playing music:
StopChannel(music)