tags:

views:

587

answers:

3

My company has an existing established WinForm application which in running on WinXP. The application does alot of sound processing using DirectSound.

My company would like to evaluate Mono, as an alternative on a per workstation cost to Vista/Win Server 2008.

I've heard that different estimates, ranging from 'it will work easily on Mono' to 'it could take months of recoding in certain cases to get a WinForm app to run with Mono on Linux'.

Does anyone have a good real world experience with this? A good link reference? I would like to get a better idea before I commit to testing.

Thanks!

+9  A: 

The WinForms part will be easy, you may have to do very little as Mono now claims to support Winforms 100%, however all the DirectSound calls will have to be rewritten to use an API available on Linux, ALSA being the obvious choice.

I have written small apps in VS 2005 and ported them with ease to Mono. If you do a lot of P/Invokes, then you'll have to take that into account, as those may have to be completely rewritten or rethought.

Also, check out MOMA: "The Mono Migration Analyzer (MoMA) tool helps you identify issues you may have when porting your .Net application to Mono. It helps pinpoint platform specific calls (P/Invoke) and areas that are not yet supported by the Mono project."

postfuturist
Although Mono claims 100% support for WinForms, I have had issues with the layout of my controls being different on Mono under Linux from what it is in Windows (possibly due to using some of the less common control appearance properties).
Luke
Agreed, there is a chance that you may have to tweak some things in your WinForms code. I've seen this myself. That's why I said "claims to support" instead of "supports".
postfuturist
A: 

There is a very similar question here

Luke
+6  A: 

Mono can help you move the managed code, but it will not help you move the audio layer.

Sadly, the .NET framework does not provide a comprehensive API for audio processing. It merely provides a way of playing back a small sound sample, and it is not even very good at this (See Jeroen's post about audio gaps when running the C64 emulator under IKVM).

You will have to research which Linux API maps best to what your audio application is doing.

Lennart Poettering blog entry on audio is an excellent starting point:

http://0pointer.de/blog/projects/guide-to-sound-apis.html

Once you decide on an API, just like in Windows, you will have to P/Invoke the API that is right for you.

miguel.de.icaza