Example #1
0
 void InitializeAudioCaptureUI()
 {
     RefreshAudioDeviceList();
     AudioProcesser.SetupAudioProcessor(FFTCallback);
     MatrixFrame.GradientColors[0] = BottomColor;
     MatrixFrame.GradientColors[1] = TopColor;
 }
Example #2
0
        //===========================================================================================

        //Matrix Frame Functions
        //===========================================================================================
        public void SetupFrameObject(int width, int height)
        {
            frame                   = null;
            frame                   = new MatrixFrame(width, height);
            scRec                   = new ScreenRecorder();
            MatrixBitmap            = new WriteableBitmap(frame.Width, frame.Height, 96, 96, PixelFormats.Bgr32, null);
            MatrixImage.Source      = MatrixBitmap;
            MatrixPreviewGroup.Text = " Matrix Preview: " + frame.Width.ToString() + "x" + frame.Height.ToString();
            SetupSCUI();
            MIConnect.IsEnabled = false;
            ap = new AudioProcesser(FFTCallback);
            RefreshAudioDeviceList();
        }
Example #3
0
        void RefreshAudioDeviceList()
        {
            StopAudioCapture();
            var devices = AudioProcesser.GetActiveDevices();

            ObservableCollection <string> list = new ObservableCollection <string>();

            foreach (NAudio.CoreAudioApi.MMDevice device in devices)
            {
                string deviceType = device.DataFlow == NAudio.CoreAudioApi.DataFlow.Capture ? "Microphone " : "Speaker ";
                list.Add(deviceType + device.DeviceFriendlyName);
            }
            DeviceList = list;
        }
Example #4
0
 private void StopAudioCapture()
 {
     AudioProcesser.StopRecording();
 }
Example #5
0
 private void BeginAudioCapture()
 {
     AudioProcesser.BeginCapture(FFTCallback, SelectedDeviceIndex);
 }
Example #6
0
 void InitializeAudioCaptureUI()
 {
     RefreshAudioDeviceList();
     AudioProcesser.SetupAudioProcessor(FFTCallback);
 }