sound buffer size RRS feed

  • Question

  • can I increase my sound buffer size?

    right now I am getting 

    17640 bytes  coming in at a time.


    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;

    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 

    • Moved by Eason_H Monday, January 20, 2014 5:26 AM
    Saturday, January 18, 2014 1:19 AM

All replies

  • Hi Btb4198,

    I’m afraid that it is not the correct forum about this issue, since this forum is to discuss Visual C#. I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 20, 2014 5:26 AM
  • yes is it in the right forum 

    Monday, January 20, 2014 5:33 PM