Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Edited Issue: Midi Interop with MIDIHDR is wrong? [2278]

$
0
0
I think your interop with the MIDIHDR struct is wrong. You use a marshal-as attribute and a ref. I think this will not prevent the GC from relocating the (managed) MIDIHDR and when that happens the ref passed to (for instance) midiInAddBuffer is no longer valid. I would use an IntPtr to an unmanaged memory block that contains the MIDIHDR (copied there using Marshal.StructureToPtr).

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>