#define RISINGEDGE 0
#define DROPEDGE 1
#define ABS(x) (((x) > 0) ? (x) : (-x))
#define MARK_FREQ 980
#define SPACE_FREQ 1180
#define MARGIN ((SPACE_FREQ-MARK_FREQ)/2)
#define STARTBIT 1
#define BAUDRATE 300
static void
FSK_decode (SNDFILE * infile, FILE * outfile, int channels, int samplerate)
{
float buf [channels * BLOCK_SIZE] ;
int k, readcount ;
char bits;
float value;
float last_val = 0.0;
int edge = -1;
int last_edge = -1;
const float dt = 1.00/samplerate;
const int bpts = (int)(1.00/BAUDRATE/dt);
int index = 0;
int edge_index = 0;
int last_edge_index = 0;
int bit_start_idx = 0;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载
- 1
- 2
- 3
- 4
前往页