summaryrefslogtreecommitdiff
path: root/test/sdr_fm.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-12-19 16:32:12 +0000
committerFreeArtMan <dos21h@gmail.com>2015-12-19 16:32:12 +0000
commit9381ae971066a42ad00def424c29370ced09eb60 (patch)
tree93e69c6920579ef0f499a9c79aab67d9aa1bc474 /test/sdr_fm.c
parent80971b7c44ef1066b6555c5802b1f1d67e20bed2 (diff)
downloadradiola-9381ae971066a42ad00def424c29370ced09eb60.tar.gz
radiola-9381ae971066a42ad00def424c29370ced09eb60.zip
Added menuconfig support. Added default config files for Linux and NetBSD. Added kconf2h tool. Small fixes to README
Diffstat (limited to 'test/sdr_fm.c')
-rw-r--r--test/sdr_fm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/sdr_fm.c b/test/sdr_fm.c
index 24c69d0..80df657 100644
--- a/test/sdr_fm.c
+++ b/test/sdr_fm.c
@@ -6,6 +6,8 @@
#include <unistd.h>
#include <complex.h>
+#include <sys/timeb.h>
+
#include <hw/hw.h>
#include <hw/sdr.h>
@@ -13,7 +15,7 @@
#define RESAMPLE_RATE 50000
#define CENTER_FREQ 101100000
-#define FFT_LEVEL 18
+#define FFT_LEVEL 10
#define FFT_SIZE (1 << FFT_LEVEL)
#define SAMPLE_LENGHT (2 * FFT_SIZE)
#define PRESCALE 8
@@ -224,7 +226,6 @@ void delay_filt( uint8_t *buf, int buf_len )
cyc_buffer_i[cycle] = avg_i;
cyc_buffer_q[cycle] = avg_q;
cycle = cycle + 1;
- //cycle += 1;
if ( cycle >= n )
{
cycle = 0;
@@ -263,6 +264,8 @@ int main( int argc, char **argv )
sdr_t *sdr = NULL;
dongle_t *dongle = NULL;
+ struct timeb tb;
+
// get all argument configs
opterr = 0;
while ( (c = getopt(argc, argv, "f:s:d:")) != -1 )
@@ -377,6 +380,8 @@ int main( int argc, char **argv )
//write to play
write(1, sound_buf, ((SAMPLE_LENGHT/20)*sizeof(signed short)));
+ //ftime(&tb);
+ //printf("%d\n",tb.millitm);
//exit(0);
//usleep(1);
//printf("Sample\n");