mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-12-26 10:58:28 +01:00
rtl_fm: missed a var init
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
d56267a42f
commit
6e80117205
@ -28,6 +28,7 @@
|
|||||||
* replace atan2 with a fast approximation
|
* replace atan2 with a fast approximation
|
||||||
* in-place array operations
|
* in-place array operations
|
||||||
* wide band support
|
* wide band support
|
||||||
|
* sanity checks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -254,7 +255,7 @@ static void optimal_settings(struct fm_state *fm, int freq, int hopping)
|
|||||||
fm->output_scale = 1;}
|
fm->output_scale = 1;}
|
||||||
fm->output_scale = 1;
|
fm->output_scale = 1;
|
||||||
/* Set the frequency */
|
/* Set the frequency */
|
||||||
r = rtlsdr_set_center_freq(dev, capture_freq);
|
r = rtlsdr_set_center_freq(dev, (uint32_t)capture_freq);
|
||||||
if (hopping) {
|
if (hopping) {
|
||||||
return;}
|
return;}
|
||||||
fprintf(stderr, "Oversampling by: %ix.\n", fm->downsample);
|
fprintf(stderr, "Oversampling by: %ix.\n", fm->downsample);
|
||||||
@ -264,7 +265,7 @@ static void optimal_settings(struct fm_state *fm, int freq, int hopping)
|
|||||||
fprintf(stderr, "Tuned to %u Hz.\n", capture_freq);}
|
fprintf(stderr, "Tuned to %u Hz.\n", capture_freq);}
|
||||||
|
|
||||||
/* Set the sample rate */
|
/* Set the sample rate */
|
||||||
r = rtlsdr_set_sample_rate(dev, capture_rate);
|
r = rtlsdr_set_sample_rate(dev, (uint32_t)capture_rate);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "WARNING: Failed to set sample rate.\n");}
|
fprintf(stderr, "WARNING: Failed to set sample rate.\n");}
|
||||||
|
|
||||||
@ -337,6 +338,7 @@ int main(int argc, char **argv)
|
|||||||
fm.sample_rate = DEFAULT_SAMPLE_RATE;
|
fm.sample_rate = DEFAULT_SAMPLE_RATE;
|
||||||
fm.squelch_level = 150;
|
fm.squelch_level = 150;
|
||||||
fm.freq_len = 0;
|
fm.freq_len = 0;
|
||||||
|
fm.edge = 0;
|
||||||
sem_init(&data_ready, 0, 0);
|
sem_init(&data_ready, 0, 0);
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
while ((opt = getopt(argc, argv, "d:f:g:s:b:l:E::")) != -1) {
|
while ((opt = getopt(argc, argv, "d:f:g:s:b:l:E::")) != -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user