Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Can't seem to load music

Author
Message
Reiko
16
Years of Service
User Offline
Joined: 4th Feb 2010
Location: UK
Posted: 19th May 2010 12:57
As the subject says, I just can't load music, of any type. I get a "could not load music at line x" every time.


This does not work, and "file.mp3" is in the media folder (but I just made this for a test anyway.)

None of the examples that have music in them work. They all throw the same error, so I know it's not me doing it wrong in my script.

Does anyone have any ideas? It's really a showstopping bug.

Thanks.

So there! D=<
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th May 2010 13:15
Best to upload your MP3, or one that doesn't work at least - a test one if you have one handy.

I've never had issues with MP3's before, but it could certainly be a compatibility issue. I use Wavosaurus or something like that to make MP3's, maybe your MP3 encoding is using an unsupported feature. Uploading a test mp3 will let us test it alongside one that definitely works.

The only other thing is that it could be your PC - MP3 playback is handled through DirectX, maybe worth reinstalling DirectX to see if that helps.


Health, Ammo, and bacon and eggs!
Reiko
16
Years of Service
User Offline
Joined: 4th Feb 2010
Location: UK
Posted: 19th May 2010 13:23
The MP3's I'm using are the ones in the DBPro examples. So just in the help documents.

Also, I've been testing with the music file from the GhostTrain app, since I know that used to work. I'll attach that.

If I just run a pre-compiled exe, the music loads fine. However when I re-compile it from DBPro! it throws an error on runtime. I'll give re-installing DirectX a try anyway though.

So there! D=<
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 19th May 2010 13:30
Try using full path to your music to test this out.

If there is still error, is not your fault.If there isn`t, then you are doing something wrong.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Reiko
16
Years of Service
User Offline
Joined: 4th Feb 2010
Location: UK
Posted: 19th May 2010 13:43
I'm sorry, I should have mentioned that. While browsing around I saw that said somewhere else, and I did grab and use the absolute path, resulting in the same error.

I've now tried a reinstall of DirectX and DBPro, both without success.

Don't know if it will be helpful at all, but I've included a DxDiag, can't think of much else to do. =P

So there! D=<
Reiko
16
Years of Service
User Offline
Joined: 4th Feb 2010
Location: UK
Posted: 19th May 2010 14:02
Aha! I've managed to fix it.

I sent the same exe to a friend, and it worked fine for him, logical conclusion that it was something to do with my directX, but a reinstall didn't do anything.

Not sure how but somewhere in the past I had managed to disable my DirectShow MP3 filter, replacing it with a third party one. (Probably for stability in a game from eons ago.)

Anyone else having this issue, here's how I managed to fix it;
http://www.softella.com/dsfm/index.en.htm
Download and run this app, on the second tab hit the "Restore standard DirectX codecs" button. You'll hear a Windows stop sound when it's done. Close the app, and it should all be working again.

So all in all, it was my fault. =P

So there! D=<
czzplnm
15
Years of Service
User Offline
Joined: 10th Aug 2010
Location:
Posted: 23rd Aug 2010 07:24
I'm attempting your fix as well, but no luck. Just seem to not be able to do that, no matter what.

"The eternal mystery of the world is its comprehensibility."
-Albert Einstein
Join this vent for Dark Programming - lead.typefrag.com:16020
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 23rd Aug 2010 20:18
No problems here with loading music. You are sure that your direct X is actually the right version? Theres a link off the DB pro compatibility boards for the correct latest version.
Also you do not need to use an absolute path to your media in DB. That is very limiting in that you need to put the files precisely at that location on every system it is run. The exe will assume you are in your root directory which is your exe's directory whenever you make a DB program. All you need to do is to load your media directly from there or specify a new folder or folders.
A simple way is set dir "media" for instance on any media you add in through the editor. If you need to change there are various ways, but I tend to stick with set dir ".." to go back a directory, you could probably use "cd\" as well. Rinse and repeat for new ones.
Or just use load image "media\a.bmp" etc.
Possibly you only used that to test your problem, but believe me DB always works from root directory, so that couldn't be a problem, unless you physically move only the exe to another folder.

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2026-07-23 14:56:02
Your offset time is: 2026-07-23 14:56:02