Ejemplo n.º 1
0
 void InitializeAudioCaptureUI()
 {
     RefreshAudioDeviceList();
     AudioProcesser.SetupAudioProcessor(FFTCallback);
     MatrixFrame.GradientColors[0] = BottomColor;
     MatrixFrame.GradientColors[1] = TopColor;
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 4
0
 private void StopAudioCapture()
 {
     AudioProcesser.StopRecording();
 }
Ejemplo n.º 5
0
 private void BeginAudioCapture()
 {
     AudioProcesser.BeginCapture(FFTCallback, SelectedDeviceIndex);
 }
Ejemplo n.º 6
0
 void InitializeAudioCaptureUI()
 {
     RefreshAudioDeviceList();
     AudioProcesser.SetupAudioProcessor(FFTCallback);
 }