static int complexInputDataProc( IntPtr inAudioConverrter, ref uint ioNumberDataPackets, AudioBufferList ioData, ref AudioStreamPacketDescription[] outDataPacketDescription, //AudioStreamPacketDescription** IntPtr inUserData ) { // getting audiounit instance var handler = GCHandle.FromIntPtr(inUserData); var inst = (_AudioConverter)handler.Target; // evoke event handler with an argument if (inst.EncoderCallback != null) { var args = new _AudioConverterEventArgs( ioNumberDataPackets, ioData, outDataPacketDescription); inst.EncoderCallback(inst, args); } return(0); // noerror }
static int complexInputDataProc( IntPtr inAudioConverrter, ref uint ioNumberDataPackets, AudioBufferList ioData, ref AudioStreamPacketDescription[] outDataPacketDescription, //AudioStreamPacketDescription** IntPtr inUserData ) { // getting audiounit instance var handler = GCHandle.FromIntPtr(inUserData); var inst = (_AudioConverter)handler.Target; // evoke event handler with an argument if (inst.EncoderCallback != null) { var args = new _AudioConverterEventArgs( ioNumberDataPackets, ioData, outDataPacketDescription); inst.EncoderCallback(inst, args); } return 0; // noerror }