Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

sound buffer size

$
0
0

can I increase my sound buffer size?

right now I am getting 

17640 bytes  coming in at a time.

then

i do this code: 

 int bytesRecorded = e.BytesRecorded;
            buffer1 = new double[(8192)];
            //  WriteToFile(buffer, bytesRecorded);
            int tempint = 0;
            for (int index = 0; index < 16384; index += 2)
            {
                short sample = (short)((buffer[index + 1] << 8) |
                                        buffer[index + 0]);
                float sample32 = sample / 32768f;
                buffer1[tempint] = (double)sample32;
                tempint++;

and then I send it to my FFT

my FFT only works at 2^(number) samples at a time

so I can only do 8192 samples at a time

I wanted to do more samples at a time, so I can get an higher accuracy 


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

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