MicSetGain() private method

private MicSetGain ( float g ) : int
g float
return int
Beispiel #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);
        }
Beispiel #2
0
 private void StartRecording_Click(object sender, RoutedEventArgs e)
 {
     MicStreamSelector.MicSetGain(micGain);
     MicStreamSelector.StartRecording("myfilenamewithextension.wav");
     ActiveMicColor = Colors.Green;
 }
Beispiel #3
0
 private void StartStream_Click(object sender, RoutedEventArgs e)
 {
     MicStreamSelector.MicSetGain(micGain);
     MicStreamSelector.StartStream();
     ActiveMicColor = Colors.Green;
 }
Beispiel #4
0
 private void slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
 {
     micGain = (float)e.NewValue;
     MicStreamSelector.MicSetGain(micGain); // changes volume immediately if already running
 }
Beispiel #5
0
 private void slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
 {
     micGain = (float)e.NewValue;
     MicStreamSelector.MicSetGain(micGain);
 }