Qbasicnews.com

Full Version: I just need to know about FMOD
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Does it support playing more than one sound at the same time? If so, howdo I do that, do I just tell them to play and it will mix them automatically? It will usually be one midi file and multiple mp3 sounds. I looked in the examples and studied the fmod.bi code, i couldn't find an answer. I don't want to use OpenAL

EDIT: I will also need it to be able to play them at different volumes

Anonymous

one of the best tutes available for fmod use in fb: http://www.freebasic.net/forum/viewtopic.php?t=11

yes you can do multiple sounds at once, read the tute, he'll talk about "FSOUND_Free", which will automaically play the sample in a free channel. you also have control over volumes, but this is something you'll want to look at the fmod docs for (or just the .bi if youre very adventurous and smart ;p)
Yes FMOD can do those things, and if you need more commands than what is given in the tutorial get the chm at http://www.cdsoft.co.uk/fbstuff/fmod.chm which is also stated in the tutorial =D

If you need anymore help, I have been working with FMOD for a project of my own so I am getting pretty familiar with it.
Thanks
FMOD is only free for private usage Sad
PortAudio is open source (Windows, Linux, MAC)
http://www.portaudio.com/

Joshy
Ok, every tutorial that I have looked at tels me that I will want to use a streaming mp3 because they are often very large. It never says that is MUST be used as a stream, but none of themoffer the alternative of loadingan entire MP3. How do I do this? All of my files are simpy sound effects, no more than a second in length, size is no concern.
if you want to load all of your sound into memory (not streaming) then use
Code:
FSOUND_Sample_Load(indexnumber, soundfile$,offset, length)
offset and length are optional and normally set to 0

then to play it would be

Code:
FSOUND_PlaySound(indexnumber)
I've been playing with it for a while and still don't have something that works. Could somebody post an example here?

This is what I've been trying to put together:
Code:
option explicit
option escape
'$include: 'fmod.bi'
if( FSOUND_Init( 48000, 4, 0 ) = 0 ) then
   print "Can't initialize FMOD"
   end 1
end if
dim a as integer
a = FSOUND_FREE
FSOUND_Sample_Load(a, "d:\sndfx\hurt.mp3", FSOUND_LOOP_OFF,0,0)
FSOUND_PlaySound(FSOUND_FREE, a)
sleep
Quote:FMOD is only free for private usage Sad
PortAudio is open source (Windows, Linux, MAC)
http://www.portaudio.com/

Joshy

Have those headers been translated to FB?
Download Opa Opa ( http://www.apeshell.net ) and peek at the source. It has an ubersimple dumb OGG player using FMOD. It should get you started.
Pages: 1 2