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.

Newcomers DBPro Corner / Cannot get Play Music command to work.

Author
Message
QuantumPixel
14
Years of Service
User Offline
Joined: 14th Feb 2010
Location: Alabama, USA
Posted: 4th Feb 2013 22:27
I cannot get DBPro to play an MP3. (Any MP3.) My code is as simple as it gets:


Every time I run this code I get the error: "Runtime Error 3502 - Could not load music at line x"
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 5th Feb 2013 00:38
Is it in the same directory as your compiled application? Is the .mp3 called 'test.mp3' You may need to move/copy the file to your project's folder or specify the directory:

Load Music "c:\your\media\test.mp3", 1
or
Load Music "media\test.mp3", 1

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
QuantumPixel
14
Years of Service
User Offline
Joined: 14th Feb 2010
Location: Alabama, USA
Posted: 5th Feb 2013 02:23
Yes, the file is in the appropriate folder.

I even tried coding it like so, just in case:


If the file was not being found, this would result in the program running fine, only with no music. However, this results in the exact same error message being directed at the Load Music line.

I did some experimenting and found that it works fine with WAV* files, just not any of my MP3s. Obviously this is some kind of formatting issue, but I can't find any information as to what kind of MP3 format DBPro might actually support.

*I don't want to have to use WAV files for my in-game music due to their poor sound quality.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 5th Feb 2013 05:58
Maybe experiment with load sound and play sound? I'm not sure. Searching on the forum brought up similar issues. Maybe the mp3 is encoded oddly? This website was mentioned a couple times on the other threads. You could try converting it to .wav and back to .mp3? You could also use .ogg files. WAV files sound much better than .mp3s but the file sizes are huuuuge since there is no compression.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 5th Feb 2013 12:40 Edited at: 5th Feb 2013 12:42
Have you tried ".\test.mp3" ?

QuantumPixel
14
Years of Service
User Offline
Joined: 14th Feb 2010
Location: Alabama, USA
Posted: 10th Feb 2013 05:35
Thank you, zeroSlave. Your advice was quite helpful. The program that you linked proved very useful in converting my MP3s into WAVs. I was even able to add compression to the WAV files that brought their size down below what they were as MP3s without significant loss in sound quality. It is much appreciated!

Login to post a reply

Server time is: 2024-11-23 18:10:05
Your offset time is: 2024-11-23 18:10:05