From: John Melton - G0ORX/N6LYT Date: Tue, 8 Nov 2016 22:49:08 +0000 (+0000) Subject: changed volume control and mic gain to use wdsp patchpanel. Added updated libwdsp.so. X-Git-Url: https://git.rkrishnan.org/uri//%22%22?a=commitdiff_plain;h=07b390d87d2962ca384e19f29fdfb2d575b7ce35;p=pihpsdr.git changed volume control and mic gain to use wdsp patchpanel. Added updated libwdsp.so. --- diff --git a/audio.c b/audio.c index 8e3c92f..3f3d4c6 100644 --- a/audio.c +++ b/audio.c @@ -161,8 +161,9 @@ int audio_open_input() { int rate=48000; int dir=0; - if(n_selected_output_device<0 || n_selected_output_device>=n_output_devices) { - n_selected_output_device=-1; +fprintf(stderr,"audio_open_input: %d\n",n_selected_input_device); + if(n_selected_input_device<0 || n_selected_input_device>=n_input_devices) { + n_selected_input_device=-1; return -1; } diff --git a/main.c b/main.c index 6c95e0a..8feeb93 100644 --- a/main.c +++ b/main.c @@ -676,6 +676,9 @@ fprintf(stderr,"toolbar_height=%d\n",TOOLBAR_HEIGHT); GdkWindow *gdk_window = gtk_widget_get_window(window); gdk_window_set_cursor(gdk_window,cursor_arrow); + // start the receiver + SetChannelState(CHANNEL_RX0,1,1); + //update_timer_id=gdk_threads_add_timeout(1000/updates_per_second, update, NULL); update_timer_id=gdk_threads_add_timeout_full(G_PRIORITY_HIGH_IDLE,1000/updates_per_second, update, NULL, NULL); diff --git a/menu.c b/menu.c index c2f3f98..05e24d3 100644 --- a/menu.c +++ b/menu.c @@ -224,6 +224,8 @@ static void local_input_changed_cb(GtkWidget *widget, gpointer data) { audio_close_input(); if(audio_open_input()==0) { local_microphone=1; + } else { + local_microphone=0; } } } diff --git a/new_protocol.c b/new_protocol.c index 804fc6c..774a18c 100644 --- a/new_protocol.c +++ b/new_protocol.c @@ -794,8 +794,6 @@ static void process_iq_data(unsigned char *buffer) { bitspersample=((buffer[12]&0xFF)<<8)+(buffer[13]&0xFF); samplesperframe=((buffer[14]&0xFF)<<8)+(buffer[15]&0xFF); -//fprintf(stderr,"samples per frame %d\n",samplesperframe); - //if(!isTransmitting()) { b=16; int i; @@ -880,10 +878,10 @@ static void process_mic_data(unsigned char *buffer) { b=4; int i,j,s; for(i=0;i