different music on game

Previous topic - Next topic

mentalthink

Hi, I´ve got a doubt about how put some musics in my game.

I´ve got some stage maked whit subs, whit only one music the game is playable, but when I try to change te theme of music the game turns very slow.

Thanks.

Ps:I do some like this

while true
SUB 1
musica()

SUb 2
musica2()
wend

function musica1:
if ismusicplaying()=0 then playmusic "musica 1"
endfunction
function musica2:
if ismusicplaying()=0 then playmusic "musica 2"
endfunction

MrTAToad

There is an initial pause whilst music is started.  However, whilst that code is inefficient, there shouldn't be any noticable different once a new piece of music is started.