PlayMusic(), bug report + question

Archives Forums/Blitz3D Bug Reports/PlayMusic(), bug report + question

Paolo(Posted 2006) [#1]
Only in the PlayMusic() command, the extension of the file
name must be in lowercase, if not, the file is not loaded,

*.mp3 ->works
*.Mp3 or *.mP3 or *.MP3 -> it doesn't

Ok, and a question,
when you call the PlayMusic(), does anyone note a freezing for
an instant?, this doesn't happen to me but I think I heard that
it depends on the HardDrive speed or something, isn't it?

Thanks!
Paolo.


markcw(Posted 2006) [#2]
Yes, i can second that. Strange it doesn't matter if the actual file's extension name is uppercase, just the string in Blitz3d.

You can of course easily get around it by doing.
chnBackground=PlayMusic(Lower("yourname.WAV"))
There is an explanation (and solution) for the freeze/pause feature in the docs.

You can't 'preload' the audio like you can a sound sample via the LoadSound command. Every time you call the PlayMusic command, the file is reloaded and played. This means that if you use the command while some graphics are moving on-screen, you may get a slight pause when the hard drive seeks and grabs the music file. To avoid this, you might want to use the PlaySound/LoopSound commands instead.

i tried to reproduce this freezing feature but couldn't, even though i tried playing a 5 minute wave file. Maybe you need a lot of stuff going on in the scene, or maybe it only happens with certain filetypes?

Also, here is some quick test code i wrote as the PlayMusic example in the docs was only one line.