Skip to content

Commit

Permalink
Merge pull request #1271 from sultanqasim/performance
Browse files Browse the repository at this point in the history
performance: Improve resampler performance
  • Loading branch information
argilo authored Sep 27, 2023
2 parents c57a0df + 3f0fe75 commit c5ddff3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
IMPROVED: Waterfall span setting is stored in milliseconds.
IMPROVED: Added 6 dB attenuation to WAV file recordings to prevent clipping.
IMPROVED: Use logarithmic scale for frequency zoom slider.
IMPROVED: Reduced CPU utilization of demodulators.
CHANGED: Frequency zoom slider zooms around center of display.
CHANGED: Disallow scrolling beyond the FFT frequency limits.
CHANGED: Default narrow FM deviation increased to 5 kHz.
Expand Down
3 changes: 3 additions & 0 deletions src/dsp/resampler_xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <gnuradio/filter/firdes.h>
#include "dsp/resampler_xx.h"

#define RESAMPLER_OUTPUT_MULTIPLE 4096

/* Create a new instance of resampler_cc and return
* a shared_ptr. This is effectively the public constructor.
Expand Down Expand Up @@ -57,6 +58,7 @@ resampler_cc::resampler_cc(float rate)

/* create the filter */
d_filter = gr::filter::pfb_arb_resampler_ccf::make(rate, d_taps, flt_size);
d_filter->set_output_multiple(RESAMPLER_OUTPUT_MULTIPLE);

/* connect filter */
connect(self(), 0, d_filter, 0);
Expand All @@ -82,6 +84,7 @@ void resampler_cc::set_rate(float rate)
disconnect(d_filter, 0, self(), 0);
d_filter.reset();
d_filter = gr::filter::pfb_arb_resampler_ccf::make(rate, d_taps, flt_size);
d_filter->set_output_multiple(RESAMPLER_OUTPUT_MULTIPLE);
connect(self(), 0, d_filter, 0);
connect(d_filter, 0, self(), 0);
unlock();
Expand Down

0 comments on commit c5ddff3

Please sign in to comment.