.net framework 3.5

Apr 20, 2011 at 9:17 AM

Hi, we've got a project targeting .net framework 3. 5 written with visual studio 2008 and we would like to use NSpeex. The application is already been distribuited to customers PC and we would like to update it with NSpeex features without changing the destination framework. Would it be possible to have an assembly dll to use with the 3.5 version?

Thanks, Ciro.

Apr 20, 2011 at 3:39 PM

Hi, I solved this. I made some source code editing to make it compatible with .net framework 3.5 and recompile it targeting 3.5.

Thanks.

Coordinator
Apr 20, 2011 at 4:38 PM

Excellent, I was just about proposing that. Just get rid of the code contracts and you should be good. I don't know if the Silverlight version compiles with the older one though.

Christoph

Am 20.04.2011 17:39 schrieb "CiroCiro" <notifications@codeplex.com>:
> From: CiroCiro
>
> Hi, I solved this. I made some source code editing to make it compatible with .net framework 3.5 and recompile it targeting 3.5.Thanks.
>
>
Apr 21, 2011 at 7:21 AM

Yes, ,infact, i removed the code contracts. Just in case someone else needs to do it, there's another little thing to modify, it's the SpeexDecoder constructor, in SpeexDecoder.cs file.

The original constructor uses default parameters (they're not allowed in vs2008-.net framework 3.5) :

public SpeexDecoder(BandMode mode, bool enhanced = true)
        { ... }

 

So, I just edited the method to:

          public SpeexDecoder(BandMode mode, bool enhanced)
        { ... }

Obviously, when you build a new SpeexDecoder instance, you have to give both the arguments.

Thanks for your cooperation, Ciro.

Apr 21, 2011 at 7:30 AM

Just to be more precise, if someone wants to replicate the funcionality of default parameters and preserve both signatures, you can overload the new constructor like this:

public SpeexDecoder(BandMode mode, bool enhanced)
        { ... }

public SpeexDecoder(BandMode mode) : this (mode,true)
        { }

Bye.