public AudioAnalyzer(MainWindow inst) { windowInst = inst; BassNet.Registration("youremail", "yourregkey"); //Enter your data here! _lInt = new Interface(); _fft = new float[1024]; _lastlevel = 0; _hanctr = 0; _t = new DispatcherTimer(); _t.Tick += timerTick; _t.Interval = TimeSpan.FromMilliseconds(25); _t.IsEnabled = false; _process = new WASAPIPROC(Process); _spectrumdata = new List <byte>(); _vis = inst.visualizer; _initialized = false; devices = new List <AudioDevice>(); Init(); leds = new int[9, 9]; for (int x = 0; x < 9; x++) { for (int y = 0; y < 9; y++) { leds[x, y] = 0; } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 12 "..\..\MainWindow.xaml" ((launchpad_audio_vis.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.MetroWindow_Closing); #line default #line hidden return; case 2: this.launchpadCombo = ((System.Windows.Controls.ComboBox)(target)); #line 16 "..\..\MainWindow.xaml" this.launchpadCombo.Loaded += new System.Windows.RoutedEventHandler(this.launchpadCombo_Loaded); #line default #line hidden #line 16 "..\..\MainWindow.xaml" this.launchpadCombo.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.launchpadCombo_SelectionChanged); #line default #line hidden return; case 3: this.devicesCombo = ((System.Windows.Controls.ComboBox)(target)); return; case 4: this.label = ((System.Windows.Controls.Label)(target)); return; case 5: this.enableVis = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 23 "..\..\MainWindow.xaml" this.enableVis.Checked += new System.Windows.RoutedEventHandler(this.enableVis_Checked); #line default #line hidden #line 23 "..\..\MainWindow.xaml" this.enableVis.Unchecked += new System.Windows.RoutedEventHandler(this.enableVis_uncheck); #line default #line hidden return; case 6: this.label1 = ((System.Windows.Controls.Label)(target)); return; case 7: this.visualizer = ((launchpad_audio_vis.SoftwareVisualizer)(target)); return; } this._contentLoaded = true; }