slowrx/common.h

96 wiersze
2.1 KiB
C
Czysty Zwykły widok Historia

2011-07-07 14:09:57 +00:00
#ifndef _COMMON_H_
#define _COMMON_H_
#define MINSLANT 30
#define MAXSLANT 150
2011-07-29 20:09:42 +00:00
#define SNRSIZE 512
#define SRATE 44100
2011-07-07 14:09:57 +00:00
extern int VISmap[128];
extern FILE *PcmInStream;
extern short int PcmBuffer[2048];
extern double *PCM;
extern int PcmPointer;
extern int Sample;
extern int UseWav;
extern guchar *rgbbuf;
extern int maxpwr;
extern int minpwr;
2011-07-29 20:09:42 +00:00
extern unsigned int SRate;
2011-07-07 14:09:57 +00:00
extern double PowerAcc[2048];
extern double MaxPower[2048];
extern double *StoredFreq;
extern double StoredFreqRate;
extern double HedrShift;
2011-08-02 23:42:56 +00:00
extern GtkWidget *mainwindow;
2011-07-07 14:09:57 +00:00
extern GtkWidget *notebook;
2011-07-29 13:01:30 +00:00
extern GdkPixbuf *RxPixbuf;
extern GdkPixbuf *DispPixbuf;
2011-08-02 14:48:00 +00:00
extern GtkWidget *RxImage;
2011-07-07 14:09:57 +00:00
extern GtkWidget *statusbar;
extern GtkWidget *snrbar;
extern GtkWidget *pwrbar;
2011-08-02 23:42:56 +00:00
extern GtkWidget *vugrid;
extern GdkPixbuf *VUpixbufPWR;
2011-07-07 14:09:57 +00:00
extern GdkPixbuf *VUpixbufSNR;
2011-08-02 23:42:56 +00:00
extern GdkPixbuf *VUpixbufDim;
extern GtkWidget *PWRimage[10];
2011-07-07 14:09:57 +00:00
extern GtkWidget *SNRimage[10];
extern GtkWidget *infolabel;
2011-08-02 23:42:56 +00:00
extern GtkWidget *aboutdialog;
2011-08-07 17:46:35 +00:00
extern GtkWidget *sdialog;
extern GtkWidget *cardcombo;
2011-07-07 14:09:57 +00:00
2011-07-29 20:09:42 +00:00
extern snd_pcm_t *pcm_handle;
2011-07-07 14:09:57 +00:00
enum {
2011-08-07 17:46:35 +00:00
UNKNOWN=0,
2011-07-07 14:09:57 +00:00
M1, M2, M3, M4,
S1, S2, SDX,
R72, R36, R24, R24BW, R12BW, R8BW,
PD50, PD90, PD120, PD160, PD180, PD240, PD290,
P3, P5, P7,
2011-08-07 17:46:35 +00:00
W2120, W2180
2011-07-07 14:09:57 +00:00
};
enum {
GBR, RGB, YUV, BW
};
typedef struct ModeSpecDef {
char *Name;
char *ShortName;
double SyncLen;
double PorchLen;
double SeparatorLen;
double PixelLen;
double LineLen;
int ImgWidth;
int ImgHeight;
int YScale;
int ColorEnc;
} ModeSpecDef;
extern ModeSpecDef ModeSpec[];
void ClearPixbuf(GdkPixbuf *, unsigned int, unsigned int);
void createGUI ();
2011-07-25 12:05:03 +00:00
int GetVideo (int, double, int, int, int);
2011-07-07 14:09:57 +00:00
2011-07-25 12:05:03 +00:00
unsigned int GetBin (double, int);
2011-07-07 14:09:57 +00:00
unsigned char clip (double);
void setVU (short int, double);
int GetVIS ();
double FindSync (unsigned int, int, double, int*);
double deg2rad (double);
2011-08-07 17:46:35 +00:00
void initPcmDevice();
2011-08-02 23:42:56 +00:00
void delete_event ();
2011-07-07 14:09:57 +00:00
#endif