[Mono-dev] InterOp problems with 1.2.6pre2

Prakash Punnoor prakash at punnoor.de
Fri Nov 30 16:10:51 EST 2007


On the day of Friday 30 November 2007 Robert Jordan hast written:
> Prakash Punnoor wrote:
> >> Aften's context does not declare a float array at this position.
> >
> > But it has a void* and to my understanding float[] can be marshalled to
> > void*. It works with the methods, as well, which have void* as
> > parameters.
>
> Here is the end of your C# struct declaration:
>
> 		public int SampleRate;
> 		internal A52SampleFormat SampleFormat;
>   		public float[] InitialSamples; // the trouble maker
>   		private IntPtr m_Context;
>
>
> And this is the C declaration:
>
>
>      /**
>       * Audio sample rate in Hz
>       */
>      int samplerate;
>
>      /**
>       * Audio sample format
>       * default: A52_SAMPLE_FMT_S16
>       */
>      A52SampleFormat sample_format;
>
>      /**
>       * Used internally by the encoder. The user should leave this alone.
>       * It is allocated in aften_encode_init and free'd in
> aften_encode_close.
>       */
>      void *private_context;
>
>
> The layouts don't match, since declaring a field "private" won't
> magically subtract it from struct layout.

It would help if you'd look at the svn version as I wrote in my mail. Reading 
helps, really....

-- 
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071130/71f73084/attachment.bin 


More information about the Mono-devel-list mailing list