Add function to display wave form from input/loop

Use 'w' to toggle display.

Move terminal input processing and main loop to main_common.c
This commit is contained in:
Andreas Eversberg
2016-06-17 07:28:45 +02:00
parent 4e0e13cb2d
commit 7d5d3da8d3
9 changed files with 223 additions and 101 deletions

12
src/common/display_wave.h Normal file
View File

@@ -0,0 +1,12 @@
typedef struct sender sender_t;
typedef struct display_wave {
int interval_pos;
int interval_max;
int16_t buffer[256];
} dispwav_t;
void display_wave_init(sender_t *sender, int samplerate);
void display_wave_on(int on);
void display_wave(sender_t *sender, int16_t *samples, int length);