Playing Music

BlitzMax Forums/BlitzMax Beginners Area/Playing Music

Kemi(Posted 2006) [#1]
What is all that stuff I read here about License-Fees for using MP3?

Can someone please post simple instructions of how to play music in Blitzmax?

Of course, it should be MP3 or even smaller in size, suitable for download.

And: It should work on Mac an Win, both the player-module (?) and the editor for creating it.

I'm really confused about all those discussions :-(


Matt McFarland(Posted 2006) [#2]
You need to convert your selected mp3 to ogg format. To do this download an mp3 to ogg converter. There are hundreds out there and some are free and some are not. Main prob is I dont own a mac so I cant tell you where the free ogg mac converter is. Then you simple load the ogg file like you would load a wav file. ogg is far better than mp3 because it compresses sounds down even further, saving you even more disk space.


Yan(Posted 2006) [#3]
Take a look at Audacity.


Matt McFarland(Posted 2006) [#4]
WOW! Thats awesome! Thanks!!


deps(Posted 2006) [#5]
How to play music in BlitzMax:
local song:tsound = loadsound("music.ogg")
playsound song



Sonic(Posted 2006) [#6]
How do you compile Xwidgets for Audacity? Really stuck on this!


Grisu(Posted 2006) [#7]
There's also a great Fmod lib floating around here somewhere.


Hotcakes(Posted 2006) [#8]
Kemi, it is a common misconception that mp3 is a free format. For programming purposes, stay the hell away from it. .ogg is free, has less limitations and provides superior quality at low bitrates. No need to get confused, it's simple : mp3 no, ogg yes. All the time. =]


Russell(Posted 2006) [#9]
FLAC (free lossless audio codec) is also an interesting choice. It is part of the d.u.m.b. audio system that comes with Audiere.

http://flac.sourceforge.net/
http://audiere.sourceforge.net/

Russell


Kemi(Posted 2006) [#10]
Thanks guys, I tried Audacity with OGG and that's the way to go. Although Audacity sets the sample-rate to 96000 thus disabling most apps from playing sound, it can easily be tweaked by putting a link to the audio/midi config settings app so after quitting audacity you can easily re-set the rate to 44100. In case someone had the same problem.
So I'll stay with Reason 3.0 for creating the music and create OGG. Even at the lowest quality it still sounds much better than 64kbps mp3, while using only half the size. Impressive!


Hotcakes(Posted 2006) [#11]
Yep, it's some kind of magic. Only format that beats it at low bitrates is wma9, which is of course not free either (and incredibly CPU intensive, which is why you've never seen wma licensed for ingame usage, only cutscenes/videos)...


Xerra(Posted 2006) [#12]
Only problem with using the superior ogg is the portable mp3 players that don't support it :(


FlameDuck(Posted 2006) [#13]
Only problem with using the superior ogg is the portable mp3 players that don't support it :(
Then you bought the wrong player. Should've gone with an iriver.