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(); } }
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); }