Add signal handlers for a proper cleanup

Fix locking problem in get_rtlsdr_sample when it waits indefinitely
even when exitflag is non-zero; cleanup the code.
This commit is contained in:
Volo Zyko
2023-06-30 14:12:48 +03:00
parent eacbd21c50
commit 0e9b2b245d
5 changed files with 39 additions and 12 deletions

View File

@@ -1130,7 +1130,7 @@ extern "C" {
#ifdef USE_RTLSDR
void open_rtlsdr_stream(dsd_opts *opts);
void cleanup_rtlsdr_stream();
void get_rtlsdr_sample(int16_t *sample, dsd_opts * opts, dsd_state * state);
int get_rtlsdr_sample(int16_t *sample, dsd_opts * opts, dsd_state * state);
void rtlsdr_sighandler();
void rtl_dev_tune(dsd_opts * opts, long int frequency);
int rtl_return_rms();