Dark Bit Factory & Gravity

PROGRAMMING => Freebasic => Topic started by: Hotshot on September 22, 2008

Title: How Do you put Music in?
Post by: Hotshot on September 22, 2008
Hiya all,

I have either Sid, mid, mp3 music to put in for freebasic. Do I need a music library for freebasic or somethings?

 :cheers:
Title: Re: How Do you put Music in?
Post by: Jim on September 22, 2008
There are libraries you can download from here to play mod or sid or other module files, or Windows functions for playing mid and mp3.  We should be able to help you when you pick your song.

Jim

Title: Re: How Do you put Music in?
Post by: Hotshot on September 22, 2008
You mean I should look at UFMOD >>Step By Step Guide<<?

I have pick the music I like but it is 3.46MB( Delerium -Silence )!  :o
Title: Re: How Do you put Music in?
Post by: hellfire on September 23, 2008
For mp3 you might want to try fmod (http://gpwiki.org/index.php/Using_FMOD,_SDL,_and_tinyPTC_in_FreeBASIC).
If the file-size is not acceptable, you can either try a more aggressive encoder (like aac+ (http://en.wikipedia.org/wiki/HE-AAC)) or use sid/mod instead.
Title: Re: How Do you put Music in?
Post by: Jim on September 23, 2008
For mp3 you can just use Windows.
iirc, something like
mciSendString("play file.mp3",0,0,0);
Same works with mid or wav or any other old-style Windows media format.  For other stuff you need custom libraries.
Jim

Title: Re: How Do you put Music in?
Post by: Hezad on September 23, 2008
And if you use Fmod finally, here's a very little tutorial explaining you how to use it, I always use it when I forget the Fmod functions :)

The tut' is for C but (very very) easily usable with FB (the syntax is almost the same if not the same)

http://www.gamedev.net/reference/articles/article2098.asp (http://www.gamedev.net/reference/articles/article2098.asp)