This project has moved and is read-only. For the latest updates, please go here.

actually 8-bit samples or not 16-bit samples

Jan 28, 2014 at 12:45 AM
here is my code:
 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]);
                tempint++;

            }

            DSP = new DSPclass(buffer1, 44100);
            DSP.FFT1();
e.buffer is one sample 16 bit samples and not 8 bit samples right?
is there a way to check that ?
Jan 28, 2014 at 7:56 AM
check it by looking at the bits per sample of the WaveFormat you are recording with. Usually it is 16 bit, but it is possible to record at other bit depths.