|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|