Skip to content

Commit

Permalink
delete any previous output filter when restarting
Browse files Browse the repository at this point in the history
  • Loading branch information
ka9q committed Apr 30, 2024
1 parent 21a6f0f commit 2fd226a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void *demod_fm(void *arg){
FREE(chan->filter.energies);
FREE(chan->spectrum.bin_data);
int const blocksize = chan->output.samprate * Blocktime / 1000;
delete_filter_output(&chan->filter.out);
create_filter_output(&chan->filter.out,&Frontend.in,NULL,blocksize,COMPLEX);
pthread_mutex_unlock(&chan->status.lock);

Expand Down
1 change: 1 addition & 0 deletions linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ void *demod_linear(void *arg){
FREE(chan->filter.energies);
FREE(chan->spectrum.bin_data);
int const blocksize = chan->output.samprate * Blocktime / 1000;
delete_filter_output(&chan->filter.out);
create_filter_output(&chan->filter.out,&Frontend.in,NULL,blocksize,COMPLEX);
pthread_mutex_unlock(&chan->status.lock);

Expand Down
1 change: 1 addition & 0 deletions wfm.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void *demod_wfm(void *arg){
FREE(chan->filter.energies);
FREE(chan->spectrum.bin_data);
int const blocksize = chan->output.samprate * Blocktime / 1000;
delete_filter_output(&chan->filter.out);
create_filter_output(&chan->filter.out,&Frontend.in,NULL,blocksize,COMPLEX);
pthread_mutex_unlock(&chan->status.lock);

Expand Down

0 comments on commit 2fd226a

Please sign in to comment.