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 Discussion / Runtime error: music could not be loaded.

Author
Message
Garfield rules
19
Years of Service
User Offline
Joined: 12th Jun 2005
Location:
Posted: 20th Sep 2007 22:45
Hi...

I'm using the 2007 version of DBC with enhancements. My OS is Vista (mistake #1, I know). I tried to load a midi file with the "load music" command and got "Runtime error: music could not be loaded." I double-checked the path to the file and it was entered correctly. I even tried to load it from the CLI and got the same problem. It's not the midi file that's the problem, because Windows Media Player will play it. I've tried more than one midi in DarkBASIC and none of them load. What am I doing wrong?
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Sep 2007 23:51
I have the exact same problem with my old PC, and that certainly doesn't have Vista on it lol

Sadly I could never work out what the problem was
Anyone out there smarter than me?

In programming, nothing exists
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 21st Sep 2007 18:44
Before I say anything lse, could you compile the program into an EXE and see if the music can be played then?

Our home is our world, our life, home is our world...
Homeworld: The ladder
Garfield rules
19
Years of Service
User Offline
Joined: 12th Jun 2005
Location:
Posted: 23rd Sep 2007 23:19
I found another thread that solved the problem. It's this one.

This topic says that you can circumvent the problem by directly accessing the Windows API, there was even an example function included. After doing a little more research on MSDN I wrote my own function that did that. I did have to look at the example in the aforementioned thread more than once to finally get it right though, so I'll give the guy who made it credit even though I didn't copy and paste it.

Login to post a reply

Server time is: 2025-05-31 19:24:04
Your offset time is: 2025-05-31 19:24:04