aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtl_fm.c
diff options
context:
space:
mode:
authorKyle Keen <keenerd@gmail.com>2012-05-30 18:05:36 -0400
committerSteve Markgraf <steve@steve-m.de>2012-07-17 20:42:03 +0200
commit6e80117205fd8efc919ca5e38d69c0a3760cc82f (patch)
treece783804d77963becefee49e3c6c7be9eba1bd47 /src/rtl_fm.c
parentd56267a42fad156baa7b99c14fbdb9938a40ce6b (diff)
rtl_fm: missed a var init
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/rtl_fm.c')
-rw-r--r--src/rtl_fm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rtl_fm.c b/src/rtl_fm.c
index 4d6deb9..4dc625f 100644
--- a/src/rtl_fm.c
+++ b/src/rtl_fm.c
@@ -28,6 +28,7 @@
* replace atan2 with a fast approximation
* in-place array operations
* wide band support
+ * sanity checks
*/
#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;
/* Set the frequency */
- r = rtlsdr_set_center_freq(dev, capture_freq);
+ r = rtlsdr_set_center_freq(dev, (uint32_t)capture_freq);
if (hopping) {
return;}
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);}
/* 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) {
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.squelch_level = 150;
fm.freq_len = 0;
+ fm.edge = 0;
sem_init(&data_ready, 0, 0);
#ifndef _WIN32
while ((opt = getopt(argc, argv, "d:f:g:s:b:l:E::")) != -1) {