Commit 4021631a authored by Ahmet Inan's avatar Ahmet Inan
Browse files

oops: we also need M samples of history for ddc

parent cb5abfec
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment