Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: noisy input

$
0
0
this is a video i uploaded to youtube

http://www.youtube.com/watch?v=92UC_drDwB4&feature=youtu.be

why is my input signal so noisy?

I am doing

44100 sampling rate
32768 samples at a time

I have a filter in that i drop any Frequencies with a Magnitude less then 300000
this is so I can cut out noise

I am displaying 500 samples at a time

here in my code :
 void Voice()
        {

            int deviceNumber = 0;
            waveIn = new WaveIn();
            waveIn.BufferMilliseconds = 250;
            waveIn.DeviceNumber = deviceNumber;
            waveIn.DataAvailable += waveIn_DataAvailable;
            waveIn.WaveFormat = new WaveFormat(44100, NAudio.Wave.WaveIn.GetCapabilities(deviceNumber).Channels);
            waveIn.StartRecording();
        }

void waveIn_DataAvailable(object sender, WaveInEventArgs e)
        {
           
            PointPairList list = new PointPairList();
            PointPairList list2 = new PointPairList();
            byte[] buffer = e.Buffer;
            int bytesRecorded = e.BytesRecorded;
            points = new RollingPointPairList(32768/2);
            buffer1 = new double[(32768/2)];
    int tempint = 0;
            for (int index = 0; index < 32768; index += 2)
            {

                buffer1[tempint] = ((buffer[index + 1] << 8) |
                                      buffer[index + 0]);
                
                if (buffer1[tempint] > 32767)
                    buffer1[tempint] = buffer1[tempint] - 65536;

                tempint++;

            }
ect...

Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>