public void Initialize(ISharpControl control)
 {
     this._control        = control;
     this._audioProcessor = new AFProcessor();
     this._control.RegisterStreamHook(this._audioProcessor, ProcessorType.FilteredAudioOutput);
     this._ifProcessor = new IFProcessor();
     this._control.RegisterStreamHook(this._ifProcessor, ProcessorType.DecimatedAndFilteredIQ);
     this._ifProcessor.NoiseThreshold    = Utils.GetIntSetting("DNRIThreshold", -30);
     this._ifProcessor.Enabled           = Utils.GetBooleanSetting("DNRIEnabled");
     this._audioProcessor.NoiseThreshold = Utils.GetIntSetting("DNRAThreshold", -70);
     this._audioProcessor.Enabled        = Utils.GetBooleanSetting("DNRAEnabled");
     this._noiseProcessor                = new NoiseBlankerProcessor();
     this._noiseProcessor.Enabled        = Utils.GetBooleanSetting("NBEnabled");
     this._noiseProcessor.NoiseThreshold = Utils.GetIntSetting("NBThreshold", 80);
     this._noiseProcessor.PulseWidth     = Utils.GetDoubleSetting("NBPulseWidth", 10.0);
     this._control.RegisterStreamHook(this._noiseProcessor, ProcessorType.RawIQ);
     this._guiControl = new NoiseReductionPanel(this._ifProcessor, this._audioProcessor, this._noiseProcessor);
 }
 public NoiseReductionPanel(INoiseProcessor iControl, INoiseProcessor aControl, NoiseBlankerProcessor processor)
 {
     this._iControl  = iControl;
     this._aControl  = aControl;
     this._processor = processor;
     this.InitializeComponent();
     this.ifThresholdTrackBar.Value    = this._iControl.NoiseThreshold;
     this.ifEnableCheckBox.Checked     = this._iControl.Enabled;
     this.audioThresholdTrackBar.Value = this._aControl.NoiseThreshold;
     this.audioEnableCheckbox.Checked  = this._aControl.Enabled;
     this.ifThresholdTrackBar_Scroll(null, null);
     this.audioThresholdTrackBar_Scroll(null, null);
     this.thresholdTrackBar.Value  = this._processor.NoiseThreshold;
     this.pulseWidthTrackBar.Value = (int)(this._processor.PulseWidth * 10.0);
     this.enableCheckBox.Checked   = this._processor.Enabled;
     this.thresholdTrackBar_Scroll(null, null);
     this.pulseWidthTrackBar_Scroll(null, null);
 }
Exemple #3
0
 public NoiseReductionPanel(IFProcessor _ifProcessor, AFProcessor audioProcessor, NoiseBlankerProcessor noiseProcessor) : this(_ifProcessor)
 {
     _audioProcessor = audioProcessor;
     _noiseProcessor = noiseProcessor;
 }