PlayMusic problem/solution

Blitz3D Forums/Blitz3D Programming/PlayMusic problem/solution

John Blackledge(Posted 2003) [#1]
Arrgghh! 5 hours to trawl half my code just to find that the problem was not mine! And probably not Blitz's either.
Microsoft, don't you just love 'em?

This code WILL play music:
[CODE]
mfile$="WAV\MUSIC\DEMO.mp3"
chnMusic = PlayMusic(mfile$)
[/CODE]

This code will NOY play music, and returns 0 for chnMusic:
[CODE]
mfile$="WAV\MUSIC\DEMO.MP3"
chnMusic = PlayMusic(mfile$)
[/CODE]

Notice the difference?
If .MP3 is upper case (doesn't matter about the rest) then PlayMusic fails. All my music defs were held in an external file so it was a sod to find.

And please don't talk to me about lower case as a standard -- the Greeks invented upper case 2000 years ago to make things more legible, and everyone agreed, until UNIX and MS decided otherwise and we all had to conform. Bah!


jfk EO-11110(Posted 2003) [#2]
Unbelievable - but it's true. Must be lowercase!


Floyd(Posted 2003) [#3]
Filenames are case-sensitive in UNIX, but not Windows.

I can rename the file with *.MP3 or *.mp3 and it makes no difference.
PlayMusic will still play the file only by using the name *.mp3.

Media Player, e.g., doesn't care. I think FMOD is probably the culprit.

This is worthy of a Blitz bug report even if Windows is really to blame.


Hotcakes(Posted 2003) [#4]
This sounds like either an FMOD or Blitz problem. I think it's definately a bug worth reporting.


IPete2(Posted 2003) [#5]
John

Actually the Greeks - on this occasion - were wrong - have you ever tried to read an EULA which is all capitalised? It is very easy to lose your way, and it tires the eyes very quickly.

Uppercase nowadays is only really useful when you need to GET SOMEONE'S ATTENTION.

Also you'll find that UNIX (as mentioned above) hates spaces in filenames and upper/lowercase and other characters( I can't remember which ones now), but in the case of websites this too can be a nightmare if you're not aware of it.

Having said that, it is a complete 'git' that the lowercase/uppercase issue raises it's head where the file extension is not accepted one way but is the other!!!!!

I sympathise, it would have been the last thing on my list to check probably too, with that in mind, thanks for the 'head's up ' on it!


Regards,

IPete2.


pjd(Posted 2003) [#6]
you read EULAs ?!?!?!?!?!?!?


AbbaRue(Posted 2003) [#7]
The strangest thing is, back in the DOS days everthing
was in uppercase, including the extentions.


IPete2(Posted 2003) [#8]
And yet still,

3DS Max exports .3ds file texture names as 8.3 format!!!!!

Stupid or what!?!?!?!

IPete2.


John Blackledge(Posted 2003) [#9]
IPete2 - I knew someone would disagree! But my memory is (long time since I was taught Greek) that upper case was used for the first character of names, which is what we do, and makes it much easier to read. Yeah well, as long as no-one else spent 5 hours needlessly debugging their code.


John Blackledge(Posted 2003) [#10]
Now if someone can just sort out my frames per sec tweening problem posted in 3D graphics....