public static Task <PeerConnection.StatsReport> GetSimpleStatsAsync(PeerConnectionHandle peerHandle)
        {
            var tcs    = new TaskCompletionSource <PeerConnection.StatsReport>();
            var resPtr = Utils.MakeWrapperRef(tcs);

            PeerConnection_GetSimpleStats(peerHandle, SimpleStatsReportDelegate, resPtr);

            // The Task result will be set by the callback when the report is ready.
            return(tcs.Task);
        }
 public static extern void PeerConnection_RegisterInteropCallbacks(PeerConnectionHandle peerHandle,
                                                                   in MarshaledInteropCallbacks callback);
 public static extern uint PeerConnection_Create(PeerConnectionConfiguration config, IntPtr peer,
                                                 out PeerConnectionHandle peerHandleOut);
 public static unsafe extern void PeerConnection_AddRef(PeerConnectionHandle handle);
 public static extern uint Create(PeerConnectionHandle peerHandle, int bufferMs, out Handle audioTrackReadBufferOut);
 public static extern uint Create(PeerConnectionHandle peerHandle, int bufferMs, ref IntPtr audioReadStream);