0
0

hi all!

I started my new C#.NET Wrapper for fmod, and it seems to work.
Everybody is invited to download and test it:
[url:1lmcvh85]http://www.mp3observer.com/download/fmodex.4.10.NET.zip[/url:1lmcvh85]

Done:
XML Doc
Examples: cdda,generatetone,multiplesoundcard,netstream,playstream,readtags

in progress:
Examples: 3d, ripnetstream,usercreatedsound

The Problem:
the delegates for the c++ callbacks don’t work!
Has anybody an idea? brett? ๐Ÿ˜‰
Specially the ripnetstream is interesting, because the readcallback is called, but i will receive an error.

Also interesting:
fmod.System.getSpectrum
i use a 256 float array, windowsize 512 and FMOD_DSP_FFT_WINDOW_RECT, and i get evertime i call the method the same float values ??

Maybe Brett will ship a .NET wrapper, but i can’t wait ๐Ÿ˜‰
Everybody who is interested in working together on the C# Wrapper and also to provide more examples based on open source is welcome!

bye,
Thomas Gugler
MCP
http://www.mp3observer.com[url][/url][url][/url]

  • You must to post comments
0
0

So, has any work been done on this C# wrapper lately? Or is development halted? If there’s still interest, perhaps I could help out…

-Matt

  • You must to post comments
0
0

Holy schnikes, you’re not kidding! I’ve been working with 3.74 exclusively lately, so I wasn’t aware of it. That’s great! The reason I was asking is that I’ve got a little pet project at home that is written in C# and DirectSound and I was thinking of porting it to FMOD, cause it’s just so much more pleasant than working with COM style crap and MFC and such… Bravo, sir…

  • You must to post comments
0
0

Make sure the array you’re using for the getspectrum call is an unmanaged memory buffer and not a managed one. Other than that, I’ll have to take a look when I get home – sounds promising! Not sure if the callbacks are possible without a Managed C++ wrapper.

  • You must to post comments
0
0

hi janus,

managed delegates for c++ __stdcall callbacks are possible.
check this out:
http://msdn.microsoft.com/msdnmag/issues/02/08/CQA/
or
http://msdn.microsoft.com/library/defau … torial.asp

also unmanaged buffers do work, as you can see with the cdda example
(the tag structure can be managed accessed by using Marshal.PtrToStructure)

so….there must be an error, and i think its not fmod, its c#….anything i don’t find out…

bye,
Thomas

  • You must to post comments
0
0

hi brett

you are absolutly right,
therefor i ask for help for solving problems and for finishing the wrapper.
i never said that it is complete ๐Ÿ˜‰

work is in progress.

bye

  • You must to post comments
0
0

Can we get access to your autogeneration scripts, brett? I asked about this before and never got an answer. I was already generating mine using regexes, so switching to a script wouldn’t be difficult.

  • You must to post comments
0
0

hi everybody!

Brett is not very fascinated about C#/.NET ๐Ÿ˜‰
but i need help!
Any c# coders here?

Problem1: System.getSpectrum doesn’t work under .NET with my wrapper.
maybe the returned float array declaration/call is not correct.but….hm…how its correct?

Problem2: Delegates for eg. attachFilesystem.
no idea about that, it doesn’t work in the way it should be coded (delegates,..)

I am working on an upgrade for the new alpha 11, and i will release also the not working problems as examples.

bye
Thomas.

  • You must to post comments
0
0

New version:
[url:t78ajble]http://www.mp3observer.com/download/fmodex.4.11.NET.zip[/url:t78ajble]

[code:t78ajble]14/10/04 , Fmod Ex 4 alpha 11

  • Added alpha4 new changes, and added ALL FMOD items
    (also correct order like brett wants)
  • Examples: Only cdda, generatetone, multiplesoundcard, netstream, playstream and readtags are ready[/code:t78ajble]

Nedd help for the not working delegates, getSpectrum and more Examples.

  • You must to post comments
0
0

Hi all,

I am currently working on the delegate issue. No major breakthrough yet, but I hope im close of something !

Status:

Cannot get any Fileopen/close events

Can however get the read, and read out the sound data. BUT I am facing an alocation issue when trying to save the data stream to disk. I have saved about 16 secounds of stream, and then it crashes.


private FMOD_RESULT SongReadFunction(IntPtr Handle, IntPtr Buffer, uint SizeInBytes, ref uint BytesRead, IntPtr UserData)
{
// Write to drive
FileStream SW = new FileStream(@”c:\temp\koen.mp3″,FileMode.Append,FileAccess.Write,FileShare.None,Convert.ToInt32(SizeInBytes),false);

byte []MyBytes = new byte[Convert.ToInt32(SizeInBytes)];

Marshal.Copy(Buffer,MyBytes,0,Convert.ToInt32(SizeInBytes));

SW.Write(MyBytes,0,Convert.ToInt32(SizeInBytes));
SW.Flush();

SW.Close();

return FMOD_RESULT.FMOD_OK;
}


  • You must to post comments
0
0

Now I am able to save a sound stream, It works. it really work ;=)

The problem was in that I did not use a persistant delegate, now I do. Maybe this is what we are doing wrong ?

The garbage collector is “cleaning up”, maybe it’s removing our delegates ?

I’ll continue my testing.

But now the FMOD_FILE_READCALLBACK is ok !

  • You must to post comments
0
0

[quote="maZZoo":10vt4ns2]Now I am able to save a sound stream, It works. it really work ;=)

The problem was in that I did not use a persistant delegate, now I do. Maybe this is what we are doing wrong ?

The garbage collector is “cleaning up”, maybe it’s removing our delegates ?

I’ll continue my testing.

But now the FMOD_FILE_READCALLBACK is ok ![/quote:10vt4ns2]
iirc managed data can also be relocated at any time (invalidating any pointers) but i may be wrong

  • You must to post comments
Showing 11 results
Your Answer

Please first to submit.