Exemplo n.º 1
0
 internal void SetHandle(LocalAudioTrackHandle handle)
 {
     Debug.Assert(!handle.IsClosed);
     // Either first-time assign or no-op (assign same value again)
     Debug.Assert(_nativeHandle.IsInvalid || (_nativeHandle == handle));
     if (_nativeHandle != handle)
     {
         _nativeHandle = handle;
         RegisterInteropCallbacks();
     }
 }
Exemplo n.º 2
0
        internal void FinishCreate(LocalAudioTrackHandle handle, AudioTrackSource source)
        {
            Debug.Assert(!handle.IsClosed);
            // Either first-time assign or no-op (assign same value again)
            Debug.Assert(_nativeHandle.IsInvalid || (_nativeHandle == handle));
            if (_nativeHandle != handle)
            {
                _nativeHandle = handle;
                RegisterInteropCallbacks();
            }

            Debug.Assert(source != null);
            Source = source;
            source.OnTrackAddedToSource(this);
        }