Example #1
0
        float micGain        = 1f; // default is 1, and default is probably too quiet. my microphone needs about 50, for instance.

        public MainPage()
        {
            this.InitializeComponent();
            Instance = this;

            micGain = (float)((Slider)this.FindName("slider")).Value;   // these lines automatically sets the mic volume based off of the XAML slider element's starting point
            MicStreamSelector.MicSetGain(micGain);
        }
Example #2
0
 private void StopRecording_Click(object sender, RoutedEventArgs e)
 {
     MicStreamSelector.StopMicDevice();
     ActiveMicColor = Colors.Red;
     SetVolumeMonitor(0f); // forces one more color update to show RED mic monitor
 }
Example #3
0
 private void StartRecording_Click(object sender, RoutedEventArgs e)
 {
     MicStreamSelector.MicSetGain(micGain);
     MicStreamSelector.StartRecording("myfilenamewithextension.wav");
     ActiveMicColor = Colors.Green;
 }
Example #4
0
 private void StartStream_Click(object sender, RoutedEventArgs e)
 {
     MicStreamSelector.MicSetGain(micGain);
     MicStreamSelector.StartStream();
     ActiveMicColor = Colors.Green;
 }
Example #5
0
 private void slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
 {
     micGain = (float)e.NewValue;
     MicStreamSelector.MicSetGain(micGain); // changes volume immediately if already running
 }
Example #6
0
 private void slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
 {
     micGain = (float)e.NewValue;
     MicStreamSelector.MicSetGain(micGain);
 }