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

So do I have to add any additional references for fmod! I assume you must!

I not sure whether fmod is part of the COM components or not?

I am now not at home, so can’t run vs.net?

Any help?

Thanks.

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

[quote="asmcon":1dfelk4n]Hi fellow FMOD developers,

Just out of interest, Is this how other people do it?

[ DllImport( “fmod.dll”, CharSet=CharSet.Auto )]
public static extern int FSOUND_Stream_OpenFile([MarshalAs(UnmanagedType.LPStr)] string FileName, FSOUND_MODES mode, int memlength);

Andy[/quote:1dfelk4n]

Actually, I don’t put any MarshallAs attributes and it works fine. I think it might do LPStr by default for PInvoke.

All I have is EntryPoint, nothing else.

  • You must to post comments
0
0

Yes, a long time ago I have tried to use the vb6->vb.net converter to open fmod.bas in .net, and I thought only a few manual changes were needed after that to get it working.

Once you have the fmod commands available from .net, you can also make an object oriented wrapper class to make fmod available oo.

  • You must to post comments
0
0

Thanks Sly!

Anyway i never really use C++

I know C++ got callback!

But what does callback means and had to do with fmod.dll?

Can’t i live without it? What is so special about it?

Can i do callback in c# too? I never tried callback before in c#!

Thanks.

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

Theres been a lot of postings about the “FMOD .NET” and the FMOD4, but I can’t find any releases regarding these?

Is the .NET wrapper developed? When will it be released?
And how about FMOD4? When? Can it also be easy integrated into .NET without PInvoke?

  • You must to post comments
0
0

I cannot see Brett wanting to go to that effort for the 3.xx series since all his efforts are on FMOD4 for the foreseeable future. So, if we want .NET usability for the 3.xx series, then we will have to go with the PInvoke approach and have the two DLLs. That’s a small price to pay for being able to easily use FMOD in any .NET language.

  • You must to post comments
0
0

[quote:3t8fmme9]Are you using the stdcall version of FMOD? That is a requirement since .NET does not how to handle cdecl functions. As for the error when returning from the callback, yes we are all getting that. Not sure how to handle that one. But we will keep trying.[/quote:3t8fmme9]
I thought I had tried both DLL versions, but I’m not sure as I am still not 100% with .NET 2003. I will go over this again later and be sure. I’ve got the feeling that both DLL versions manage to play files, set/receive callbacks and then crash when leaving the callback.

To get me going for now I am just ignoring the error in a Try block. I’m sure you all have tried this, did you get a long delay before the system came back every time the callback fired?

[quote:3t8fmme9]Chua Wen Ching
Actually i not sure that delegates can be used to replace callback? Is it wrong?
[/quote:3t8fmme9]

I’m not sure what you mean, the delegate does work to the point of firing the callback (the difficult bit!), it’s just when the callback returns that a problem occurs.

Brett, any ideas?

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

Just to help everyone out, I found this c# wrapper for FMOD while on the net one day, but I can’t remember where I found it (I thought I found it here!). Anyways, I can’t take any credit for it as it’s not my work, but unfortunately, the author left no hint of who he was in the source code.

Since it was freely downloadable when I got it, I wouldn’t imagine there would be any problem with me posting a link to it on my webserver. If you are the author and happen to see this and want me to take it down though, I will.

You can get it here:
[url:mpp7bp8b]http://newtz.homeip.net[/url:mpp7bp8b]

  • You must to post comments
0
0

The code for Delphi for .NET is very similar to C#. The DllImport directive is exactly the same bar the double quotes. The only thing different is the function declaration.[code:1gtbv4dn][DllImport(’fmod.dll’, EntryPoint = ‘_FSOUND_Init@12’)]
function FSOUND_Init(mixrate, maxsoftwarechannels: Integer; flags: Cardinal); external;[/code:1gtbv4dn]FMOD would be considered unsafe code due to the use of pointers. Managed code does not allow the use of pointers so that the CLR (Common Language Runtime) can perform garbage collection and keep everything nice and orderly.

  • You must to post comments
0
0

Take a look at some of the FMOD samples and the documentation for more information on callbacks. You can do most things without using callbacks, but for some special effects or functionality you do need to use callbacks.

  • You must to post comments
0
0

[quote="djerik":bb2z39zu]Theres been a lot of postings about the “FMOD .NET” and the FMOD4, but I can’t find any releases regarding these?

Is the .NET wrapper developed? When will it be released?
And how about FMOD4? When? Can it also be easy integrated into .NET without PInvoke?[/quote:bb2z39zu]

Well, it’s been a few months, and I’d like to know the answers to these questions, too.

So… bump

  • You must to post comments
0
0

Well, you might be right … I sent him a very small/limited/hacked together sample of how I would do it yesterday evening (the wrapper in Managed C++ and the test-sample in C#). The effort is really not that much more. Even if it is not done for the 3.xx series, he should consider it for FMOD 4. It is much cleaner, IMHO. I guess, this decision is really governed by other factors. How long will it be until version 4 comes around? Does he still want to have version 3.xx floating around?

Everybody using C# should be able to write their own P/Invoke wrapper anyways. Using P/Invoke you should be able to wrap FMOD in its entirety over a weekend. I haven’t looked much into the DSP stuff, but that should also be possible, having FMOD callback C# or VB.NET code … although this requires the FMOD version, which uses stdcall for callbacks.

-Marco

  • You must to post comments
0
0

Thanks a lot…

Oh is return back the values having problem.. hmm!

Is there any complete website out there that compare C++ and C# entirely.. based on features…

example,

use Callback in C++ and use Delegates in C#

even compare functions, etc!

I am having much problem understanding c++.. never intend to learn c++

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

Okay.. affirmative!

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

Is there any news on the Microsoft .NET Interface Brett? Also what happened to the link above, it doesn’t seem to work anymore!

  • You must to post comments
0
0

hello.
i tried already once to post this, but it seems it didn’t work.
i had no problem to migrate fmod.bas to C# and VB.NET. and it works fine. only callbacks i could not get to work. and that’s the most important part for me, because i want the program to react immediately when a piece is finished.
prem.

ps: i do have a problem playing very short mp3-pieces. they have a strong noise when they start playing.

  • You must to post comments
0
0

I will look into the docs and samples!

Thanks.

Regards,
Chua Wen Ching :p

  • You must to post comments
0
0

I’ve been developing a media player in VB.NET 2003 for about a month or so, I use it everyday with no problem, meaning, I never get any errors generated by FMod.

I have had some strange errors with the newer version of FMod though, I use 3.7.3.0 instead of the newer release, because, it generates some error while playing certain WMA files.

Hopefully you guys come out with a .NET friendly dll soon :)

  • You must to post comments
0
0

I just tried to do a small test in C#. I got a small assembly going with init and close working, but got stuck at trying to pass a String to a function that expects a char *.

Not that I’m really serious about using C#. To me it still feels like too much work to do the simplest thing.

  • You must to post comments
Showing 1 - 20 of 75 results
Your Answer

Please first to submit.