looping music?

Blitz3D Forums/Blitz3D Beginners Area/looping music?

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.

if you wanna change volume you'll need to investigate the channelvolume, channelpan etc commands.

Above code would then be the same except for the last bit:

global musicvolume#=0.75
channelbkmusic = PlaySound(bkmusic)
channelvolume channelbkmusic,musicvolume

As with most of the numbers in the audio channel commands, numbers need to be floating points, in order to give a range between 0 and 1 or -1 and 1

channelvolume works between 0 and 1 so ensure when you use a variable you globalise it as a float or it wonyt' fade at all.

channelpan channelbkmusic, -1 ; for left
channelpan channelbkmusic, 0 ; for centre
channelpan channelbkmusic, 1 ; for right

Channel allows for quite a lot of control - check these commands as follows:

StopChannel
PauseChannel
ResumeChannel
ChannelPitch
ChannelVolume
ChannelPan
ChannelPlaying


IPete2.