0
0

Hello.
I would like to know if there is any support (existing or planned) for .NET.
I intend to use FMOD with Visual C# or if necessary with VB .NET.
I got a sample-program to run under Visual C#, but I had to migrate everything by hand.
Thanks for any information. Prem.

  • You must to post comments
0
0

There is no publicly available assembly for use with C# just yet. At the moment, some of us have partial assemblies that are just wrappers around the FMOD DLL using P/Invoke.

  • You must to post comments
0
0

Absolutely fair enough, forgive me! ๐Ÿ˜‰

My programming experience has almost always been Windowed apps in MS Windows and all the backend stuff on various UNIX flavours or NT Server. I’ve never tried to program UI apps for X or Mac etc.

Has anyone got any more on Callbacks crashing on exit (I can make them fire OK).

Brett, I presume that you’re really busy, but .NET isn’t going to go away! Maybe some of the people in this forum can get together and build a good wrapper and get it released, with a little of your help?

The Callback thing might be quite easy to find as it happens constantly at least. My fear is that the solution could be somewhere in .NET though as there are many ways to wrap DLL functions / callbacks etc. Quite a lot to get to grips with.

  • You must to post comments
0
0

Hi Sly,

Back to your reply:
FMOD is not a COM component. To use FMOD from a .NET language, you must use the PInvoke mechanism (System.Runtime.InteropServices) to call unmanaged functions in DLLs from managed code. I have started wrapping the FMOD 3.63 functions into an assembly that can be used from any .NET language. It is nowhere near complete yet though.
–> I want to learn to write a wrapper for some dll!

So after thinking for a while, since i want to learn to write one, maybe i can write one for fmod. I want to see fmod power! Haha!

Okay, but since you already write a wapper in .net, can you show me some light! I know what to use, as you describe on top!

Do you willing to share the current source code with me? I want to see how actually the whole thing works? Maybe it might helpful for me to do some wrapper for other dll too!

Managed code with c++ or vb.net or c# – which one you used?

So it means that you are writing a wrapper with managed language, is it stable? I never write wrappers before, so no much experience!

Any help by sharing the source code of you existing wrapper? I hope it is not as hard i see!

Please!

Thanks.

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

How do you not use Interop when all you have is a DLL?

  • You must to post comments
0
0

He’s right, Brett. By “managed code,” Microsoft is essentially referring to garbage collection. Because fmod.dll is already compiled, and executables can’t be easily directly modified, .NET’s CLR can’t do garbage-collection on it, so unless a specific .NET (let’s say fmodnet.dll) port of FMOD is made, it’s going to be very tough to use FMOD as is in a .NET environment.

  • You must to post comments
0
0

Oh, why i never think of that!

I write a wrapper based on my needs!

Hmm.. i should look into the API and see what i need!

Hehe!

Thanks…

For the fmod_error… why you say i need to do a different approach?

Writing a wrapper had many ways?

Thanks for the help..

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

D’oh. How’d I miss that?

Thanks brett.

  • You must to post comments
0
0

Do you know where i can download those codes?

Maybe i can try with it?

Anyway doess fmod much much better over DirectSound! Coz if it is really that good, maybe i will focus more into fmod? Sorry as i off-topic abit.

Thanks.

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

Thanks Brett.

I’ll try it in C++ to be sure, but I think your’e right, I’m missing something in C#.NET.

If I found out what, I will let you all know ๐Ÿ˜€

  • You must to post comments
0
0

Wow, even Microsoft, a company that seems to like using proprietary technology, has taken note of FMOD? That’s surprising… then again, I guess it’s all in due time. Microsoft is now using Inno Setup, one of the best [b:1nt96nu1]completely free[/b:1nt96nu1] installation systems out there… wouldn’t it be something to see MS start using all third-party technologies?

  • You must to post comments
0
0

I do not have the wrapper with me at the moment. It is at home. I am using C# and the PInvoke directive provided by System.Runtime.InteropServices. Look for PInvoke in the .NET documentation. That has been my sole source of information in regards to writing this wrapper.

I can send the wrapper once I get home tonight.

  • You must to post comments
0
0

[quote="Sly":37q4mtxp]How do you not use Interop when all you have is a DLL?[/quote:37q4mtxp]

You use the header ( fmod.h) and library ( fmodvc.lib ) files from the SDK distribution. When programming in C/C++ that is what you usually do. I guess you could go directly against the DLL utilizing the LoadLibrary and GetProcAddress Win32 functions, but you would still need to have the header file for structures and constants ( #defines in this case ). The only reason I see doing it this way is if you wish to determine at runtime which sound system to use. For example allowing the user to choose between FMod, OpenAL or Direct3D. There would be a lot more to it though.

Note: If all you have is the DLL then you probably just downloaded the binary distribution. Therefore you need to download the SDK distribution. It is the same distribution that includes the VB and Delphi interfaces.

Hope this helps,
Rob

  • You must to post comments
0
0

That only means it cannot be used like an Active-X DLL. But it can be used as API just like in any other language e.g. VB6. (DllImport).
Prem.

  • You must to post comments
0
0

Its fairly easy to write your wrapper from the FMOD documentation as well, thats usually where I start out…that way you get explanations about the purpose of the method and its parameters. Something else I’ve done to start out writing wrappers is to re-write one of the samples – like a simple MP3 player – that helps in keeping you focused on what functions you need to implement to get that working, then you just build on it from there.

  • You must to post comments
0
0

I don’t think any of them are available for download just yet.

FMOD can use DirectSound for sound output, but it provides extra functionality over DirectSound.

  • You must to post comments
0
0

Hi.
I have programmed in C# with asmcom’s code-snippet and also the callback works perfectly. No crash. In the callback I start a new song, after the last song I return 0. In no situation does fmod crash.
Thanks, asmcom.
There is one problem left for me: it is a lot of work to migrate fmod.h to C#. And this has to be done now with every new version of fmod? How about a listing of changes or something like that?

  • You must to post comments
0
0

They’re using Inno Setup .. that is amazing – I started using that over 2 years ago … and it IS good

  • You must to post comments
0
0

Okay i will look into P/Invoke..

Pretty thanks…

just email me at chuawenching@lycos.com and chuawenching@yahoo.com as a backup!

Wow.. what i know about PInvoke is that they uses DllImport!

Something like that… but really thanks alot.. hehe! Finally i can learn to write my first wrapper…

How long you took to write that wrapper?

Thank you.

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

Yeah, I always get the full distribution having helped maintain the Delphi interface for a couple of years now.

I didn’t realise what you meant in the original message. Now it makes sense in a “the lib is just another interface to the DLL” kind of way. If I’m right, using Managed C++ could make an assembly that interfaces to the DLL without using Interop?

I’m just keen to try FMOD in Delphi for .NET.

  • You must to post comments
0
0

From my understanding of .NET, there seems to be two ways we can go here.

  1. Provide source files for each language that define the types and import the functions from the DLL. This is like the current FMOD release where each API update means updating several source files with the same change.
  2. Provide one assembly that works for all .NET languages. This assembly declares all the types and the functions in a common manner. One source file to produce one assembly for all .NET languages.
  • You must to post comments
Showing 1 - 20 of 75 results
Your Answer

Please first to submit.