slowrx/common.h

89 wiersze
2.0 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;
extern GtkWidget *window;
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;
extern GdkPixbuf *VUpixbufActive;
extern GdkPixbuf *VUpixbufDim;
extern GdkPixbuf *VUpixbufSNR;
extern GtkWidget *VUimage[10];
extern GtkWidget *SNRimage[10];
extern GtkWidget *vutable;
extern GtkWidget *infolabel;
2011-07-29 20:09:42 +00:00
extern snd_pcm_t *pcm_handle;
2011-07-07 14:09:57 +00:00
enum {
M1, M2, M3, M4,
S1, S2, SDX,
R72, R36, R24, R24BW, R12BW, R8BW,
PD50, PD90, PD120, PD160, PD180, PD240, PD290,
P3, P5, P7,
W2120, W2180,
UNKNOWN, AUTO_VIS
};
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);
#endif