This is a .NET wrapper for the library Secret Rabbit Code (aka libsamplerate), when calling src_callback_read in CallbackRead : AccessViola
I have fixed it using the following :
[System::Runtime::InteropServices::UnmanagedFunctionPointerAttribute ( CallingConvention::Cdecl )]
public delegate long SRCCallback ( void *cb_data, float **data ) ;
static IntPtr CallbackNew ( SRCCallback ^ % func, RabbitConverter converter_type, int channels, int *error, void* cb_data ) { ... }
In short : now it uses C calling convention and C# ref keyword.