GLBasic forum

Main forum => GLBasic - en => Topic started by: Gary on 2010-May-07

Title: MP3 playing problem
Post by: Gary on 2010-May-07
I am writing a simple PC program for a sports timer that I want to play a random MP3 file while a game is not being played.

I have everything working fine on my dev PC but when I try it on another PC whenever a call is made to play an mp3 the program just quits out. Also a couple of testers have found the same problem.

Is there any codec needed to be installed to allow GLBasic to play MP3s? I will upload the full source if it would help anyone in seeing where I am going wrong

The exe file can be downloaded at www.subbuteoplayersforum.com/fistftimerv2.exe

Cheers
Gary
Title: Re: MP3 playing problem
Post by: spudgunjake on 2010-May-07
Am have the very same problem, It plays fine at Home, but on my work PC It plays some MP3 fine and other it doesn't,

Didn't have this problem when the samples were in Wav format. I have also changed the sample rate, compatibility,
Its like the last sample has finished yet, or the buffer has old data in it.

please lets us know if you found a fix. It driving me mad.
Title: Re: MP3 playing problem
Post by: Hemlos on 2010-May-16
You might need to convert it to this format:
PCM 44khz 16 bit stereo
For sound dev on a windows machine, you should be able to use windows OEM sndrec.exe to do so.

Title: Re: MP3 playing problem
Post by: Kuron on 2010-May-16
I have never noticed problems with MP3s, but since you can't legally use MP3s in your games, I never bothered trying to play them.
Title: Re: MP3 playing problem
Post by: Moru on 2010-May-16
Well, you can use MP3 in your games in certain countries but noone seems to be certain what countries :-) It may be safer to use Ogg Vorbis but I haven't realy tried playing this in GLBasic and different platforms, anyone?
Title: Re: MP3 playing problem
Post by: Ian Price on 2010-May-16
QuoteFor sound dev on a windows machine, you should be able to use windows OEM sndrec.exe to do so.
You can't use Windows Sound Recorder to convert MP3s and the version for Windows 7 (and possibly Vista) can't convert anything to anything - it's total $#!+. I even grabbed my XP SNDREC and stuck it on my W7 machine - it's just too handy to leave to rot.
Title: Re: MP3 playing problem
Post by: Kuron on 2010-May-16
Quote from: Moru on 2010-May-16
Well, you can use MP3 in your games in certain countries but noone seems to be certain what countries :-)
I wasn't aware that the patent had expired in any country yet?  I guess this is like the GIF days and we will soon be able to start watching the countdown as the patent expires in various countries  =D
Title: Re: MP3 playing problem
Post by: Hemlos on 2010-May-21
He is making a sports timer, and wants to play a random mp3 in the background.

Doesnt sound like a distribution of the mp3's, so i dont think he is crossing any legal lines here.

Im in the same boat, i would like to play a random mp3 as well, but for some reason it doesnt work.

It is 100% nessecary to convert to the format i mentioned above.
Title: Re: MP3 playing problem
Post by: Moru on 2010-May-21
The mp3 format is patented so it's not totally legal to distribute but free applications might be. Have a look at http://en.wikipedia.org/wiki/Mp3 if you are more intrested than I am :-)
Title: Re: MP3 playing problem
Post by: kaotiklabs on 2010-May-21
So, which format are you usually using for iphone games?
ogg-vorbis??
Title: Re: MP3 playing problem
Post by: Kuron on 2010-May-21
QuoteDoesnt sound like a distribution of the mp3's, so i dont think he is crossing any legal lines here.
Nobody is talking about distributing MP3s, it is the playing of MP3s that is the problem.  Apple is no different than Microsoft and both are very clear that their license only covers them, not you (other developers).

Games are worse for MP3, since the license completely changes for games and goes by distributed copies and not sold copies (thus applies equally to freeware or shareware).  To use MP3s with your games, the cost is $2,500 (http://mp3licensing.com/royalty/games.html) per title.
Title: Re: MP3 playing problem
Post by: Kitty Hello on 2010-May-31
:S really!? Funnily I used WAV samples for Dr.Shiver...