oops: we also need M samples of history for ddc

master
Ahmet Inan 2012-09-15 16:50:20 +02:00
rodzic cb5abfecd0
commit 4021631af6
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -116,7 +116,8 @@ int main(int argc, char **argv)
short *pcm_buff = (short *)malloc(sizeof(short) * channels * factor_M);
// 0.1 second history + enough room for delay and taps
struct buffer *buffer = alloc_buffer(0.1 * rate + 2 * fmaxf(cnt_delay, dat_delay));
int buff_len = 0.1 * rate + factor_M + 2 * fmaxf(cnt_delay, dat_delay);
struct buffer *buffer = alloc_buffer(buff_len);
const float sync_porch_len = 0.003;
const float porch_len = 0.0015; (void)porch_len;

Wyświetl plik

@ -340,7 +340,8 @@ int demodulate(struct pcm *pcm, float *cnt_freq, float *dat_freq, float *drate)
pcm_buff = (short *)malloc(sizeof(short) * channels * factor_M);
// 0.1 second history + enough room for delay and taps
buffer = alloc_buffer(0.1 * rate + 2 * fmaxf(cnt_delay, dat_delay));
int buff_len = 0.1 * rate + factor_M + 2 * fmaxf(cnt_delay, dat_delay);
buffer = alloc_buffer(buff_len);
// start immediately below
out = factor_L;