Finding music?
Blitz3D Forums/Blitz3D Programming/Finding music?
| ||
I've been trying to figure this out for a while now, but I can't seem to think of a way of doing it. Basically, I want my game to be able to open and play user-added music. Eg. you put the file "Music.wav" in the directory "C:\my game\music\", and then when you run "my game.exe", "Music.wav" is playing in the background. Only problem is, without forcing the user to actually rename their favourite track to "Music.wav", blitz won't be able to open it (because it won't know what the music file is called). Can anyone help me with this? |
| ||
Is this going to be just one file? thats allowed in that directory? You will be abe to see whats going on |
| ||
Well, multiple files would be good but one file would be ok as well. |
| ||
i made an edit... see that code in this case, i made it look only for .mp3 |
| ||
Thanks, but doesn't seem to be working, probagbly because I'm being stupid (as usual). If I put this in any old directory, and put a .mp3 file in the same directory, will the program recognise it? |
| ||
Say you have a the program here c:\mygame\project.exe and you have music here c:\mygame\music and your music files are there all you need is "music/" and as the path$ that shoud do it |
| ||
Ok, thanks :) |
| ||
There is also a command (I think PlayCDMusic)??? that will play a cd track, so the user could put in their favourite cd |