FMOD Community Project
BlitzMax Forums/BlitzMax Programming/FMOD Community Project
| ||
Dear community, The time has come for us to plug a hole in blitzmax and offer 100% ROBUST FMOD support! With FMOD (which is free to use unless you're selling your game, then it's a paltry $100) Why FMOD? well it gives us OXM, which none of the other sound libraries are actually able to do, this is absolutely essential for any indie/shareware developer! you're looking at the highest quality with the smallest download size - and cross platform. Thats just for starters! With FMOD all of us can use the industry quality OXM format which is also used in the nintendo DS! With FMOD we're able to apply a wide range of absolutely WICKED sound effects from echoes and more! Need I remind you it's totally cross platform and bug free? It's also far higher performance than max's native sound (not criticising simon as this is heavily optimised) All we need to do is get together and do it! I know once we get started it'll be another feather in Blitzmax's CAP! To start us off: http://www.fmod.org/ << find fmod and dll's here http://drago-tech.net/FmodWin32.zip << drago's windows fmod http://drago-tech.net/FmodLinux.tar.gz << drago's linux fmod But no mac fmod yet guys and the above ones are complete. Also we've got a contribution from Tea Virus - a full set of structs. He says: "Mostly untested but all the commands/consts/structs are there." : Like the SDL thread, this community project is designed for the whole community to benefit from. Hopefully we'll see help from a couple of guys including BRL if they can - as they have experience using FMOD too! Good luck everyone! |
| ||
Tangentially related for those in the know about these things (not me), is there any chance that portaudio (portaudio.com) will be made accessible to Blitzmax? The benefit is that it is free for what it offers. |
| ||
Didn't BRL have an FMOD implementation and pulled cuz of license issues? |
| ||
Might be quite possible as the license fees are quite high with 1000-2000$ per title per plattform for non-freeware. |
| ||
It's $100 shareware license and free if non commerical. Please keep license discussion OUT of this thread. Have respect and keep non-FMOD development discussions OUT of this thread. This thread is for development of FMOD in max, not discussion of licensing. More code to come! We welcome any contributors to this community project, therefore have to politely ask people who wish to discuss licensing issues or other SDK's to post elsewhere. Thank you. |
| ||
My "tangential" post had nothing to do with "lack of respect' so I politely request that you pay close attention to the language used when negatively characterizing others. I apologize for asking about another SDK. |
| ||
Have included the missing commands from Drago. Tested some of the functions. Seems to work...:) Regards Sveinung |
| ||
VERY impressive work Sveinung - does this also work with the mac? Is this the complete module we need to use, or do we have to combine this with drago's? Nice work :) If you have the time, will you be able to supply an example please? just a simple one :) |
| ||
All the streaming stuff as well, many thanks. Steve. |
| ||
This is the complete module (I hope...;) ). It should do. Just read the fmod doc to confirm what commands that are supported on your os. I hope someone find this module usefull, like I do. Download complete lib here Regards Sveinung |
| ||
BIG THANK YOU TO SVEINUNG and DRAGO for the first one This is sufficient for anyone. Don't forget everyone, that FMOD 4.0 (not this version) but the one on the fmod site, has similar dynamic content to Direct Music in DX9 - that is you can change the "mood" as you play. |
| ||
Very nice! can this be added to official pub.mods? |
| ||
Anyone got it working on a Mac yet? |
| ||
Shame it's too expensive to use on commerical titles. |
| ||
The commercial download license is $100. The commercial hardcopy retail license is $2000. I take it geom isn't going to be sold hardcopy retail alongside Quake4 ? If you're selling retail commercial, $2,000 is *penuts* else why are you selling retail commercial if you don't expect to sell even close to that amount? I don't think it's much of a problem to be honest :) |
| ||
I would of made a mac version, if I had a mac to test it on :), so if anyone wants to donate a mac my way ;) hehe. I'm glade someone got around to finishing this, work has been keeping me to busy to do any programming on the weekends. (since I program at work it is the last thing on my mind to do on weekends.) |
| ||
Thanks Drago :) Now do any aussies have any mac mini's spare? :D |
| ||
Fmod sounds good but I dont think I'll be using it. I dont think most people will notice the difference between max sounds and fmod sounds. I also dont think most people have the hardware to really tell the diff.. So until this changes I think I'll stick with Max Sounds. Unless some one wants to create a sample, that plays a set of sounds using max sounds and then the same set of sounds using fmod. |
| ||
Well the reason for FMOD isn't just the snazzy sound effects. FMOD is very reliable, very fast and plays a lot more formats, in particular it has XM support which is desirable for people selling games online (to keep file sizes minimal). |
| ||
The Market as it is, I dont think the licnse fee of 100$ is really worth what little extra it provides, only a few indie titles will go on to have good sales, most sell only a handfull per year which means that initial payment puts them at a loss for a while. and thats even if the title sells at all. Dont get me wrong I think Fmod support in MAx is awsome, I think there will be a lot of people that will benefit from it. those of us lucky enough to have a publisher sitting wish cash in hand will be the ones to benefit more id say cos they will make their fee's back on sale if you know what I mean. As a development tool I think Fmod is really good, I think its going to be a good addition to Max, I only hope that it does not end up as a replacement for Max's current sound system.. On Topic I think I have some code that might help this project, I am working from my laptop just now cos my main PC is on the blink so I'll have a look for it, if its not lost then ill add it here. |
| ||
Thanks Yavin. The above FMOD code is complete, it just doesn't work with the mac at the moment as we don't have anyone with a mac or linux and an interest in FMOD. |
| ||
$100 is five sales for most people. |
| ||
Managed to get it working on the Mac, with a few minor changes. I'll upload an example once I tidy it up a bit. Steve. |
| ||
Here it is : - http://www.xmystik.co.uk/macfmod.zip copy the fmod.mod directory to your mods\pub.mod\ directory on the mac. It will look like this then blitzmax\mod\pub.mod\fmod.mod\ It didn't seem to like it when I used the above module and the libmod.a installed in the libs directory. This worked fine on the PC though. So I placed it in the fmod.mod directory as well and it seems to work ok. You will also need to add a title.ogg song for the demo to stream. There are a couple of things to note in the example. 1) I had a problem with the brl.oggloader conflicting with the fmod.mod which is why I've used a framework. Any ideas how to get around that? 2) FSOUND_SetOutput(FSOUND_OUTPUT_MAC) to specify the Mac sound system. The rest is the same as on the PC Steve. |
| ||
Hi Mystik, Great work ! I'm having problems on my Powerbook though :( - I moved your fmod.mod directory to /Applications/BlitzMax/mod/pub.mod/. - I saved the example code you posted to my regular BlitzMax folder. - In the demo bmx file I specified the correct path to the title.ogg file I want to play. - I then compiled but got this : libfmod.a is where it should be.Any suggestions as to why the example won't compile for me ? |
| ||
did you do a full build all with modules? |
| ||
thanks for the reply Fish.When you say full build do you mean BlitzMax ? I have the full version (not demo) and all the BllitzMax modules are upto date. |
| ||
DannyD. You can't use quick build. Uncheck the Quick Build in your program menu. Then select build modules in the same menu. Then it sholud work. Regards Sveinung |
| ||
You could try putting the libfmod.a file in your lib directory. That is where it is supposed to go. I got an error on my powerbook with the file in there though. That is why I placed it in the fmod.mod directory. I could be that my blitzmax isn't installed correctly. I'll try reinstalling it later. Steve. |
| ||
Thanks Sveinung and Mystik.I turned off quick build and then built the modules.It works for .ogg files but not for amiga .mods :( I get the following when replacing the filename from title.ogg to title.mod : Is there a problem with the .mod file ? I tried two different ones. Perhaps I need to use a different fmod API command to play mod files ? If I compile an application and include INCBIN a mod/ogg file, do I need to package any libraries or is that included in the application.app ? |
| ||
The demo shows just the streaming feature of FMOD and I'm not sure it can stream mods or xm. FMUSIC does the following formats:- - .MOD (protracker/fasttracker modules) - .S3M (screamtracker 3 modules) - .XM (fasttracker 2 modules) - .IT (impulse tracker modules) - .MID (MIDI files) - .RMI (MIDI files) - .SGT (DirectMusic segment files) - .FSB (FMOD Sample Bank files) FSOUND does the wav,ogg type formats and can stream them. Could be wrong on that as I'm not too experienced with Fmod. Steve. |
| ||
Here is a quick test for playing mods. No error checking though.Framework brl.glmax2d '---------------------- Import brl.retro Import brl.blitz Import brl.freeaudioaudio 'Import brl.oggloader 'causes probs with fmod on mac, thats why I had to use framework. Any help? Import brl.system Import pub.fmod Graphics 800,600,0,50 FSOUND_SetOutput(FSOUND_OUTPUT_MAC) ' Ensure you use FSOUND_OUTPUT_MAC FSOUND_SetDriver(0) If Not FSOUND_Init(44100, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH) RuntimeError "Init Error " Else Mod_:Int = FMUSIC_LoadSong(cstr("an-path.xm")) FMUSIC_SetLooping(Mod_, False) FMUSIC_PlaySong(Mod_); While Not KeyHit(KEY_ESCAPE) Cls DrawText "Fmod Mac Test - Press ESCAPE to sxit",0,0 Flip Wend EndIf End |
| ||
Yes.It's working !Brilliant stuff. |
| ||
Sorry for dumb question, but... how does this work? I always get a "Function not found"-Error although I copied the module in the pub.mod folder. How2Install? |
| ||
How to install: 1. Copy the libfmod.a to the lib folder 2. Copy the folder fmod.mod to the mod/pub.mod/ folder 3. Choose Build Modules from the Progam-menu in BlitzMax 4. Have Fun!!! Rember to uncheck Quick Build. Regards Sveinung |
| ||
Thanks, I didn't thought about copying the lib :) |
| ||
Sorry, but I really don't get it. I don't have any file named "libfmod.a" here and The button to recompile alle modules is grey so I can't click on it. |
| ||
Rebuild all modules. The sample work's fine, but if i want to insert the player in my own source file i get many error's. I hope Mark can make a module with my source files i have found in Net. |
| ||
Sorry, but I really don't get it. I don't have any file named "libfmod.a" here and The button to recompile alle modules is grey so I can't click on it. The file named libfmod.a comes with FMOD when you download it. Normally you would copy that to the blitzmax\lib\ directory. But for some reason on my Mac version of blitzmax it did not like it there. So I placed it in the mod.fmod directory instead. You will need the developer tools installed for OSX to rebuild the modules. It should be on your OSX disk. Steve. |
| ||
Did you read my text or did you understand that i have written: It work's fine if i use the Player , but then i use the code in my source it does not work! |
| ||
Did you read my text or did you understand that i have written: It work's fine if i use the Player , but then i use the code in my source it does not work! Perhaps I was replying to the post before you. I have edited my post to save any further confusion ;) As you have not posted your source file, it's kind of hard to see what the problem may be.... Steve. |
| ||
Ok Mystik! Sorry! It was my mistake. I have problem's to make my source as a framework.Should be another method to get it working under MacOS X. Or can some one tell me how i can make my code as a framework! |
| ||
Just had a play with this and it works a treat. Thanks guys, will come in very useful for my current project. :) Muttley |
| ||
Glad you could use it! Guess I'll start looking at version 4.00 Sveinung |
| ||
Started on the docs. Eta late september. Just in case someone are interested. Sveinung |
| ||
I'm trying to make an FSound stream. I've got it to apparently pass a pointer to a (blitz) callback function to createstream, and it seems to call it OK - once. Then there is a memory error. Does anyone know why? |
| ||
New update Thanks to all that reported bugs for this update Added sample. FMOD Sveinung |
| ||
Where is FMOD mod ? All your link are broken :/ |
| ||
Here : http://www.sherrox.com/Fmod3_74_BlitzMax.rar |
| ||
Congratulations and thanx to everyone who contributed to this. Works a treat on my Mac. Is it possible to synthesize sounds on the fly whilst replaying them in FMOD? If anyone has a demo or can tell me what commands to investigate to do this, I would appreciate it. EDIT - I see you can set up oscillators etc in FMOD which kind of does what I want, but I would rather create the samples with max and have FMOD play them. |
| ||
Hi, Is there a repository for examples using FMOD? more example code please. My requirement is to sample the mic port and send the data to the headphone output ie: to create a piece of wire! The data should be streamed I guess as I will eventually want to process the audio input before sendimg it back to the headphone socket! |
| ||
This thread seems a bit dead, Nigel. Take a look at www.fmod.org. |
| ||
Error: Function FSOUND_Record_GetDriverName:Int(id:Int) in fmod.bmx should read: Function FSOUND_Record_GetDriverName:Byte Ptr(id:Int) |
| ||
Any news on the documentation? :) Great work on this mod, guys. |
| ||
Nomen: "Is it possible to synthesize sounds on the fly whilst replaying them in FMOD?" That's what I'm trying to do. As I understand it you need to use FSound_Stream_Create and pass it the pointer to a callback function, which should then send a pointer to your audio sample data to FMOD. But I can't get it to work. |
| ||
Denzilquixode- Hmm - maybe we could combine forces. I've since seen some demo code in C that is included with the FMOD api - but it uses stuff that isn't available in Blitz at the mo - I tried to reproduce the required stuff in Blitz but can't find some of the structures required in the C headers. You seem to be trying a different method to me - can you post what you have so far, and I'll see if I can add anything? |
| ||
It's super to see someone else taking care of this module. Due to me getting a new job, the time avil for updating this is close to none. I'v started on the documentation... :) Sveinung |
| ||
"Hmm - maybe we could combine forces." Good idea. Well, first of all the definition of FSOUND_Stream_Create in fmod.bmx seems to be wrong, it's currently Function FSOUND_Stream_Create:Byte(callback:Int,lenbytes:Int,mode:Int,samplerate:Int,userdate:Int)...when I'm pretty sure callback and userdata should be pointers not ints, and it should also return one instead of a byte, so: Function FSOUND_Stream_Create:Byte Ptr(callback:Byte Ptr,lenbytes:Int,mode:Int,samplerate:Int,userdata:Byte Ptr)The callback function definition in the FMOD API is: signed char F_CALLBACKAPI FSOUND_STREAMCALLBACK( FSOUND_STREAM *stream, void *buff, int len, void *userdata ); So I attempted a Blitz version of it: Function FMOD_Stream_Callback:Byte(stream:Byte Ptr, buff:Byte Ptr, length:Int, userdata:Byte Ptr) ' ... End FunctionAccording to the API, this function should return FALSE if the stream should be stopped and TRUE otherwise. At this stage, all I want to do is to pass this callback function to FMOD, make sure it's calling the function OK, and then close the stream without actually giving it anything. So, the full piece of code I've got is: Function FMOD_Stream_Callback:Byte(stream:Byte Ptr, buff:Byte Ptr, length:Int, userdata:Byte Ptr) Print "Hello" Return 0 End Function Local CallbackPtr:Byte Ptr = FMOD_Stream_Callback FSOUND_SetDriver(0) If Not FSOUND_Init(44100, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH) Print "error" End If Local NSFStream:Byte Ptr = FSOUND_Stream_Create(CallbackPtr, 100, FSOUND_NORMAL, 1, Null) FSOUND_Stream_Play(FSOUND_FREE, NSFStream) Repeat Until KeyHit(KEY_ESCAPE) End...which gives the following output: Hello [CRASH: "Unhandled Exception: Unhandled Memory Exception Error" on line "FSOUND_Stream_Play(FSOUND_FREE, NSFStream)"]So the callback function IS actually called, since it printed Hello, but it then still has a memory exception. |
| ||
OK thanks for sharing - I may not get around to it for a couple of days, but if I make any progrss, you'll hear about it. |
| ||
Wel I'm not getting memory exceptions now, but I'm not getting sound. I need documentation on FMOD functions, but there doesnt seem to be any (apart from some example code) with my download. Help anyone? |
| ||
There's the online docs: http://www.fmod.org/docs/HTML/ I also have a .chm file (compiled HTML help file) which has all the docs, but if you're not on Windows that might be useless. |
| ||
Yeah found those eventually - not that explanatory IMO. Are you basing your stuff on one of the Demos? If so which one. I've got to the point where the callback is repeatedly called (I'm returning a 1 each time) and FMOD doesn't fall over - can't remember what I did, but it's hardly any different to your version. Will post it when I get home tonight. What the docs don't tell me is what I have to do in the callback. Is it just a case of writing <length> shorts (the sound!) to stream or buff? |
| ||
Excellent, good to know I was almost there then. The callback stuff is in http://www.fmod.org/docs/HTML/FSOUND_STREAMCALLBACK.html - "buff" is where you have to write the data to, "stream" is the pointer to FMOD's stream definition object, what FSOUND_Stream_Create returns - I don't think that we should actually need to do anything with this yet - and length is the length of the buffer in bytes. As I understand it the buffer can be quite small (e.g. 1000 bytes, for 250 4-byte samples) and the callback is required to exactly fill this amount, and then is called again when those samples have almost been played and the next buffer needs to be filled. |
| ||
'Function FSOUND_Stream_Create:Int(callback:Byte Ptr,lenbytes:Int,mode:Int,samplerate:Int,userdata:Byte Ptr) Framework brl.glmax2d '---------------------- Import brl.retro Import brl.blitz Import brl.freeaudioaudio 'Import brl.oggloader 'causes probs with fmod on mac, thats why I had to use framework. Any help? Import brl.system Import pub.fmod Import brl.keycodes Import brl.standardio Global sample sample=0 Function FMOD_Stream_Callback(stream:Byte Ptr, buff:Byte Ptr, length:Int, userdata:Byte Ptr) 'Print "Hello" Print length Local snd_ptr:Short Ptr=Short Ptr(buff) 'Print "going to loop" For n=0 To (length/4)-1 snd_ptr[n]=Short(Rand(1,65536)) sample:+1 Next Return 1 End Function Local CallbackPtr:Byte Ptr = FMOD_Stream_Callback FSOUND_SetDriver(0) If Not FSOUND_Init(44100, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH) Print "error" End If Local NSFStream:Int = FSOUND_Stream_Create(CallbackPtr, 512, FSOUND_NORMAL, 1, Null) FSOUND_Stream_Play(FSOUND_FREE, NSFStream) FlushKeys() Repeat Print sample Until KeyHit(KEY_ESCAPE) End Here's what I have so far - see the opening comment for the definition of FSOUND_stream_create I'm using in FMOD.bmx. This actually produced some sound which is encouraging- unfortunately it is a low frequency rumble (I was expecting white noise) and has regular breaks - I'm not sure if the sound is changing at all between buffer reads. Max only has unsigned shorts - I'm assuming we need signed ones so will have to work around eventually. You won't need the framework stuff unless you're on a Mac like me. Let me know how you get on. |
| ||
Aw, man. I still get a memory exception error at the FSOUND_Stream_Play line. Must be some Mac/Windows thing somehow? Edit: Duh, just thought of catching the exception: Try FSOUND_Stream_Play(FSOUND_FREE, NSFStream) Catch ex:Object ' ... ? End Try...but it doesn't help that much - all I get is 512 printed once, then 128 printed repeatedly. Clearly, the callback function is still only being called once, despite it returning 1 when it's called the first time. Is there any way I can get information about the exception? I don't really understand that stuff yet. |
| ||
Has anyone managed to use the FSOUND_Sample_Lock()? Example: FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND); FSOUND_Init(44100,32,FSOUND_INIT_USEDEFAULTMIDISYNTH) Global FileNameA:String = "justsomefile.wav" Global Chan1:Int = 1 Global smp1:Int = FSOUND_Sample_Load(Chan1,cstr(FileNameA),FSOUND_16BITS,0,0) Global smp1Len:Int = FSOUND_SAMPLE_GETLENGTH(smp1) Global ptr1:Int Global ptr2:Int Global len1:Int Ptr Global len2:Int Ptr Global isLocked:Byte = FSOUND_Sample_Lock:Byte(sptr,0,smp1Len,ptr1,ptr2,len1,len2) I get a memory exeption (this is on win) when running this code. Any ideas? Other than that, FMOD is working great for me! |
| ||
Soz Petbom, not looked at that, but on a different note...Framework brl.glmax2d '---------------------- Import brl.retro Import brl.blitz Import brl.freeaudioaudio 'Import brl.oggloader 'causes probs with fmod on mac, thats why I had to use framework. Any help? Import brl.system Import pub.fmod Import brl.keycodes Import brl.standardio Global sample sample=0 Function makesignedshort:Short(float_num#) x=Long(float_num) val_bits:Short=Short(x&%0111111111111111) sign_bit:Short=Short((x Shr 16)&%1000000000000000) short_val:Short=Short(sign_bit|val_bits) Return short_val End Function Function FMOD_Stream_Callback(stream:Byte Ptr, buff:Byte Ptr, length:Int, userdata:Byte Ptr) 'Print "Hello" Print "callback!" Print length Local snd_ptr:Short Ptr=Short Ptr(buff) 'Print "going to loop" '1942 '2183 For n=0 To (length/4)-1 'Print n snd_ptr[0]=makesignedshort(32767.0*Sin(Float(sample))) 'Left speaker snd_ptr[1]=makesignedshort(32767.0*Sin(1.5*Float(sample))) 'Right speaker snd_ptr:+2 sample:+1 Next Return 1 End Function Local CallbackPtr:Byte Ptr = FMOD_Stream_Callback ?Mac FSOUND_SetOutput(FSOUND_OUTPUT_MAC) ? FSOUND_SetDriver(0) If Not FSOUND_Init(44100, 16, 0) Print "error" EndIf Local stream:Int = FSOUND_Stream_Create(CallbackPtr, 6*2048, FSOUND_NORMAL|FSOUND_16BITS|FSOUND_STEREO, 44100, Null) FSOUND_Stream_Play(FSOUND_FREE, stream) If (FSOUND_Stream_Play(FSOUND_FREE, NSFStream) = -1) Print("Error!") EndIf WaitKey() FSOUND_Stream_Close(stream) FSOUND_Close() End Finally got a streaming sound working with FMOD - ever taken absolute ages to get something working, and then forget why it was such a hassle? I did with this. Plays a different (streamed) tone through each speaker. Works fine on my Mac mini, untested on PC. |
| ||
Same memory error here. Could some other PC people try it? Maybe it's a problem with my memory. I'd really like to get to the bottom of this... |
| ||
Hmmm.. do you need to do some sort of FSOUND_SetOutput for the PC? Should my ?Mac directive be ?MacOs ? Can't remember. I would download the original decls file in case there was anything you changed in it. Make sure you have FMOD 3.7.4 installed - I accidentally installed a later version initially - even when you click on the older version, there are downloads of the newer on right there. I don't know if it's backwards compatible or not. The code is roughly copied from one of the stream examples, but there are bits missing, like the option to set sound output device - you could try adding these to see if another option works. Try taking the memory writes out of the stream callback - still get a memory error? |
| ||
Yeah, I got the same error when all the callback did was print a string, or even just return 1 without doing anything. I definitely have 3.7.4. I'd guess this has something to do with Windows memory management, and how FMOD allocates it. But the problem arises when the callback function returns - maybe it doesn't know where to return "to" or something? |
| ||
Im confused, is this working on mac. Perhaps Jack could update the top post if so? |
| ||
Well there are 2 Mac examples including mine if you read down the thread - so at least some of the functions are proven to work on it. |
| ||
The original fmod code by Mystik used to work fine but can't be included in any other code and must be run standalone.The problem is that the libfmod.a use a same statement as another module blitzmax.mod. Anyone know how to fix this ? I think it needs to be coded NOT as a framework. I tried Nomen luni code above. I rebuilt all Modules and compiled: Compiling:mod.bmx Compile Error: Can't find interface for module 'pub.fmod' What gives ? I turned off quick build, rebuild all modules but still keep getting this ? |
| ||
Danny - have you tried all the suggestions I gave to Denzil a couple of posts up? I would love to get a version of this that would work for everyone. You have saved Sveinung's pub.fmod to your public mods folder? |
| ||
Just bumping this question:Has anyone managed to use the FSOUND_Sample_Lock()?See above for details |
| ||
Found and fixed a couple of bugs: Changed: Function FSOUND_Stream_Open:Int(name_or_data:String,mode:Int,offset:Int,lenght:Int) Function FSOUND_Stream_Play:Int(channel:Int,stream:Byte Ptr) Function FSOUND_Stream_PlayEx:Int(channel:Int,stream:Byte Ptr,dspunit:Int,paused:Int) To: Function FSOUND_Stream_Open:Int(name_or_data:Byte Ptr,mode:Int,offset:Int,length:Int) Function FSOUND_Stream_Play:Int(channel:Int,stream:Int) Function FSOUND_Stream_PlayEx:Int(channel:Int,stream:Int,dspunit:Int,paused:Int) Not sure if this is 100% correct, but it fixed the problems I was having loading and playing streams. Muttley |
| ||
Sorry, but where can one download the "current" win32 sources? The links given to Drago's webspace are dead. |
| ||
I second that. I've noticed a couple bug fixes posted above. Is anyone keeping the BMax mod up-to-date? Perhaps this would make a nice Wiki entry, with sample code and links to the latest mod? |
| ||
I don't think there's anyone coordinating this any more, which is a shame. |
| ||
Updated to run under Max 1.12. Download Sveinung |
| ||
I had to re-fix the stream opening again, could you make these changes to your master copy?250,252c250,252 < Function FSOUND_Stream_Open:Int(name_or_data:String,mode:Int,offset:Int,lenght:Int) < Function FSOUND_Stream_Play:Int(channel:Int,stream:Byte Ptr) < Function FSOUND_Stream_PlayEx:Int(channel:Int,stream:Byte Ptr,dspunit:Int,paused:Int) --- > Function FSOUND_Stream_Open:Int(name_or_data:Byte Ptr,mode:Int,offset:Int,length:Int) > Function FSOUND_Stream_Play:Int(channel:Int,stream:Int) > Function FSOUND_Stream_PlayEx:Int(channel:Int,stream:Int,dspunit:Int,paused:Int) 386d385 < Cheers Muttley |
| ||
Thanks Muttley. Its done... Plus some more fixes Sveinung |
| ||
Thanks mate, Actually, I've just added this to return the relevant error code strings (pulled out of the FMOD docs) referenced by FSOUND_GetError(). Seems to work OK. Muttley |
| ||
Hi guys. Does anyone have an examples of streaming oggs and use of the effects? Also, I'd prefer to use the loadMusic functions, does anyone know a decent site for xm's, it'sm etc other than modarchive.com Any help is appreciated. Good work on the lib, everyone. |
| ||
Thanks again Muttley. Your updates are now in. New version on the server.... I'm now working on the linux version Sveinung |
| ||
Here ya go Rimmsy: HTH Muttley |
| ||
That is awesome. Thank you very much. I thought there was so much more to it and it was hideously complicated. Again, thank you! |
| ||
Hm. I feel a bit silly. I basically copy/pasted your code and run it with some changes to reflect my needs. I get an "unable to convert from 'byte ptr' to 'string'" error at the toCString line. So I change this to just the file (because I read somewhere that you don't need to do that anymore) Anyway, it runs but the stream handle is always null and FMOD returns a file not found error when I'm positive the file is there. Anyway help muttley? Also.. do that laugh. You know the one. |
| ||
@Rimmsy Think you got an old version of the module. Please try to download it again. I think that will solw your problem. Regards Sveinung |
| ||
I downloaded the module from above, overwrote all the files then rebuilt all modules. I get some weird errors that I've highlighted in another thread. I think it gets to this error and stops so doesn't get a chance to compile the fmode lib. When I have the compile error sorted I think it'll work like you said, sveinung. Thanks for your help. |
| ||
Hi, I can't get this to work on osx 10.3.9 using bmax 1.12 I get these errors when I compile anything trying to use fmod: ld: Undefined symbols: _FMUSIC_LoadSong _FMUSIC_PlaySong _FMUSIC_SetLooping _FSOUND_Init _FSOUND_SetDriver _FSOUND_SetOutput _FSOUND_GetError Looks like it can't find libfmod.a Everything seem to be fine when I build the modules. I downloaded the file at http://www.sherrox.com/Fmod3_74_BlitzMax.zip and also the mac 3.74 libfmod.a file from the fmod page. I placed the libfmod.a file in blitzmax/lib and in blitzmax/mod/pub.mod/fmod.mod Anyone know why this doesn't work? |
| ||
I haven't got a Mac to try it I'm afraid. :( Muttley |
| ||
@deps The Libfmod.a file in that packed is for win32. Download the fomod api from www.fmod.org. That should dom the trick I think. Regards Sveinung |
| ||
I have the libfmod.a for macintosh. At least that's what the .sit file said. |
| ||
Please remove "strict" from the fmod.bmx source, when runnign 1.14! Will solve this later. Sveinung |
| ||
Has anyone had any luck using the stream callback with FSOUND_Stream_SetSyncCallback()? I've been playing around with different datatypes in the callback function and various other permutations of this thing all evening with no luck. When FMOD hits the syncpoint that I've set 2 seconds into the song, it calls the callback (it actually prints "!The Syncpoint!") and then it locks up. Here's the code I've been working on: If someone could give this a try and possibly point out what I'm doing wrong I'd really appreciate it!! http://www.fmod.org/docs/HTML/FSOUND_STREAMCALLBACK.html http://www.fmod.org/docs/HTML/FSOUND_Stream_SetSyncCallback.html -Bryan |
| ||
Hi All, Im trying to get XM tracks to run in a freeware game involving groups of 4 blocks falling down the screen ;o), My first game. It looks like FMOD which I have downloaded (along with MinGW which I will need to compile to module) and installed should be able to play XM. Unfortunatly I'm unable to download any of the linked bmx zip/rar files to obtain the relevant module files! Any help or guidance would be greatly appreciated? Thank You |
| ||
You have downloaded the www.sherrox.com/Fmod3_74_BlitzMax.zip ??? If you are running on a win32 platform...you will find all you need in that zipfile. Put the libfmod.a in your blitmax/lib/ folder Put the fmod.mod in your blitzmax mod/pub.mod/ folder Put the fmod.dll in your projectfolder(or system32 folder) Start the blizmaxide and press Ctrl-D(Build modules). And now you are ready to go! I have updated the lib and it's now working perfectly under 1.14 Regards Sveinung |
| ||
Nice one Sveinung you are a real trooper. |
| ||
Excellent it's all working fine now cheers Sveinung, the problem was my firewall silly think kept blocking the download! Sorted now cheers, now off to complete Candy Cascade! |
| ||
Hi Sveinung. I tried the updated version that you've uploaded and still no luck. The stream callback gets called (the print command works) but then fmod locks up. Have you been able to get any of the callbacks working? Nomen luni - Any tips on how you got the stream callback working with FSOUND_Stream_Create? I tried the code that you have posted earlier in this thread and I have the same problem when the callback is called. |
| ||
Tea- I seem to be the only person who can run my code without a crash. I tested it on my Mac Mini, but I'm going to try it on my PC. I did fiddle with some of the function declarations but I'm pretty sure they all turned out to be right in the first place and I put them back. I'll get back to you soon. |
| ||
Just a quick thanks to you guys for doing this. Really is a top mod. |
| ||
Hi, Excellent work, but how would I load the file from an IncBin, I noticed that it was mentioned in this thread but I can't find a simple example? Thank You |
| ||
I seem to be the only person who can run my code without a crash. I tested it on my Mac Mini, but I'm going to try it on my PC. I did fiddle with some of the function declarations but I'm pretty sure they all turned out to be right in the first place and I put them back. I'll get back to you soon. I've still had no luck on this or any other way of streaming my own sound (OpenAL? Hacking FreeSound?). It'd be fantastic if you could crack it... |
| ||
Hi, No problem I think I've got it... If fsound_init(22000,256,0) = True DebugLog "Sound initialized." Else DebugLog "FMOD Sound failed to initialize." EndIf FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(),True) Local ofile:String = "incbin::salvation.xm" ' play music 'Local music=fmusic_loadsong(ofile.ToCString()) Local xmPtr:Byte Ptr = IncBinPtr("media/sfx/salvation.xm") Local music=fmusic_loadsongex(xmPtr, 0, IncbinLen("media/sfx/salvation.xm"), FSOUND_LOADMEMORY, Null, 0) If music > 0 Then fmusic_playsong(music) FMUSIC_SetMasterVolume(music,200) DebugLog "Music playing. "'+sname.FromCString(FMUSIC_GetName(music)) Else DebugLog "Music failed to load. FSOUND_ERROR :"+FMOD_GetError() DebugLog "IncbinLen : "+IncbinLen("media/sfx/salvation.xm") EndIf FMUSIC_LoadSongEx was the key! Cheers |
| ||
Does it hurt anything if I were to call FSOUND_Close() when I have not initialized using FSOUND_Init(44100, 32, 0 )? The reason I ask if because I looking for an easy way to shut of the sound. I could monitor the channel by it is set to auto allocate. |
| ||
@Sean: One of these should sort you out if I understand you correctly: FSOUND_StopSound(FSOUND_ALL) FMUSIC_StopAllSongs() |
| ||
Really I was just wondering if a call to FSOUND_Close() causes any problems when you have not itialized anything? |
| ||
Try it and see ;) Muttley |
| ||
The answer to your question is...no it doesn't hurt, but it will not turn off all sound either. You just get a FALSE returned from the FSOUND_Close(). Sveinung |
| ||
Thanks, It does seem to stop the song? I will have to take a closer look. |
| ||
1. Does this work with bmx1.14 too? As I can't get the xm player example running? :( 2. Is there a way to incbin the fmod.dll, so that one can distribute single exe files? |
| ||
@Grisu 1. You need the MaxGui module for the xm player. And yes, it run's on 1.14( at least I mine do...;) ) 2. I think you then must save the fmod.dll back to disk, before initing the fmod module. Don't think or have never seen it run from memory. Sveinung |
| ||
Thanks Sveinung. Do you know how can I writeback the dll to the hdd out of the exefile? |
| ||
I think you have to load the fmod.dll as a standard dll withe the lib = LoadLibraryA ("fmod.dll") Something like this... P.S remember to turn off "Build Gui App" for this code! Sveinung |
| ||
The code does not work, if you compile it and place the exe into an empty dir (without fmod.dll). The problem is I have to store the memory address while compiling inside the exe. So the fmod.dll can be read out from that position later, when the app starts. |
| ||
You'r right...forgot that i hade a fomd.dll in my system32. Sorry Sveinung |
| ||
Has anyone had any luck using the stream callbacks under Windows? Were you able to do your testing Nomen luni? I spent a few hours working on this again today and haven't been able to make any progress. If it looks like this can't be made to work in BMax then I might see if I can get BASS.dll working instead since it supports the same type of stream callbacks. |
| ||
When I check out the FMOD license, I find that it costs thousands of dollars, not $100! Sorry, but I don't think Blitz users will pay that kind of license. Or, if I am wrong, where's that $100 statement? |
| ||
U don't need to pay if you don't charge any thing for your application. Nice for Sceners ;) Sveinung |
| ||
Jeroen, look on their license page in the "Shareware, hobbyist agreement" section. It clearly states the $100 per title license details. Muttley |
| ||
Is there anyone who's used FMOD with C++ around? If you could give me a basic .cpp file that successfully plays a MOD file using FMOD, that I can import in a BlitzMax application, I'd be very grateful. (Still trying to get streaming working on Windows, so I want to try doing it in C++ rather than BlitzMax and then just import it in, but I'm having real problems just getting the functions out of the DLL and stuff - bluffing my way in C++ really.) |
| ||
Regarding the license, has anyone had a look at 'porting' minifmod or DUMB? DUMB's license is very free, except you aren't allowed to feed your dog at 5pm whilst using it or something.. |
| ||
Thanks for the great module! Do FX currently work with Blitzmax? If so how do you get them to work? Whenever I call FSOUND_ENABLEFX the sound stops... There is supposedly a tutorial on the fmod website but I can't find it. Thanks in advance. |
| ||
There is some tutorials in the fmod doc file. I think you will find the "DX8 FX support" interesting :) Sveinung |
| ||
Aha! I've got it working now. Thanks I swear i had done exactly what the tutorial said, but it didn't work before...ah well, it works now so that is all that matters :D Are there still plans to add support for the latest version of Fmod? |
| ||
I created a Blitz Audio driver from the mod Sveinung posted tonight... it's pretty straight forward. Needs a tweak to the official mods to work, though. But it's a 100% replacement for FreeAudio, just use the native Blitz functions - LoadSound, PlaySound, AllocChannel, etc etc. |
| ||
Version 3.75 will be avail next week. Sveinung |
| ||
Version 3.75 is ready. Added some more examples. Download here Sveinung |
| ||
First of all, I'd like to say that this is fantastic work and something I will definitely be using in the future. However, I am having problems getting this to work on a Mac. The latest version (in the above post) works very well under Windows. What I need to know is, what do I need to do to get this to work on a Mac under OS X 10.4.4? I am a complete newbie when it comes to the Mac, so bear with me. - Do I need to download additional files from fmod.org (as seems to be suggested in other posts)? - Under Windows I need to include the DLL in the same folder as the program. Is there something similar I need to be doing on the Mac? Currently, I get undefined label errors - even when I'm trying to compile a program that doesn't use it. I know I can get around that with Framework, but that's not practical on WIPs. If someone could answer these questions that would be great. On another note, will this be updated for version 4? |
| ||
Version 4 of fmod is a completely different product... |
| ||
@JazzieB You need to exchange the libfmod.a file to the libfmod.a file you download from www.fmod.org (Mac version). That should bee all the change you have to make. Here is some code from Mystic thats work on Mac Sveinung |
| ||
I've already placed the Mac version of libfmod.a in both the mod/fmod folder and the lib folder. I did forget to recompile the modules, but I get the same thing after doing this, i.e. a list of undefined symbols during linking. The example above produces the same results and it's as though BlitzMax isn't including Fmod during compilation even though it does rebeuild them during a rebuild. Here's what I get from the example above. Building untitled1 Compiling:untitled1.bmx Linking:untitled1 ld: Undefined symbols: _FMUSIC_LoadSong _FMUSIC_PlaySong _FMUSIC_SetLooping _FSOUND_Init _FSOUND_SetDriver _FSOUND_SetOutput _FSOUND_GetError Build Error: Failed to link /Applications/BlitzMax/tmp/untitled1.app/Contents/MacOS/untitled1 Process complete Any ideas what I could be missing here, as I believe I've done all I need to after trying to piece it together from this very long thread? What I've done so far is as follows. 1. Download the latest BlitzMax mod and FMOD from the link a few posts up for v3.75 of FMOD. 2. Copied the mod folder to mod/pub. 3. Downloaded FMOD 3.75 from fmod.org and install libfmod.a to the lib and mod/pub/fmod folders of BlitzMax. 4. Re-compiled all modules. As far as I can tell, this is all I need to do. The only thing that hasn't been done is do anything with the DLL, as this is Windows only. Is there anything similar for the Mac I should be using? |
| ||
hmm win32 i testet Function FMUSIC_IsFinished:Byte(mod_:Int) to test if i can play the next song but it will not work anyone? |
| ||
I have the same problem with FSOUND_IsPlaying:Byte(). It should return True/False, but it doesn't. Here sound work around code: 'gets the value that should be zero song_done = FSound_IsPlaying() Play Song if FSound_IsPlaying() = song_done then load next song Play next song end if |
| ||
@Panno & HCow33 You are right FSOUND_IsPlaying(channel) does not return 0 or 1. I get a 8 char long number, with 0 or 1 at the end. So it do work in a strange way. Don't know why it does that. Thanks for letting me know. Here is what i tested it on Sveinung |
| ||
The most accurate way to perform an action at the end of a stream is to define a callback using FSOUND_Stream_SetEndCallback(). This is what I'd like to do but I was never able to get any of the callbacks working. I'll give it another try tonight since Max has been updated but I'm not getting my hopes up. =( Has anyone had any luck getting the callbacks working on win32? |
| ||
How do you get the artist and song name from an internet radio stream? I cant get FSOUND_Stream_Net_SetMetadataCallback to work. Any ideas? |
| ||
HCow33 Thanks to a tip from Korolis in another thread I finally got the callbacks working last night!! The function used as a callback needs to be defined using "Win32". For example: Function StreamEndCallback(stream:byte ptr, data:byte ptr, usr:byte ptr) "Win32" |
| ||
New Update and a new example. Demo of how to use incbin with FMUSIC commands Regards Sveinung |
| ||
Hello, I downloaded fmod_3_75_module.zip and I'm using BlitzMax 1.16. I place the fmod.mod folder and the fmod.a file where told. Still the "Build Modules" and "Rebuild All Modules" options in BLitzIDE are all grey and therefore unusable. I think I need a little hep :) Thank you. Nino |
| ||
Hello ninomojo You need to turn of the "Quick Build" option under "Build Options" in the "Program" menu. That should be it... Regards Sveinung |
| ||
Actually Ninomojo, you need to install MinGW before you can compile modules. There's a sticky topic around here somewhere that explains how to install it. |
| ||
Arghhh. Is there anyone who has got this working under BlitzMax 1.18 under Macos 10.4.5? I'm getting an error on this line: Mod_:Int = FMUSIC_LoadSong(cstr("../music/dirt.mod")) The mod file exists but the compiler has an error with cstr .. Identifier cstr not found. :( |
| ||
Don't need to use the cstring for Fmusic_loadsong. Just use FMUSIC_LOADSONG("../music/dirt.mod") (FMUSIC_LOADSONGEX still needs the cstring ) Regards Sveinung |
| ||
Sveinung.. Just want to confirm the file I need is Fmod3_74_BlitzMax.rar from http://www.sherrox.com/Fmod3_74_BlitzMax.zip ? Even better could someone add instructions to the BlitzMax wiki at http://blitzwiki.org/index.php/Fmod_%28Mac_Os_X_only%29 or post them here and I'll modify the wiki page. Thanks. |
| ||
Building modDemo Compiling:modDemo.bmx Linking:modDemo.debug ld: Undefined symbols: _FMUSIC_GetNumOrders _FMUSIC_GetOrder _FMUSIC_GetPatternLength _FMUSIC_GetRow _FMUSIC_GetTime _FMUSIC_LoadSong _FMUSIC_PlaySong _FMUSIC_SetLooping _FSOUND_GetCPUUsage _FSOUND_GetChannelsPlaying _FSOUND_GetCurrentLevels _FSOUND_Init _FSOUND_SetDriver _FSOUND_SetOutput _FSOUND_GetError Build Error: Failed to link /Users/danny/Desktop/Mod/modDemo.debug.app/Contents/MacOS/modDemo.debug Process complete :( Same link error as JazzieB got above. |
| ||
Mac users. Remeber to download the fmod lib from fmod.org Sveinung |
| ||
Graphics 300,150,0 FSOUND_Init(22000,256,0) music = FSOUND_Sample_Load(1,"dreams_inc.mp3",0,0,0) FSOUND_PlaySound(1,music) Repeat Cls() DrawText(FSOUND_IsPlaying(1),10,20) If KeyHit(KEY_SPACE) ll=1-ll If ll=1 Then FSOUND_StopSound(1) If ll=0 Then FSOUND_PlaySound(1,music) EndIf Flip() Until KeyHit(KEY_ESCAPE) Or id=259 FSOUND_StopSound(1) fsound_Close() End isn't working |
| ||
Hehe...a little bug But here is the workaround Make a base value for the channel. That works Sveinung |
| ||
Sveinung, have you found a way how one can incbin the fmod.dll and still use it? |
| ||
I found that in order to do this you must have an exe that depack your dll and your main exe, then runs your main exe. Not what you wanted, I know :( Sveinung |
| ||
Ouch... now that's ugly.. :( I thought BMX was advanced in these issues. Hopefully we will get some native mp3/mod support as it was in bp/b3d. These workarounds are pure pain (tm)... |
| ||
Anyone got this running on an intel mac? |
| ||
well I cooked up a fmod sample. VERY crappy I think.Framework brl.glmax2d Import Pub.Fmod Import Brl.Blitz Import Brl.System Import Pub.Win32 ?Win32 'Import "mp.o" ? Extern "win32" ' Crazy WinAPI stuff Function GetActiveWindow%() End Extern AppTitle$ = "Mp3 Player triforce guardian" Graphics 800,200,0,60 SetGraphicsDriver GLMax2DDriver() Global Volume = 300 Global Mode = FSOUND_Streamable Global hWnd% = GetActiveWindow() ' Save current Window handle enableMinimize( hwnd% ) enableMaximize( hwnd% ) FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND) FSOUND_Init(44100, 32, FSOUND_INIT_DSOUND_HRTF_FULL) FSOUND_Stream_SetBufferSize(2000) FSOUND_SetDriver(2) While Not (KeyHit(Key_Escape) Or AppTerminate()) If KeyHit(Key_Space) FSOUND_Stream_Stop(oggStream) filter$="Music Files: mp3;All Files:*" filename$=RequestFile( "Select a music file to open =]",filter$ ) oggStream:Int = FSOUND_Stream_Open( filename.ToCString(), Mode, 0, 0 ) FSOUND_SetSFXMasterVolume(Volume) FSOUND_Stream_Play(FSOUND_FREE, oggStream) Else EndIf Cls SetColor 60,100,200 If oggStream = Null Then DrawText "This is a MP3 player by Triforce Guardian",0,0 DrawText "No Song Is Playing Please hit space to load your song",0,10 DrawText "This may have poped up because your song has just ended.",0,30 Else FSOUND_SetSFXMasterVolume(Volume) If KeyHit(Key_Up) Then Volume:+10 If KeyHit(Key_Down) Then Volume:-10 If KeyHit(Key_S) Then FSOUND_Stream_Stop(oggStream) If KeyHit(Key_R) Then Mode = FSOUND_LOOP_NORMAL If KeyHit(Key_E) Then Mode = FSOUND_STREAMABLE If KeyHit(Key_A) Then FSOUND_Stream_Play(FSOUND_FREE,oggStream) If Mode = FSOUND_LOOP_NORMAL Then DrawText "Repeat is on!",0,165 If Mode = FSOUND_STREAMBABLE Then DrawText "Repeat is off!",0,165 DrawText "This is a MP3 player by Triforce Guardian",0,0 DrawText "Currently Playing: "+Filename,0,20 DrawText "Memory Used(KB): "+GCMemAlloced(),0,40 DrawText "CPU used: "+FSOUND_GetCPUUsage(),0,50 DrawText "Song Length: "+(FSOUND_Stream_GetTime(oggStream)/1000)+" / "+FSOUND_Stream_GetLengthMs(oggStream)/1000,0,60 DrawText "Volume: "+Volume,0,70 DrawText "Hit 'R' to repeat. NOTE: YOU WILL NEED TO RELOAD THE SONG IN ORDER FOR IT TO WORK!!!",0,135 DrawText "Hit 'E' to disable repeat and the case is the same as above.",0,155 DrawText "Hit 'S' to stop the song, Hit 'A' to reload the song from the beginning.",0,110 DrawText "Hit 'Up' or 'Down' to control your volume.",0,120 EndIf Flip ; Cls GCCollect() Wend Function enableMaximize(hWnd:Long) ' Adds the Maximize Button "[]" Local tmp:Int = GetWindowLongA( hWnd, GWL_STYLE ) tmp = tmp | WS_MAXIMIZEBOX SetWindowLongA( hWnd, GWL_STYLE, tmp ) DrawMenuBar( hWnd ) End Function Function enableMinimize(hWnd:Long) ' Adds the Minimize Button "_" Local tmp:Long = GetWindowLongA( hWnd, GWL_STYLE ) tmp = tmp | WS_MINIMIZEBOX SetWindowLongA( hWnd,GWL_STYLE, tmp ) DrawMenuBar( hWnd ) End Function FSOUND_Close() End this should help people get an idea on how to use this EDIT: winapi was taken from a example from this forum...I forgot who made it. Just remove the winapi code if you want to modify it for mac and linux |
| ||
Add Function FSOUND_DSPCallBack(orginalbuffer:Byte Ptr,newbuffer:Byte Ptr,length:Int,param:Byte Ptr) and you got another command |
| ||
A general question: Does Fmod use less resources (Cpu/Ram) when playing files than the bmx native sound output? |
| ||
for me its about the same |
| ||
Another newbie question: Is it possible to stream ogg/mp3 files with it? So the app doesn't have to load the full file into memory at startup? |
| ||
Yes ogg/mp3's are streamable |
| ||
Could you give me a small example source code? (i.e. how to play an ogg file and make fmod to stream it) |
| ||
@Grisu You could use my streaming example from the modulepack. Streaming.bmx...;) Sveinung |
| ||
Will have a look. Didn't notice that. Thanks. *solved* |
| ||
Ahm, can I detect if a file is playing when streaming it? FSOUND_IsPlaying:Byte(channel:Int) doesn't seem to work... :( |
| ||
You are right FSOUND_IsPlaying(channel) does not return 0 or 1. I get a 8 char long number, with 0 or 1 at the end. So it do work in a strange way. Don't know why it does that. Thanks for letting me know. from earlier in the thread. |
| ||
Thanks for pointing that out. All quite confusing... :/ |
| ||
Another one from me... :/ Is it possible to display a graphical visualisation of the channels playing while streaming an ogg file. Same as in the xmplayer example. I managed to cut it down to this: Strict Framework BRL.D3D7Max2D Import BRL.Basic Import BRL.System Import Pub.Fmod Incbin "an-path.xm" Const GFX_WIDTH = 1024, GFX_HEIGHT = 768, BIT_DEPTH = 32, HERTZ = 60 Graphics GFX_WIDTH, GFX_HEIGHT, BIT_DEPTH SeedRnd MilliSecs() FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND); FSOUND_SetDriver(0) If Not FSOUND_Init(44100, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH) Print "error" End If Global Left_:Float, Right_:Float Global xmPtr:Byte Ptr = IncbinPtr("an-path.xm") Global Mod_=fmusic_loadsongex(xmPtr, 0, IncbinLen("an-path.xm"), FSOUND_LOADMEMORY, Null,0) FMUSIC_PlaySong(Mod_); Repeat Cls For Local i:Int = 0 To FSOUND_GetChannelsPlaying()-1 SetColor (i*32,i*16,(128)+i*2) FSOUND_GetCurrentLevels(i,Varptr(left_),Varptr(right_)) DrawRect 180+(12*i),100,4,-(left_*130.0) DrawRect 180+(12*i)+6,100,4,-(right_*130.0) Next SetBlend ALPHABLEND SetColor 255, 255, 255 DrawText "Usage: " + GCMemAlloced() / 1024 + "MB ", 10, 60 DrawRect 180,105,180+340,1 Flip Until KeyDown(KEY_ESCAPE) Or MouseHit(1) Or AppTerminate() My problem, I need to have such an output field while streaming! random ogg's from the hdd. Any hints? |
| ||
Yes it's possible. You can use the spectrum. Check out the xmplayer example, there you will see how it's setup. regards Sveinung |
| ||
Thanks, I was completely on the wrong track with counting channels... :) |
| ||
I've noticed that with all the examples, when compiled and run as a stand-alone program (without the IDE), the black console window opens along with the main app, even if there is no output sent to the console. Is it something I am doing wrong? Has anyone made a Windowed GUI app using FMOD that doesn't cause the console to open along with it? If this is something that "just happens" with FMOD, then it's a showkiller for me. |
| ||
Inside the bmx gui enable "build" -> "build GUI APP" and they're gone. |
| ||
Me again. Can someone change the module structure, so that fmod is only included when I use a framework for it and not by default? What I dislike is that now every app without a framework needs the fmod.dll inside the folder! I'd like to test a simple "hello world" => compile error, fmod.dll not found?!? This is highly annoying! |
| ||
Anyone had a look at Fmod EX 4.04? The features list is impressive ... |
| ||
You can put the fmod.dll in your system32 folder and you won't need it to test small apps. Just make sure you include it in final builds, obviously. BUT, what I REALLY want to know is, does it work on a Mac yet? |
| ||
@LAB The FMod BM module hasn't been that popular, so you may have to do that your self. Sorry! I have started on this, so if you want what I got I can send it to you. Cheers Sveinung |
| ||
I'm going to work on FMOD ex...or at least attempt =P. |
| ||
Good luck! looking forward to try it :) Sveinung |
| ||
JazzieB, Fraid not. Fmod worked on the mac back in BM1.14 but since then it has stopped. I would be more than happy to test if you can provide instructions. Here is a mac fmod wiki page I wrote: http://blitzwiki.org/index.php/Fmod_%28Mac_Os_X_only%29 We need to chase people who ported it previously. Mystik and Nomen luni both got it working previously. Nomen luni/Mystik fancy compiling and testing it under BlitzMax 1.20 ? Please post to this thread if interested:http://blitzbasic.com/Community/posts.php?topic=57975 |
| ||
Hello again. I'm using stream_play for playing ogg files. FSOUND_Stream_Play(1,shorttrailer) I'd love having a small player panel. Does someone know how I can get: 1. the total length of the ogg file in h:mins:seconds? 2. the current playtime ^ 3. and how to jump inside the stream (forward / backwards)? Thanks. There are Function FSOUND_Stream_GetPosition:Int(stream:Int) Function FSOUND_Stream_SetPosition:Int(stream:Int) for instance, but I don't understand how to use them without crashing. |
| ||
Found Fmod3_74_BlitzMax.rar, but is this for win32 only? Cant find the linux version, since the first post is broken. |
| ||
I've looked at the win32 FMOD module source code and it might work with linux. I'm not sure of it but it wouldn't hurt to give it a shot. EDIT: Grisu (Posted 2 days ago) Hello again. I'm using stream_play for playing ogg files. FSOUND_Stream_Play(1,shorttrailer) There are Function FSOUND_Stream_GetPosition:Int(stream:Int) Function FSOUND_Stream_SetPosition:Int(stream:Int) for instance, but I don't understand how to use them without crashing. I'll try and see if I can get that to work. Also, it's FSOUND_Stream_SetPosition:Int(stream:Int,Position:Int). |
| ||
If you download the 3.75 zip file. That works... at least with ubuntu 6.06. :) Regards Sveinung |
| ||
@Triforce: Thanks a lot for looking into this! |
| ||
^^Any luck so far? |
| ||
@Grisu: You should check what you're doing, I don't crash. case butn[1] pos = FSOUND_Stream_GetPosition(stream) pos:+ 3211 FSOUND_Stream_SetPosition(stream,pos) |
| ||
My problem is that I want to create a MagGUI winamp like slider, so that the user can "jump" around while playing a file. But I can't get the slider accurate and at the end of a track the system complete breaks down. My Function to transform the length into "h:m:s" or "m:s" Function Get_TrailerTime:String(Length:Long,show_hour:Byte) ' show_hour = 00:00:00 or 00:00 digit format Local minutes:Int=0, hours:Int=0, seconds:Int=0 Local minstr:String="", hourstr:String="", secondstr:String="" Local timestring:String length=length/1000 ' Seconds only If show_hour=0 Then minutes=length/60 If minutes < 10 Then minstr="0"+String(minutes) Else minstr=String(minutes) seconds=length-minutes*60 If seconds < 10 Then secondstr="0"+String(seconds) Else secondstr=String(seconds) timestring=minstr+":"+secondstr Else hours=length/60/60 If hours < 10 Then hourstr="0"+String(hours) Else hourstr=String(hours) minutes=(length/60)-(hours*60) If minutes < 10 Then minstr="0"+String(minutes) Else minstr=String(minutes) seconds=length-(hours*60+minutes)*60 If seconds < 10 Then secondstr="0"+String(seconds) Else secondstr=String(seconds) timestring=hourstr+":"+minstr+":"+secondstr EndIf Return timestring End Function StartPlay function: Function Play_TrailerNOW() TrailerSliderReset=0 FSOUND_Stream_Close(shorttrailer) Local spec:Byte Ptr = FSOUND_DSP_GetSpectrum() Select cfg_dfamode Case 0 shorttrailer=FSOUND_Stream_Open("Trailer/"+MyArray[Current_Folge].trailer,0,0,0) Case 1 shorttrailer=FSOUND_Stream_Open("Trailer/"+MyKidsArray[Current_Folge].trailer,0,0,0) End Select Local length:Long=FSOUND_Stream_GetLengthMS(shorttrailer) TrailerLength:Long=FSOUND_Stream_GetLength(shorttrailer)/8442-1 If length < 3600000 Then TrailerMaxtime:String=Get_TrailerTime(length,0) show_hour=False Else TrailerMaxtime:String=Get_TrailerTime(length,1) show_hour=True EndIf Select cfg_dfamode Case 0 SetGadgetText (TrailerLabel," Trailer: "+Mid(MyArray[Current_Folge].name,10,Len(MyArray[Current_Folge].name))) Case 1 SetGadgetText (TrailerLabel," Trailer: "+Mid(MyKidsArray[Current_Folge].name,10,Len(MyKidsArray[Current_Folge].name))) End Select SetSliderRange TrailerPosSlider:TGadget,1,(FSOUND_Stream_GetLength(shorttrailer)/8442) FSOUND_Stream_Play(1,shorttrailer) FSOUND_SetSFXMasterVolume(cfg_volume) snd_startplay=False End Function |
| ||
Here's a tip, use FSOUND_MPEGACCURATE. Your code seems OK to me, but I'll toy around with it and see what I can do. |
| ||
It seems like one second is missing with all my ogg-files (from my time output). FSOUND_MPEGACCURATE doesn't help. Was worth a try. |
| ||
You sure you used FSOUND_MPEGACCURATE correctly? Psuedo Code. music=FSOUND_Stream_Open(song.ToCString(),FSOUND_MPEGACCURATE, 0, 0) hmm.. I believe thats what you did wrong. But prehaps it's a problem within FMOD, which I highly doubt. |
| ||
It's mostly bug called user error... ;) Think I have it now. I switched from real positions to positions given in millisecs and it works fine. Though I have some other issues: 1. Is it possible to pause and resume a streamed file? Couldn't find functions for that under stream. Need that for doíng a "pause" button. 2. I currently use a SCROLLBAR for displaying the "progress". As I dislike having "arrows" at both ends: Do you know a way how I could use a TRACKBAR or other slidertype instead? A TRACKBAR looks cooler for the purpose, but I have to "shrink" it somehow to fit into 180 pixel width on my panel. To put it short: I need a SLIDER_TRACKBAR with a proportional size knob. |
| ||
Well.... you can use a canvas or an progress bar. I've got pause to work with FSOUND_Stream. It's simple really... I'll post some pseudo code.Case file_pause pause = true FSOUND_SetPaused(FSOUND_ALL,pause) If pause = True pause = False FSOUND_GetPaused(FSOUND_ALL) FSOUND_SetPaused(FSOUND_ALL,pause) endif There ya go =P. Simple pause code. |
| ||
Thanks for the bit of code. Will test it asap and report back. Slowly my player looks like one.. :) ![]() I have tried using a canvas already, but due to the fact that the scale has to be proportional my code didn't work out well so far. |
| ||
It's so simple if you know how:If trailerpaused=False Then trailerpaused=True FSOUND_SetPaused(FSOUND_ALL,trailerpaused) Else trailerpaused=False FSOUND_GetPaused(FSOUND_ALL) FSOUND_SetPaused(FSOUND_ALL,trailerpaused) EndIf Up and working... :D |
| ||
yep! You got it figured out =D. Now time to continue FMODex port. |
| ||
Hi :) I'm trying to make some spectrum analyser test with FMOD but this example seem don't work correctly ? :) any idea ? :) |
| ||
With the module, there are a few examples within the ZIP file. modDemo.bmx, and XMPlayer.BMX has a spectrum analyzer. |
| ||
yes but it work only for mods ! whith mp3 you need to use another commands |
| ||
@Fliax: Just call 0800-Grisu... :))))))))))))) Function Call_0800_Grisu() Local spec:Byte Ptr= FSOUND_DSP_GetSpectrum() Local bnk:TBank =Null bnk:TBank = CreateStaticBank(spec,512*4) SetBlend Alphablend SetAlpha 0.6 For Local x:Int=0 To 253 'Step 2 Local yp:Int=(PeekFloat(bnk,x*4)*500) SetColor (x/8*32,x/8*16,(128)+x/8*2) yp=yp*4 If yp>60 Then yp=60 DrawLine 40+x,274+60-yp,40+x,274+60 Next SetAlpha 1.0 SetColor 255,255,255 End Function |
| ||
Yeahh !! that cool :) many thanks ! |
| ||
still nobdy got the Mac version working? |
| ||
still nobdy got the Mac version working? I'm beginning to think nobody is ever going to answer that one, becauae I've asked it in this thread somewhere, plus another couple of threads I started specifically to answer this question and the last answer I got was "it broke from v1.14 of BlitzMax". If the answer is yes, then I will go through all the trouble of re-installing all the libs and stuff, and then ask questions when something doesn't work right. I don't want to do all this only to later find that it still hasn't been fixed. So, somebody please, does it now work on the Mac? If so, how do we install it, as it's a bit different to Windows? |
| ||
Sorry...Don't have a Mac. Sveinung |
| ||
How about someone with a mac giving Sveinung or someone access to a mac via vnc ? Who has a mac , broadband connection and is willing ? |
| ||
Perhaps someone can even donate an old mac for testing purposes? ;) I only have a PC, sorry. |
| ||
How can i load a module from a bank? (not incbin) Is there anyone with a little code? Only load a *mod to a Bank and give it with a pointer to LoadSongEx.(so what i want to do is play a mod from the memory. thanks. |
| ||
Here you go.... Sveinung |
| ||
thx Sveinung. That is exactly what i need. :) bye |
| ||
does fmod allow real time (or modestly redarded) spectral analysis of microphone input? and if yes, can someone help with hints? (I understand that any subsequent graphical display of frequencies is on the programmer's side) thank you allos |
| ||
@allos Yes i does. I'll make a demo...just need to get hold off a mic :) Sveinung |
| ||
How do you get the fmod source? |
| ||
FMod is a comercial product, so I don't think they will give you the source. Sveinung |
| ||
Sveinung is probably right... ;) |
| ||
Will Fmod still be updated? Or is 3.75 the final release? |
| ||
I will try to keep it updated. But it will only be the 3.xx. I've looked at the version 4, but I do not have time for that just now. I still have the 3.75 doc to write :( Sveinung |
| ||
For XM only play, use uFMOD http://ufmod.sf.net The problem is to find a tracker... |
| ||
You can use Skale Tracker Sveinung |
| ||
Perhaps someone can even donate an old mac for testing purposes? ;) I only have a PC, sorry. I heard there's an OSX version that's intel based (x86), any news on that? |
| ||
Heres the text to append to the commands.txt in docmods to make the fmod module appear as proper functions with quick help and detailed help. I dont know if it is a copyright infringment, it shouldnt be, as this is just meant for learning etc. You need to get the help htmls from fmod website and put them into the correct place indicated in the text below.(If there is an official way to add commands for highlighting/quickhelp etc, please tell me). Thanks Marc Specter FMUSIC_PlaySong:Byte(Mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_PlaySong.html FMUSIC_FreeSong:Byte(Module_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_FreeSong.html FMUSIC_LoadSong:Int(Name:Byte Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_LoadSong.html FMUSIC_LoadSongEx:Int(Name:Byte Ptr,offset:Int,length:Int,mode:Int,samplelist:Int Ptr,samplelistnum:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_LoadSongEx.html FMUSIC_OptimizeChannels:Byte(Module_:Int,Maxchannels:Int,minvolume:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_OptimizeChannels.html FMUSIC_PlaySong:Byte(Mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_PlaySong.html FMUSIC_SetInstCallback:Byte(Modul:Int,callback:Int,instrument:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetInstCallback.html FMUSIC_SetLooping:Byte(Mod_:Int,Looping:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetLooping.html FMUSIC_SetMasterSpeed:Byte(Mod_:Int,Speed:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetMasterSpeed.html FMUSIC_SetMasterVolume:Byte(Mod_:Int,Volume:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetMasterVolume.html FMUSIC_SetOrder:Byte(Mod_:Int,Order:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetOrder.html FMUSIC_SetOrderCallback:Byte(modul:Int,callback:Int,orderstep:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetOrderCallback.html FMUSIC_SetPanSeperation:Byte(Mod_:Int,Pan:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetPanSeperation.html FMUSIC_SetPaused:Byte(Mod_:Int,Pause:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetPaused.html FMUSIC_SetReverb:Byte(Mod_:Int,Pause:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetReverb.html FMUSIC_SetRowCallback:Byte(modul:Int,callback:Int,rowstep:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetRowCallback.html FMUSIC_SetSample:Byte(Mod_int,sampno:Int,sptr:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetSample.html FMUSIC_SetUserData:Byte(modul:Int,userdata:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetUserData.html FMUSIC_SetZxxCallback:Byte(modul:Int,callback:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_SetZxxCallback.html FMUSIC_StopAllSongs()|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_StopAllSongs.html FMUSIC_StopSong(Mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_StopSong.html FMUSIC_GetBPM:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetBPM.html FMUSIC_GetGlobalVolume:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetGlobalVolume.html FMUSIC_GetMasterVolume:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetMasterVolume.html FMUSIC_GetName:Byte Ptr(modul:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetName.html FMUSIC_GetNumChannels:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetNumChannels.html FMUSIC_GetNumInstruments:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetNumInstruments.html FMUSIC_GetNumOrders:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetNumOrders.html FMUSIC_GetNumPatterns:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetNumPatterns.html FMUSIC_GetNumSamples:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetNumSamples.html FMUSIC_GetOpenState:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetOpenState.html FMUSIC_GetOrder:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetOrder.html FMUSIC_GetPattern:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetPattern.html FMUSIC_GetPatternLength:Int(mod_:Int,OrderNo:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetPatternLength.html FMUSIC_GetPaused:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetPaused.html FMUSIC_GetRealChannel:Int(mod_:Int,channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetRealChannel.html FMUSIC_GetRow:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetRow.html FMUSIC_GetSample:Int(mod_:Int,SampleNo:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetSample.html FMUSIC_GetSpeed:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetSpeed.html FMUSIC_GetTime:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetTime.html FMUSIC_GetType:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetType.html FMUSIC_GetUserData:Int(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_GetUserData.html FMUSIC_IsFinished:Byte(mod_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_IsFinished.html FMUSIC_IsPlaying:Byte(mod_:Int)| /Mod/pub.mod/fmod.mod/doc/HTML/FMUSIC_IsPlaying.html FSOUND_Close()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Close.html FSOUND_File_SetCallbacks(OpenCallback:Int,CloseCallback:Int,ReadCallback:Int,SeekCallback:Int,TellCallback:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_File_SetCallbacks.html FSOUND_Init:Byte(mixrate:Int,maxsoftwarechannels:Int,flags:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Init.html FSOUND_SetDriver:Byte(Driver:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetDriver.html FSOUND_SetMaxHardwareChannels:Byte(max_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetMaxHardwareChannels.html FSOUND_SetMemorySystem:Byte(poolmem:Int Ptr,poollen:Int,useralloc:Int Ptr,userrealloc:Int Ptr,userfree:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetMemorySystem.html FSOUND_SetMinHardwareChannels:Byte(Channels:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetMinHardwareChannels.html FSOUND_SetMixer:Byte(mixer:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetMixer.html FSOUND_SetOutput:Byte(outputtype:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetOutput.html FSOUND_SetPanSeperation:Byte(pansep:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetPanSeperation.html FSOUND_SetSFXMasterVolume:Byte(Volume:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetSFXMasterVolume.html FSOUND_SetSpeakerMode:Byte(speakermode:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetSpeakerMode.html FSOUND_Update:Byte()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Update.html FSOUND_GetCPUUsage:Float()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetCPUUsage.html FSOUND_GetChannelsPlaying:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetChannelsPlaying.html FSOUND_GetDriver:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetDriver.html FSOUND_GetDriverCaps:Byte(id:Int,Caps:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetDriverCaps.html FSOUND_GetDriverName:Byte Ptr(id:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetDriverName.html FSOUND_GetError:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetError.html FSOUND_GetMaxSamples:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetMaxSamples.html FSOUND_GetMaxChannels:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetMaxChannels.html FSOUND_GetMemoryStats(currentalloced:Int Ptr,maxAlloced:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetMemoryStats.html FSOUND_GetNumDrivers:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetNumDrivers.html FSOUND_GetNumHWChannels:Int(num2d:Int Ptr,num3d:Int Ptr,total:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetNumHWChannels.html FSOUND_GetOutput:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetOutput.html FSOUND_GetOutputHandle:Byte Ptr()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetOutputHandle.html FSOUND_GetOutputRate:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetOutputRate.html FSOUND_GetSFXMasterVolume:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetSFXMasterVolume.html FSOUND_GetVersion:Float()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetVersion.html FSOUND_Sample_Alloc:Int(index:Int,length:Int,mode:Int,deffreq:Int,defvol:Int,defpan:Int,defpri:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Alloc.html FSOUND_Sample_Free(Sample:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Free.html FSOUND_Sample_Get:Byte Ptr(poolID:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Get.html FSOUND_Sample_GetDefaults:Byte(sptr:Int,deffreq:Int Ptr,defvol:Int Ptr,defpan:Int Ptr,defpri:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetDefaults.html FSOUND_Sample_GetDefaultsEx:Byte(sptr:Int,deffreq:Int Ptr,defvol:Int Ptr,defpan:Int Ptr,defpri:Int Ptr,varfreq:Int Ptr,varvol:Int Ptr,varpan:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetDefaultsEx.html FSOUND_Sample_GetLength:Int(sptr:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetLength.html FSOUND_Sample_GetLoopPoints:Byte(sptr:Int,loopstart:Int Ptr,loopend:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetLoopPoints.html FSOUND_Sample_GetMinMaxDistance:Byte(sptr:Int,min_:Float Ptr,max_:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetMinMaxDistance.html FSOUND_Sample_GetMode:Byte(sptr:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetMode.html FSOUND_Sample_GetName:Byte Ptr(sptr:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_GetName.html FSOUND_Sample_Load:Int(index:Int,filename:Byte Ptr,inputmode:Int,offset:Int,length:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Load.html FSOUND_Sample_Lock:Byte(sptr:Int,offset:Int,length:Int,ptr1:Byte Ptr,ptr2:Byte Ptr,len1:Int Ptr,len2:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Lock.html FSOUND_Sample_SetDefaults:Byte(sptr:Int,deffreq:Int Ptr,defvol:Int Ptr,defpan:Int Ptr,defpri)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_SetDefaults.html FSOUND_Sample_SetDefaultsEx:Byte(sptr:Int,deffreq:Int Ptr,defvol:Int Ptr,defpan:Int Ptr,defpri:Int Ptr,varfreq:Int Ptr,varvol:Int Ptr,varpan:Int Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_SetDefaultsEx.html FSOUND_Sample_SetMaxPlaybacks:Byte(sptr:Int,max_:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_SetMaxPlaybacks.html FSOUND_Sample_SetMinMaxDistance:Byte(sptr:Int,min_:Float,max_:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_SetMinMaxDistance.html FSOUND_Sample_SetMode:Byte(sptr:Int,mode:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_SetMode.html FSOUND_Sample_SetLoopPoints:Byte(sptr:Int,loopstart:Int,loopend:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_SetLoopPoints.html FSOUND_Sample_Unlock:Byte(sptr:Int,ptr1:Int Ptr,ptr2:Int Ptr,len1:Int,len2:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Unlock.html FSOUND_Sample_Upload:Byte(sptr:Int,srcdata:Int Ptr,mode_in:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Sample_Upload.html FSOUND_PlaySound:Int(channel:Int,sptr:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_PlaySound.html FSOUND_PlaySoundEx:Int(channel:Int,sptr:Int,dspunitLint,startpaused:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_PlaySoundEx.html FSOUND_StopSound:Byte(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_StopSound.html FSOUND_SetFrequency:Byte(channel:Int,Freq:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetFrequency.html FSOUND_SetLevels:Byte(channel:Int,frontleft:Int,center:Int,frontright:Int,backleft:Int,backright:Int,lfe:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetLevels.html FSOUND_SetLoopMode:Byte(channel:Int,loopmode:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetLoopMode.html FSOUND_SetMute:Byte(channel:Int,Mute:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetMute.html FSOUND_SetPan:Byte(channel:Int,Pan:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetPan.html FSOUND_SetPaused:Byte(channel:Int,Pause:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetPaused.html FSOUND_SetPriority:Byte(channel:Int,Priority:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetPriority.html FSOUND_SetReserved:Byte(channel:Int,Reserved:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetReserved.html FSOUND_SetSurround:Byte(channel:Int,Surround:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetSurround.html FSOUND_SetVolume:Byte(channel:Int,Volume :Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetVolume.html FSOUND_SetVolumeAbsolute:Byte(channel:Int,Volume :Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetVolumeAbsolute.html FSOUND_GetVolume:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetVolume.html FSOUND_GetAmplitude:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetAmplitude.html FSOUND_3D_SetAttributes:Byte(channel:Int,pos:Float Ptr,vel:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_SetAttributes.html FSOUND_3D_SetMinMaxDistance:Byte(channel:Int,min_:Float,max_:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_SetMinMaxDistance.html FSOUND_SetCurrentPosition:Byte(channel:Int,pos:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_SetCurrentPosition.html FSOUND_GetCurrentPosition:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetCurrentPosition.html FSOUND_GetCurrentSample:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetCurrentSample.html FSOUND_GetCurrentLevels:Byte(channel:Int,l:Float Ptr,r:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetCurrentLevels.html FSOUND_GetFrequency:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetFrequency.html FSOUND_GetLoopMode:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetLoopMode.html FSOUND_GetMixer:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetMixer.html FSOUND_GetMute:Byte(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetMute.html FSOUND_GetNumSubChannels:Int(channels:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetNumSubChannels.html FSOUND_GetPan:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetPan.html FSOUND_GetPaused:Byte(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetPaused.html FSOUND_GetPriority:Int(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetPriority.html FSOUND_GetReserved:Byte(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetReserved.html FSOUND_GetSubChannel:Int(channels:Int,subchannels:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetSubChannel.html FSOUND_GetSurround:Byte(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_GetSurround.html FSOUND_IsPlaying:Byte(channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_IsPlaying.html FSOUND_3D_GetAttributes:Byte(channel:Int,pos:Float Ptr,vel:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_GetAttributes.html FSOUND_3D_GetMinMaxDistance:Byte(channel:Int,min_:Float Ptr,max_:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_GetMinMaxDistance.html FSOUND_3D_Listener_GetAttributes:Byte(pos:Float Ptr,vel:Float Ptr,fx:Float Ptr,fy:Float Ptr,fz:Float Ptr,tx:Float Ptr,ty:Float Ptr,tz:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_Listener_GetAttributes.html FSOUND_3D_Listener_SetAttributes:Byte(pos:Float Ptr,vel:Float Ptr,fx:Float Ptr,fy:Float Ptr,fz:Float Ptr,tx:Float Ptr,ty:Float Ptr,tz:Float Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_Listener_SetAttributes.html FSOUND_3D_Listener_SetCurrent:Byte(current:Int ,numlisteners:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_Listener_SetCurrent.html FSOUND_3D_SetDistanceFactor(Factor:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_SetDistanceFactor.html FSOUND_3D_SetDropplerFactor(Distance:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_SetDropplerFactor.html FSOUND_3D_SetRolloffFactor(Factor:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_3D_SetRolloffFactor.html FSOUND_Stream_AddSyncPoint:Byte(stream:Int,pcmoffset:Int,name:Byte Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_AddSyncPoint.html FSOUND_Stream_Close:Byte(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Close.html FSOUND_Stream_Create:Byte(callback:Int,lenbytes:Int,mode:Int,samplerate:Int,userdate:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Create.html FSOUND_Stream_CreateDSP:Byte(stream:Int,callback:Int,priority:Int,param:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_CreateDSP.html FSOUND_Stream_DeleteSyncPoint:Byte(point:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_DeleteSyncPoint.html FSOUND_Stream_FindTagField:Byte(stream:Int,ttype:Int,name:String,value:Int,lenght:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_FindTagField.html FSOUND_Stream_GetLength:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetLength.html FSOUND_Stream_GetLengthMs:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetLengthMs.html FSOUND_Stream_GetMode(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetMode.html FSOUND_Stream_GetNumSubStreams:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetNumSubStreams.html FSOUND_Stream_GetNumSyncPoints:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetNumSyncPoints.html FSOUND_Stream_GetNumTagFields:Byte(stream:Int,num:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetNumTagFields.html FSOUND_Stream_GetOpenState:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetOpenState.html FSOUND_Stream_GetPosition:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetPosition.html FSOUND_Stream_GetSample:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetSample.html FSOUND_Stream_GetSyncPoint:Int(stream:Int,index:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetSyncPoint.html FSOUND_Stream_GetSyncPointInfo:Int(point:Int,pcmoffset:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetSyncPointInfo.html FSOUND_Stream_GetTagField:Byte(stream:Int,ttype:Int,name:Byte Ptr,value:Int,lenght:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetTagField.html FSOUND_Stream_GetTime:Int(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_GetTime.html FSOUND_Stream_Net_GetBufferProperties:Byte(buffersize:Int,prebuffer_percent:Int,rebuffer_percent:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Net_GetBufferProperties.html FSOUND_Stream_Net_GetLastServerStatus:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Net_GetLastServerStatus.html FSOUND_Stream_Net_GetStatus:Byte(stream:Int,status:Int,bufferused:Int,bitrate:Int,flags:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Net_GetStatus.html FSOUND_Stream_Net_SetBufferProperties:Byte(buffersize:Int,prebuffer_percent:Int,rebuffer_precent:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Net_SetBufferProperties.html FSOUND_Stream_Net_SetMetadataCallback:Byte(stream:Int,callback:Int,userdata:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Net_SetMetadataCallback.html FSOUND_Stream_Net_SetProxy:Byte(proxy:Byte Ptr)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Net_SetProxy.html FSOUND_Stream_Open:Int(name_or_data:Byte Ptr,mode:Int,offset:Int,lenght:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Open.html FSOUND_Stream_Play:Int(channel:Int,stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Play.html FSOUND_Stream_PlayEx:Int(channel:Int,stream:Int,dspunit:Int,paused:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_PlayEx.html FSOUND_Stream_SetBufferSize:Byte(ms:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetBufferSize.html FSOUND_Stream_SetEndCallback:Byte(stream:Int,callback:Int,userdata:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetEndCallback.html FSOUND_Stream_SetLoopCount:Byte(stream:Int,count:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetLoopCount.html FSOUND_Stream_SetLoopPoints:Byte(stream:Int,loopstart:Int,loopend:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetLoopPoints.html FSOUND_Stream_SetMode:Byte(stream:Int,mode:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetMode.html FSOUND_Stream_SetPosition:Byte(stream:Int,position:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetPosition.html FSOUND_Stream_SetSubStream:Byte(stream:Int,index:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetSubStream.html FSOUND_Stream_SetSubStreamSentence:Byte(stream:Int,sentencelist:Int,numitems:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetSubStreamSentence.html FSOUND_Stream_SetSyncCallback:Byte(stream:Int,callback:Int,userdata:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetSyncCallback.html FSOUND_Stream_SetTime:Byte(stream:Int,ms:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_SetTime.html FSOUND_Stream_Stop:Byte(stream:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Stream_Stop.html FSOUND_CD_GetNumTracks:Int(drive:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_GetNumTracks.html FSOUND_CD_GetPaused:Byte(drive:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_GetPaused.html FSOUND_CD_GetTrack:Int(drive:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_GetTrack.html FSOUND_CD_GetTrackLength:Int(drive:Int,track:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_GetTrackLength.html FSOUND_CD_GetTrackTime:Int(drive:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_GetTrackTime.html FSOUND_CD_OpenTray:Byte(drive:Int,open:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_OpenTray.html FSOUND_CD_Play:Byte(drive:Int,track:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_Play.html FSOUND_CD_SetPaused:Byte(drive:Int,paused:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_SetPaused.html FSOUND_CD_SetPlayMode(drive:Int,mode:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_SetPlayMode.html FSOUND_CD_SetTrackTime:Byte(drive:Int,ms:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_SetTrackTime.html FSOUND_CD_SetVolume:Byte(drive:Int,volume:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_SetVolume.html FSOUND_CD_Stop:Byte(drive:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_CD_Stop.html FSOUND_DSP_ClearMixBuffer()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_ClearMixBuffer.html FSOUND_DSP_Create:Int(callback:Int,priority:Int,param:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_Create.html FSOUND_DSP_Free(unit:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_Free.html FSOUND_DSP_SetActive(unti:Int,active:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_SetActive.html FSOUND_DSP_GetActive:Byte(unit:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetActive.html FSOUND_DSP_GetBufferLength:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetBufferLength.html FSOUND_DSP_GetBufferLengthTotal:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetBufferLengthTotal.html FSOUND_DSP_SetPriority(unit:Int,priority:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_SetPriority.html FSOUND_DSP_GetPriority:Int(unit:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetPriority.html FSOUND_DSP_GetClearUnit:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetClearUnit.html FSOUND_DSP_GetClipAndCopyUnit:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetClipAndCopyUnit.html FSOUND_DSP_GetMusicUnit:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetMusicUnit.html FSOUND_DSP_GetSFXUnit:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetSFXUnit.html FSOUND_DSP_GetFFTUnit:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetFFTUnit.html FSOUND_DSP_GetSpectrum:Byte Ptr()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_GetSpectrum.html FSOUND_DSP_MixBuffers:Byte(destbuffer:Int,srcbuffer:Int,le:Int,freq:Int,vol:Int,pan:Int,mode:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_DSP_MixBuffers.html FSOUND_FX_Disable:Byte(Channel:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_Disable.html FSOUND_FX_Enable:Int(channel:Int,fxtype:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_Enable.html FSOUND_FX_SetChorus:Byte(fxid:Int,wetdrymix:Float,depth:Float,feedback:Float,frequency:Int,waveform:Int,Delay:Float,phase:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetChorus.html FSOUND_FX_SetCompressor:Byte(fxid:Int,gain:Float,attack:Float,Releas:Float,threshold:Float,ratio:Float,predelay:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetCompressor.html FSOUND_FX_SetDistortion:Byte(fxid:Int,gain:Float,edge:Float,posteqcenterfrequency:Float,posteqbandwidth:Float,prelowpasscutoff:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetDistortion.html FSOUND_FX_SetEcho:Byte(fxid:Int,wetdrymix:Float,feedback:Float,leftback:Float,rightdelay:Float,pandelay:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetEcho.html FSOUND_FX_SetFlanger:Byte(fxid:Int,wetdrymix:Float,depth:Float,feedback:Float,frequency:Float,waveform:Int,DDelay:Float,phase:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetFlanger.html FSOUND_FX_SetGargle:Byte(fxid:Int,ratehz:Int,waveshape:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetGargle.html FSOUND_FX_SetI3DL2Reverb:Byte(fxid:Int,room:Int,roomhf:Int,roomrollofffactor:Float,dectime:Float,dechfratio:Float,ref:Int,refdelay:Float,reverb:Int,revdelay:Float,diff:Float,dens:Float,hfref:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetI3DL2Reverb.html FSOUND_FX_SetParamEQ:Byte(fxid:Int,center:Float,bandwidth:Float,gain:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetParamEQ.html FSOUND_FX_SetWavesReverb:Byte(fxid:Int,ingain:Float,reverbmix:Float,reverbtime:Float,hfreqrtration:Float)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_FX_SetWavesReverb.html FSOUND_Record_GetDriver:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetDriver.html FSOUND_Record_GetDriverName:Int(id:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetDriverName.html FSOUND_Record_GetNumDrivers:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetNumDrivers.html FSOUND_Record_GetPosition:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetPosition.html FSOUND_Record_SetDriver:Byte(driver:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_SetDriver.html FSOUND_Record_StartSample:Byte(sptr:Int,loop:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_StartSample.html FSOUND_Record_Stop:Byte()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_Stop.html FSOUND_Reverb_SetProperties:Byte(props:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_SetProperties.html FSOUND_Reverb_GetProperties:Byte(props:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_GetProperties.html FSOUND_Reverb_SetChannelProperties:Byte(channel:Int,prop:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_SetChannelProperties.html FSOUND_Reverb_GetChannelProperties:Byte(channel:Int,prop:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_GetChannelProperties.html od/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetDriver.html FSOUND_Record_GetDriverName:Int(id:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetDriverName.html FSOUND_Record_GetNumDrivers:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetNumDrivers.html FSOUND_Record_GetPosition:Int()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_GetPosition.html FSOUND_Record_SetDriver:Byte(driver:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_SetDriver.html FSOUND_Record_StartSample:Byte(sptr:Int,loop:Byte)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_StartSample.html FSOUND_Record_Stop:Byte()|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Record_Stop.html FSOUND_Reverb_SetProperties:Byte(props:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_SetProperties.html FSOUND_Reverb_GetProperties:Byte(props:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_GetProperties.html FSOUND_Reverb_SetChannelProperties:Byte(channel:Int,prop:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_SetChannelProperties.html FSOUND_Reverb_GetChannelProperties:Byte(channel:Int,prop:Int)|/Mod/pub.mod/fmod.mod/doc/HTML/FSOUND_Reverb_GetChannelProperties.html |
| ||
do you have to have the fmod lib for the code to work? |
| ||
http://www.sherrox.com/fmod_3_75_module.zip is down. has anybody the File? [EDIT] it is online again. |
| ||
Is not down....just a little powerfailure. :D Sveinung |
| ||
Got this when I tried to build: I know I need to put the lib/dll somewhere, just, where? |
| ||
nevermind, figured it out! Stupid me, all I had to do was put it in the lib directory :P |
| ||
I've just created the beginning of what I believe to be a useful module. Basically, it provides a much easier to use interface for FMod that is ideal for developing video games. You get the amazing sound quality of FMod, and pretty damn close to the simplicity of use that you get with BlitzMax native sound. I mean really, check it out. I'm kinda proud. :D Music Example: Audio Sample Example: |
| ||
I'm kinda proud. :D You should be :D Sveinung |
| ||
Check out this bad-boy! Can now handle panning and frequency in a pinch! 8) |
| ||
Has anyone experimented the 3D sound functions in fmod 3.75? Seems most of the improvements of fmod 4/EX are focused on this feature. How does it compare to OpenAL or Bass? |
| ||
Which leads to the question... will there be ever fmod4.0 support... ;) |
| ||
FMod is higher sound quality, but OpenAL is much easier to use, especially the 3D sound and special effects, so it's a bit of a toss up. I'm using OpenAL at the moment, because of it's ease of use, and because it supports all the effects and features I want. But FMod has more features, for you uber-developers out there. |
| ||
Is there an OpenAL mod? (and some example?) The only one I could find has been released 3 days ago by vertex and there is only one "minimal" example. Thanks |
| ||
That was the mod I was talking about. If you want more examples, (that you'll have to port unfortunately,) you should download the OpenAL SDK. |
| ||
I installed Max 1.24 and FMod broke. I tried to replace the DLL with 3.75 and the Fmod.mod directory; but I get the following error: Compile Error: Identifier 'FSOUND_SetOutput' not found What am I doing wrong? Thanks EDIT: I think I got it to work, I forgot to replace the lib. |
| ||
The link at the top of the page for FMod Windows seems to be broken? where can I find the latest release of the library? Thanks. |
| ||
Here Regards Sveinung |
| ||
Thanks |
| ||
Hi guys... I have followed the setup procedures but my program still won't recognise any of the fmod commands. I think the problem is that it won't build fmod... at least there are no files apart from the max file in libfmod directory after i rebuild modules. Any ideas what the prob could be? |
| ||
My bad - for some reason MaxGUI won't build and this caused the process to bomb before it got to fmod. Ripping MaxGUI out for the time being solved the prob. |
| ||
Check it out. I've created a simple multi-track streaming class that can do ram, file, and network streams. Have a look. :) Should be self explanitory enough. See what you can do with it! ;) |
| ||
Does anyone know how to work the reverb stuff? I'd like to include it in my game. |
| ||
Hey, trying to get this working on Linux (Ubuntu, I read further up that it works), but Im stupid so am struggling. Fresh install of Blitzmax, copied fmod.mod (3.75) to pub.mod, quick build turned off, build modules, but when i try to compile my program I get...Building modDemo Compiling:modDemo.bmx flat assembler version 1.64 3 passes, 6366 bytes. Linking:modDemo /usr/bin/ld: cannot find -lfmod-3.74.1 collect2: ld returned 1 exit status Build Error: Failed to link /home/chris/Fmod/Samples/modDemo Process complete Is it wierd it talks about 3.74? Should I be expecting a linux equiv of fmod.dll? Anyone? ta! :) |
| ||
Have you downloaded the lib from fmod.org? The lib in the zip is for win32. I have not tested this mod on Linux. I can make some test next week if you need help. Sveinung |
| ||
Hey thanks for the reply. I don't think I've downloaded the lib, but then again I am not entirely sure what I am doing here. I've had a look through the fmod downloads but can't really see what I need "Linux users - link with libfmod-3.75.so (i.e. gcc file.c -lfmod-3.75)" looks like the biggest clue but again, im stupid and dont really know what that means ;) Thanks |
| ||
Just to clarify everything I've done... $ wget http://www.fmod.org/files/fmodapi375linux.tar.gz $ tar -xvzf fmodapi375linux.tar.gz # cp fmodapi375linux/api/libfmod-3.75.so /usr/lib/libfmod.so downloaded http://www.sherrox.com/fmod_3_75_module.zip and copied fmod.mod to pub.mod opened (a fresh install of) blitzmax updated to 1.24, Build Modules, tried compiling the program and thats when i get the error. EDIT> Good lord I think I got it working :o |
| ||
Hello guys, the mod sounds really nice and I'd like to try this mod, but hmm I do not even know how to build modules XD They are unselectable (the option is in grey). If I try the hot key (Ctrl+D) it tries to build blitz_app.c even if the fmod.bmx has the focus. Anyway, how do I build modules :/ I got my files from the above link. |
| ||
Sorry for asking a repetitive question, but what's the status of this module for using FMod 3.75 on Macs with BMax 1.24? The last direct mention of this was 7 months ago by JazzieB... I'm probably being blind or stupid (or perhaps both), but after trying out most of the tips and instructions in this thread, between myself and a friend of mine who is helping with Mac porting, we still can't get FMod to work on OSX. Sadly neither of us are able to do the required work ourselves. Any advice would be much appreciated! |
| ||
My problem is that I don't have a Mac. I'll try to lend me one. Sveinung |
| ||
I have an intel mac if I can be of assistance. |
| ||
@DannyD Just bought me a mac. But if you can help me debug...most appreciated :D Sveinung |
| ||
Great news! I'm cheering both of you on from the sidelines... :) |
| ||
Has anyone ran extensive Fmod tests on win98/ME/2000/XP/Vista to check that it works well on them all in BMax? What's the status of the module? Do you need to use special commands or has it been made to work like the standard BlitzMax commands? Thanks. |
| ||
E:/BlitzMax/bin/ld.exe: cannot find E:/BlitzMax/mod/pub.mod/fmod.mod/fmod.debug.win32.x86.a whats ths? |
| ||
That means you haven't built the module yet. Build modules and try again. |
| ||
Building Modules Compiling:blitz_app.c Build Error: failed to compile E:/BlitzMax/mod/brl.mod/blitz.mod/blitz_app.c Process complete i have to press CTRL+D cos the menu isn't hilighting! |
| ||
Lots of hits all pointing to this . If you're using Vista then you might need this The search function is really good. |
| ||
Has anyone tried to do V4 of FMOD yet (especially for the Mac) - I have tried to start, but unfortunately the import libraries are now DYLIB, which BlitzMax wont import. I have started on the C code (the idea originally being that the libraries could be imported), and an interface to the C code could be setup in BlitzMax. |
| ||
Support of 4.0 would be great. Sveinung stated a year ago that he would look into this. |
| ||
It should be easy enough to do - unfortunately, though FMOD comes in two versions for oSX, which might pose a few problems. I was going to do it myself, but I'm more used to BASS (plus that has makes it easy to get hold of the music info). |
| ||
I've got the most of the 4 wrap ready.Sorry got no time to complete it. If anyone want the source, just e-mail me. Regards Sveinung |
| ||
It doesn't seem to be possible to use this FMod-Module with Linux as it crashes completely trying to load .ogg-files and isn't able to stream at all. Crash (MAlloc) at: (with sParFile as some .ogg-file-path, I *think* it crashes in Stream_Open) <...> mscTemp.iFModSoundID = FSOUND_Stream_Open(sParFile, 0, 0, 0) FSOUND_Sample_GetDefaults(FSOUND_Stream_GetSample(mscTemp.iFModSoundID), Varptr mscTemp.iDefFreq, Null, Null, Null) FSOUND_Stream_Close(mscTemp.iFModSoundID) mscTemp.iFModSoundID = -1 <...> Simply doesn't play anything: (modified Streaming-sample) Graphics 300,150,0 FSOUND_Init(22000,256,0) music=FSOUND_Stream_Open("dreams_inc.mp3",0,0,0) FSOUND_Stream_Play(FSOUND_FREE,music) ang:Float=0 Repeat Cls() 'id=PollEvent() ang=ang+4.8 SetColor(255,255,0) For i=0 To 100 Step 10 DrawLine((Sin(ang+i)*20)+50,(Cos(ang+i*1.3)*25)+75,(Sin(ang+i*1.5)*30)+250,(Cos(ang+i*1.2)*45)+75) Next SetColor(255,255,255) DrawText("Streamsample",10,10) DrawText(FSOUND_IsPlaying(0),10,20) If KeyHit(KEY_SPACE) DrawText(FSOUND_Stream_Stop(music),10,30) EndIf Flip() Until KeyHit(KEY_ESCAPE) Or id=259 FSOUND_Stream_Close(music) fsound_Close() End In both cases I can run the exact same code in Windows perfectly without any error or glitch. |
| ||
Another thing: I'm getting an FMod Errorcode 2 - "This command failed because FSOUND_Init Or FSOUND_SetOutput was Not called" - on FSOUND_Close() with having both FSOUND_Init (returning true) and FSOUND_SetOutput (No Error) called! Also, it seems to be not reproduceable. I want to call FSOUND_Close followed by another Initialization in Order to completely reset FMOD. I HAVE closed all the streams and without resetting FMod, it will crash anyway some not predictable time later on. This appears to be related to: http://www.blitzbasic.com/Community/posts.php?topic=71579 |
| ||
@Sveinung: Sadly. I'm not good enough at porting. Which parts are missing? Could you release a wip for testing purposes? |
| ||
Ok. I'll post some code here soon. Sveinung |
| ||
I'm working on a FMOD interface system (with the latest version of FMOD) which is working okay so far. The only problem I've found really is that only one sample can be played at a time - at the moment, I've no idea how to solve that. |
| ||
Okay, this is the C interface code - At the moment, Windows and Linux is up and running - just need to do Mac next : As you can see, the spectrograph code has been more or less retained from the BASS system. This is the set of externs - its not complete. And the constants : Some test code (you'll need a modified BMK to compile it) : So far I haven't had a problem with the Linux version of FMOD, especially after working out how to get more than one sound to play at a time. By the way, "-L", doesn't like spaces in the path... |
| ||
can you use a guide, how to install and what I need to do in the BlitzMax Tutorials forum? It nice to see I got some good timing, since I just have installed Linux and got most of my app (MultiJuke, a jukebox application) converted, but its still missing the soundpart (do actuelly only need one music file playing at the same time). I like to have Linux (I use BASS on Windows) version to work, so how do I with the C file and what is modified in the BMK? For the best, please write a guide in the guide forum. ... and no I do not need all these effect things yet. |
| ||
Got a guide up and running... |
| ||
Good going, MrTAToad :) If you can get the mod music file functionality to work in Mac, I'd definitely make use of it. Hope it goes well... |
| ||
MOD music should usable as is. |
| ||
Anyone verify this works on a mac ? |
| ||
Do you mean FMOD or MOD ? |
| ||
I hope you don't mind, but I added two commands and made this into a module. Thanks a lot , MrTAToad for bringing this to blitzmax. http://www.savefile.com/files/1042676 |
| ||
Thats okay - dont forget to make sure it works across all three OS's :) |
| ||
I'm pretty sure it will. If it worked before on the other OS's, then there shouldn't be a problem. I commented the "#define Linux" out because I didn't exactly know what they were for =\. Now I do, but it shouldn't be too much of an issue. Again, thanks a million for porting this to Blitz. |
| ||
No problem... |
| ||
Me again! :) I've been away from coding for a while and am setting up a fresh installation of Blitz. I didn't take proper time to set FMod up before, and now I'm struggling to understand exactly how to get it to work. I've browsed the "FMod - The use and application of..." thread but nothing there really helped. So far I've: * Installed BlitzMax and updated to v1.28 * Installed MinGW 3.1.0 and can compile C / build modules * Installed the latest version of FMod Ex * Copied MrTAToad's fmod.c / fmodconstants.bmx files to my test project folder * Edited fmod.c with the correct install path of fmod.h My quick 'n' dirty test program: Import "-LG:\Programming\BlitzWork\fmodtest" Import "-lfmodex" 'Import "-lz" Import "fmod.c" Import "fmodconstants.bmx" Extern Function FMOD_Initialise() Function FMOD_Close() EndExtern Print "Initialising FMod..." Print FMOD_Initialise() FMOD_Close() End Trying to compile this program gives this error: Building test Compiling:fmod.c Compiling:fmodconstants.bmx flat assembler version 1.66 3 passes, 14005 bytes. Compiling:test.bmx flat assembler version 1.66 3 passes, 13498 bytes. Linking:test.debug.exe G:/Programming/BlitzMax/bin/ld.exe: cannot find -lfmodex Build Error: Failed to link G:/Programming/BlitzWork/fmodtest/test.debug.exe Process complete Could someone please help put me out of my misery? :( |
| ||
This thread is just getting ridiculously long now! Someone really needs to start a new thread with details and downloads of all the latest source/mods and how exactly to get them to work on each of the OS's. I did get the Windows version working a while ago, but never did get it to work on OS X (PPC or Intel). The thought of reading a 270-odd post thread to figure out the details just puts me off, so I now just put up with the built-in audio system, which is not exactly ideal :o( |
| ||
Prospero, change import "-lfmodex" to import "fmodex.a". And make sure fmodex.a is in your lib folder. |
| ||
Cheers, that seemed to do the trick! (although for the benefit of any other folks reading this thread, the file needed is "libfmodex.a" not "fmodex.a" :) |
| ||
the compiler cannot find the following... fmod.release.win32.x86.a Can anyone please help me, thanks. Jeff. |
| ||
Is your pathing correct ? For Fight Tune, I used : ?Win32 Import "-Lx:\programming\BlitzMax\FightTune" Import "-lfmodex" Import "FMod.c" ?MacOs Import "-L/Users/nicholaskingsley/Documents/BlitzMax/FightTune" Import "-lfmodex" Import "-lz" Import "/Users/nicholaskingsley/Documents/BlitzMax/FightTune/FMod.c" ?Linux Import "-L/home/nicholas/Desktop/fmodapi40623linux/api/lib/" Import "-lfmodex" 'Import "-lz" Import "/home/nicholas/Desktop/BlitzMax/FightTune/FMOD.c" |
| ||
I know this thread is dead, but maybe some fmod3.75 zombies still move around? ;) Has anyone ever streamed an internet radio stream (e.g. http://194.158.114.68:5000) and detected the meta data (such as server name, station name, current title) sent with it? There's a FSOUND_Stream_GetTagField command in the docs, but I'm not sure how to make use of it. |
| ||
Why is this thread no longer sticky btw? Anyone here? :o) |
| ||
Alot of threads got unstickied (even the "Threaded BlitzMax!" thread!!) |
| ||
Anyone know how to get around this error? I'm on MacOS.Linking:test.debug ld: library not found for -lfmodex collect2: ld returned 1 exit status I already tried copying the library files to my lib folder. |
| ||
Hmmm is it your fmod version? libfmodex.a being used? double check :) |
| ||
Hmmm is it your fmod version? I shouldn't think that makes any difference. Possibly, it's one of : * the wrong "prefix" path inside the .dylib itself * the location of the .dylib is not in a folder that is searched by the loader. That's why I recommend the .dylib goes into the app bundle. (rather than stuff getting dropped into the system). But each to their own! :-) |
| ||
Rob- I'm using the latest stable release of fmod ex. There is no libfmodex.a that I can see. I think that's because I'm on a mac and that's just a PC thing? Brucey- Thanks for the help, but I don't know how to apply what you're saying. I tried putting the .dylib into the max lib folder and it found it, but complained of ; dyld: Library not loaded: ./libfmodex.dylib Referenced from: /Users/Lee/Documents/FMOD_proj/test.debug.app/Contents/MacOS/test.debug Reason: image not found How would I edit a prefix path inside a .dylib, and what would it need changing to? By "in the app bundle" do you mean stick the dylib in your code folder? |
| ||
Okay, the 'image not found' problem seemed to be because I renamed the folder the api was in. I thought the spaces in the name may be causing problems. So now I'm getting linker problems:Building fmod Compiling:fmod.c Linking:fmod.debug Undefined symbols: "_FMOD_System_CreateSound", referenced from: _FMOD_CreateSound in fmod.c.gui.debug.macos.x86.o "_main", referenced from: __start in crt1.o "_FMOD_Channel_GetPosition", referenced from: _FMOD_GetChannelPosition in fmod.c.gui.debug.macos.x86.o ...etc....... "_FMOD_Sound_GetLength", referenced from: _FMOD_GetLength in fmod.c.gui.debug.macos.x86.o ld: symbol(s) not found collect2: ld returned 1 exit status Build Error: Failed to link /Users/Lee/Documents/FMOD_proj/fmod.debug.app/Contents/MacOS/fmod.debug Process completeAny ideas? |
| ||
Oh, I should mention, I'm using MrTaToads code, which should work with Ex. |
| ||
There are Mac notes with my FMOD module which describe what to do (on the command-line)... but I don't have that with me. |
| ||
Ah... I will take a look for your one then, Brucey. Thanks. |
| ||
I will take a look for your one then Yes. Indeed. Using libfmodex.dylib in a Bundle --------------------------------- libfmodex.dylib needs to be modified to work from inside an application bundle. When you run "otool -D libfmodex.dylib", it will output the following : libfmodex.dylib: ./libfmodex.dylib This won't work with an application bundle. The library name must be prefixed with "@executable_path". We can convert it as follows : install_name_tool -id @executable_path/libfmodex.dylib libfmodex.dylib When we again run otool, the result will be : libfmodex.dylib: @executable_path/libfmodex.dylib ... It's also possible that the following error may occur on older PPC versions : ...lib/macos/libfmodex.dylib load command 4 unknown cmd field If this happens, the following command should fix it : strip -S -arch ppc -no_uuid libfmodex.dylib However, you do need at least XCode 2.5, but we'll try to make sure the version included with BaH.FMOD is fixed already. The dylib can now be used inside your application bundle. The dylib shipped with BaH.FMOD has already been "fixed". :o) |
| ||
Okay, I must have taken the dumb pill today. I checked out your fmod module into the bah.fmod directory, installed fmod ex 4.30.01, built the modules, and tried to run one of your examples. I'm getting this- Building loadfrommemory Compiling:loadfrommemory.bmx Linking:loadfrommemory.debug Executing:loadfrommemory.debug dyld: Library not loaded: ./libfmodex.dylib Referenced from: /Applications/BlitzMax/mod/bah.mod/fmod.mod/examples/loadfrommemory.debug.app/Contents/MacOS/loadfrommemory.debug Reason: image not found |
| ||
The dylib needs to be copied into the app bundle. Specifically, into Contents/MacOS. Using my custom BMK (that's the util which handles the builds), it runs a post-build script called post.bmk, and copies the dylib into the bundle for you. (I'm from the side of the river that believes computers are good for automating dull tasks) Otherwise, it's something you need to do by hand, I'm afraid - or you write your own shell script, etc. |
| ||
Thanks again, Brucey, but I'm still getting the same error. Bare with me... I don't understand what you mean by "the app bundle". I assume you mean the location where the .bmx file lives? I tried copying the dylib as you said, assuming I have it right. I have also tried compiling and installing your ng bmk as per the instructions, and I still get the same error. [edit]By copying the dylib directly into the executable directory, I can get it to link, but nothing happens when it executes. |
| ||
My bad... it was working but the window didn't pop to the front. Thanks, Brucey. You are a living legend. Watching those modules stream down made my fingers ache.. |
| ||
[fixed] |