]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
fixed typo fro GINT_TO_POINTER
authorJohn Melton G0ORX <john.d.melton@googlemail.com>
Sun, 13 Oct 2019 15:59:19 +0000 (16:59 +0100)
committerJohn Melton G0ORX <john.d.melton@googlemail.com>
Sun, 13 Oct 2019 15:59:19 +0000 (16:59 +0100)
ps_menu.c
receiver.c
receiver.h
soapy_protocol.c

index 58dac1fafffc90d6037488ad6a5eb672b2aff995..c560b7d327fad21b09f3da413e2e3c2930a7f247 100644 (file)
--- a/ps_menu.c
+++ b/ps_menu.c
@@ -286,7 +286,7 @@ static void ps_ant_cb(GtkWidget *widget, gpointer data) {
 }
 
 static void enable_cb(GtkWidget *widget, gpointer data) {
-  g_idle_add(ext_tx_set_ps,GINT_TO_PTR(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))));
+  g_idle_add(ext_tx_set_ps,GINT_TO_POINTER(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))));
 }
 
 static void auto_cb(GtkWidget *widget, gpointer data) {
index 99f3d5224ce7b35d9d666f87eb9fc15c96e737ea..524ff1140db447df0b2f71c004921be153aadcfb 100644 (file)
@@ -456,11 +456,6 @@ fprintf(stderr,"receiver_restore_state: id=%d\n",rx->id);
   if(value) rx->audio_channel=atoi(value);
   sprintf(name,"receiver.%d.local_audio",rx->id);
   value=getProperty(name);
-if(value) {
-  fprintf(stderr,"%s=%s\n",name,value);
-} else {
-  fprintf(stderr,"%s=NULL\n",name);
-}
   if(value) rx->local_audio=atoi(value);
   sprintf(name,"receiver.%d.mute_when_not_active",rx->id);
   value=getProperty(name);
index 0464c6321c7fa3ea698fdb181e5c3474b3c6d002..8a98c2ab5fb6b75ccaad1d9f485e8423ac737e40 100644 (file)
@@ -37,47 +37,47 @@ enum _audio_t {
 typedef enum _audio_t audio_t;
 
 typedef struct _receiver {
-  int id;
-
-  int ddc;
-  int adc;
-
-  double volume;
-  int agc;
-  double agc_gain;
-  double agc_slope;
-  double agc_hang_threshold;
-  int fps;
-  int displaying;
+  gint id;
+
+  gint ddc;
+  gint adc;
+
+  gdouble volume;
+  gint agc;
+  gdouble agc_gain;
+  gdouble agc_slope;
+  gdouble agc_hang_threshold;
+  gint fps;
+  gint displaying;
   audio_t audio_channel;
-  int sample_rate;
-  int buffer_size;
-  int fft_size;
-  int pixels;
-  int samples;
-  int output_samples;
-  double *iq_input_buffer;
-  double *audio_output_buffer;
-  unsigned char *audio_buffer;
-  int audio_index;
-  long audio_sequence;
-  float *pixel_samples;
-  int display_panadapter;
-  int display_waterfall;
+  gint sample_rate;
+  gint buffer_size;
+  gint fft_size;
+  gint pixels;
+  gint samples;
+  gint output_samples;
+  gdouble *iq_input_buffer;
+  gdouble *audio_output_buffer;
+  guchar *audio_buffer;
+  gint audio_index;
+  guint32 audio_sequence;
+  gfloat *pixel_samples;
+  gint display_panadapter;
+  gint display_waterfall;
   gint update_timer_id;
 
-  double hz_per_pixel;
+  gdouble hz_per_pixel;
 
-  int dither;
-  int random;
-  int preamp;
+  gint dither;
+  gint random;
+  gint preamp;
 
-  int nb;
-  int nb2;
-  int nr;
-  int nr2;
-  int anf;
-  int snb;
+  gint nb;
+  gint nb2;
+  gint nr;
+  gint nr2;
+  gint anf;
+  gint snb;
 
   int nr_agc;
   int nr2_gain_method;
@@ -85,64 +85,64 @@ typedef struct _receiver {
   int nr2_ae;
 
 
-  int alex_antenna;
-  int alex_attenuation;
+  gint alex_antenna;
+  gint alex_attenuation;
 
-  int filter_low;
-  int filter_high;
+  gint filter_low;
+  gint filter_high;
 
-  int width;
-  int height;
+  gint width;
+  gint height;
 
   GtkWidget *panel;
   GtkWidget *panadapter;
   GtkWidget *waterfall;
 
-  int panadapter_low;
-  int panadapter_high;
-  int panadapter_step;
+  gint panadapter_low;
+  gint panadapter_high;
+  gint panadapter_step;
 
-  int waterfall_low;
-  int waterfall_high;
-  int waterfall_automatic;
+  gint waterfall_low;
+  gint waterfall_high;
+  gint waterfall_automatic;
   cairo_surface_t *panadapter_surface;
   GdkPixbuf *pixbuf;
-  int local_audio;
-  int mute_when_not_active;
-  int audio_device;
+  gint local_audio;
+  gint mute_when_not_active;
+  gint audio_device;
 #ifdef PORTAUDIO
   PaStream *playback_handle;
-  float *playback_buffer;
+  gfloat *playback_buffer;
 #else
   snd_pcm_t *playback_handle;
-  unsigned char *playback_buffer;
+  guchar *playback_buffer;
 #endif
-  int playback_offset;
-  int low_latency;
+  gint playback_offset;
+  gint low_latency;
 
-  int squelch_enable;
-  double squelch;
+  gint squelch_enable;
+  gdouble squelch;
 
-  int deviation;
+  gint deviation;
 
-  long long waterfall_frequency;
-  int waterfall_sample_rate;
+  gint64 waterfall_frequency;
+  gint waterfall_sample_rate;
 
-  int mute_radio;
+  gint mute_radio;
 
   gdouble *buffer;
-  int resample_step;
+  gint resample_step;
 
 #ifdef FREEDV
   GMutex freedv_mutex;
-  int freedv;
-  int freedv_samples;
-  char freedv_text_data[64];
-  int freedv_text_index;
+  gint freedv;
+  gint freedv_samples;
+  gchar freedv_text_data[64];
+  gint freedv_text_index;
 #endif
 
-  int x;
-  int y;
+  gint x;
+  gint y;
 } RECEIVER;
 
 extern RECEIVER *create_pure_signal_receiver(int id, int buffer_size,int sample_rate,int pixels);
index b66e28fd2defdf6733124cfb1ba057ac0fbb69b5..a556300f9576278aa9e1183e4121800b91b9d8cc 100644 (file)
@@ -102,6 +102,9 @@ void soapy_protocol_create_receiver(RECEIVER *rx) {
   int rc;
 
   soapy_rx_sample_rate=rx->sample_rate;
+  if(rx->sample_rate!=radio_sample_rate) {
+    soapy_rx_sample_rate=radio_sample_rate;
+  }
 
 fprintf(stderr,"soapy_protocol_create_receiver: setting samplerate=%f adc=%d\n",(double)soapy_rx_sample_rate,rx->adc);
   rc=SoapySDRDevice_setSampleRate(soapy_device,SOAPY_SDR_RX,rx->adc,(double)soapy_rx_sample_rate);