internal SinkInput(NativeSinkInputInfo info, Context c) { ctx = c; this.info = info; Name = Marshal.PtrToStringAnsi(info.name); ResampleMethod = Marshal.PtrToStringAnsi(info.resample_method); Driver = Marshal.PtrToStringAnsi(info.driver); PropList temp = new PropList(info.prop_handle); Properties = temp.Copy(); ctx.SinkInputEvent += HandleSinkInputEvent; }
private void UpdateInfo(NativeSinkInputInfo info) { EventHandler <PropertyChangedEventArgs> propHandler; propHandler = PropertiesChanged; if (propHandler != null) { propHandler(this, new PropertyChangedEventArgs()); } if (this.info.volume != info.volume) { EventHandler <VolumeChangedEventArgs> handler; handler = VolumeChanged; if (handler != null) { handler(this, new VolumeChangedEventArgs(info.volume)); } } this.info = info; ResampleMethod = Marshal.PtrToStringAnsi(info.resample_method); PropList temp = new PropList(info.prop_handle); Properties = temp.Copy(); }