Update main.c fix {}

fc-2
Alan Johnston 11 months ago committed by GitHub
parent c640b477a9
commit 9e102a166e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1983,7 +1983,7 @@ void write_wave(int i, short int *buffer)
// buffer[ctr++] = (short int)(amplitude * 0.4 * 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)));
buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]);
}
if (ctr < 1000) printf("%d %d \n", i, buffer[ctr - 1]);
if (ctr < 1000) printf("%d %d %d \n", ctr, i, buffer[ctr - 1]);
}
@ -2376,10 +2376,11 @@ void get_tlm_fc() {
phase *= -1;
if ((ctr - smaller) > 0) {
int j;
for (j = 1; j <= smaller; j++)
for (j = 1; j <= smaller; j++) {
buffer[ctr - j] = buffer[ctr - j] * 0.4;
if (ctr < 1000) printf("# %d %d\n", ctr - j, buffer[ctr - j]);
}
}
flip_ctr = ctr;
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.