FFT results not matching expected values with 44100 Hz sampling and 16384 samples
- Topic: C#
- Thread starter btb4198
- Start date
-
- Tags
- Fft
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
33 replies · 7K views
Physics news on Phys.org
btb4198
- 570
- 10
I do not know... how can I find out ?
I am using the default microphone on my computer..
what is the different between stereo and mono for a microphone ?
mono is one.. so one mic
so it stereo more that one mic?
how would did affect the input samples ?
I am using the default microphone on my computer..
what is the different between stereo and mono for a microphone ?
mono is one.. so one mic
so it stereo more that one mic?
how would did affect the input samples ?
Science Advisor
Homework Helper
- 4,070
- 2,120
I don't know how you are grabbing the information. At some point you must have specified 44100Hz, 16 bits per sample. When you did that, the same data structure should have included whether the signal would be stereo or mono.btb4198 said:I do not know... how can I find out ?
I am using the default microphone on my computer..
what is the different between stereo and mono for a microphone ?
mono is one.. so one mic
so it stereo more that one mic?
how would did affect the input samples ?
btb4198
- 570
- 10
AlephZero
this code:
I am really reading in 44100 bytes at a time from the Microphone and not 32768
I am sending 16384 samples to the FFT because I am 2^N sample for the FFT
anynow so should the code really be
because the Microphone is sending 44100 bytes
I am not sure about this
so i maybe thinking of this all wrong
this code:
Code:
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++;
}
I am sending 16384 samples to the FFT because I am 2^N sample for the FFT
anynow so should the code really be
Code:
int tempint = 0;
for (int index = 0; index < 32768; index += 2)
{
buffer1[tempint] = ((buffer[index + 1] << 8) |
buffer[index + 0]);
if (buffer1[tempint] > 44100)
buffer1[tempint] = buffer1[tempint] - 88200;
tempint++;
I am not sure about this
so i maybe thinking of this all wrong