Update main.c

pull/76/head
alanbjohnston 5 years ago committed by GitHub
parent bf8da5412c
commit 1df9a30367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1887,9 +1887,9 @@ void write_wave(int i, short int *buffer)
else else
{ {
if ((ctr - flip_ctr) < smaller) if ((ctr - flip_ctr) < smaller)
buffer[ctr++] = (int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE)));
else else
buffer[ctr++] = (int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE)));
} }
// printf("%d %d \n", i, buffer[ctr - 1]); // printf("%d %d \n", i, buffer[ctr - 1]);

Loading…
Cancel
Save

Powered by TurnKey Linux.