I found this code online and I have been using it, but I do not know why you have to
divide by 32768f. and why do you have to make it a short ?
I want my to be a double to that is why I added
buffer1[tempint] = (double)sample32;
is there a better way of doing it ?
divide by 32768f. and why do you have to make it a short ?
I want my to be a double to that is why I added
buffer1[tempint] = (double)sample32;
is there a better way of doing it ?
void waveIn_DataAvailable(object sender, WaveInEventArgs e)
{
t sample = (short)((buffer[index + 1] << 8) |
buffer[index + 0]);
float sample32 = sample / 32768f;
buffer1[tempint] = (double)sample32;
tempint++;
}
and why do you have to divide by 32768f?