summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/sdr_fm.c9
-rw-r--r--test/ui_gl_waterfall.c2
-rw-r--r--test/ui_tui_waterfall.c2
3 files changed, 9 insertions, 4 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");
diff --git a/test/ui_gl_waterfall.c b/test/ui_gl_waterfall.c
index 72dec46..837383f 100644
--- a/test/ui_gl_waterfall.c
+++ b/test/ui_gl_waterfall.c
@@ -302,7 +302,7 @@ int main( int argc, char **argv )
sample_buf = malloc( sample_len );
srand(0); //fake seed
- for ( i=0; i<400;i++ )
+ for ( i=0; i<4000;i++ )
{
//for (j=0; j<buf_len; j++)
// sample_buf[j] = (uint8_t)((rand()&0xff));
diff --git a/test/ui_tui_waterfall.c b/test/ui_tui_waterfall.c
index c322670..355751f 100644
--- a/test/ui_tui_waterfall.c
+++ b/test/ui_tui_waterfall.c
@@ -247,7 +247,7 @@ int main()
sample_buf = malloc( sample_len );
srand(0); //fake seed
- for ( i=0; i<400;i++ )
+ for ( i=0; i<40;i++ )
{
//for (j=0; j<buf_len; j++)
// sample_buf[j] = (uint8_t)((rand()&0xff));