are no longer present.
for(int i=0;i<receivers;i++) {
receiver_restore_state(receiver[i]);
if(receiver[i]->local_audio) {
- audio_open_output(receiver[i]);
+ if (audio_open_output(receiver[i]) < 0) receiver[i].local_audio=0;
}
}
reconfigure_radio();
fprintf(stderr,"create_receiver: rx=%p id=%d local_audio=%d\n",rx,rx->id,rx->local_audio);
if(rx->local_audio) {
- audio_open_output(rx);
+ if (audio_open_output(rx) < 0) rx->local_audio=0;
}
return rx;
i=gtk_combo_box_get_active(GTK_COMBO_BOX(output));
if (i < 0) {
gtk_combo_box_set_active(GTK_COMBO_BOX(output),0);
+ if (active_receiver->audio_name != NULL) {
+ g_free(active_receiver->audio_name);
+ active_receiver->audio_name=g_new(gchar,strlen(output_devices[0].name)+1);
+ strcpy(active_receiver->audio_name,output_devices[0].name);
+ }
}
gtk_grid_attach(GTK_GRID(grid),output,x,++row,1,1);
}
// If the combo box shows no device, take the first one
+ // AND set the mic.name to that device name.
+ // This situation occurs if the local microphone device in the props
+ // file is no longer present
+
i=gtk_combo_box_get_active(GTK_COMBO_BOX(input));
if (i < 0) {
gtk_combo_box_set_active(GTK_COMBO_BOX(input),0);
+ if(transmitter->microphone_name!=NULL) {
+ g_free(transmitter->microphone_name);
+ }
+ transmitter->microphone_name=g_new(gchar,strlen(input_devices[0].name)+1);
+ strcpy(transmitter->microphone_name,input_devices[0].name);
}
gtk_grid_attach(GTK_GRID(grid),input,col,row,3,1);