From 695df30818636b52f7790c33e35f3ecb14c626b3 Mon Sep 17 00:00:00 2001 From: c vw Date: Wed, 9 Dec 2020 12:32:06 +0100 Subject: [PATCH] This correction is needed when changing sample rate while using zoom>1. --- receiver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/receiver.c b/receiver.c index 6164b43..bc5a464 100644 --- a/receiver.c +++ b/receiver.c @@ -1247,6 +1247,12 @@ g_print("receiver_change_sample_rate: id=%d rate=%d scale=%d buffer_size=%d outp SetChannelState(rx->id,1,0); + // + // for a non-PS receiver, adjust pixels and hz_per_pixel depending on the zoom value + // + rx->pixels=rx->width*rx->zoom; + rx->hz_per_pixel=(double)rx->sample_rate/(double)rx->pixels; + g_mutex_unlock(&rx->mutex); fprintf(stderr,"receiver_change_sample_rate: id=%d rate=%d buffer_size=%d output_samples=%d\n",rx->id, rx->sample_rate, rx->buffer_size, rx->output_samples); -- 2.45.2