www.pudn.com > VOIP_server_client.rar > peer1_sound_cap.h


//Sound_cap.h 
#include  
#include  
#include  
 
#include      /* _threadid variable */ 
#include     /* _beginthread, _endthread */ 
 
#define SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } } 
#define NUM_REC_NOTIFICATIONS 16 
 
//*** Debugging-3 Change Packet size and Sampling rate 
// Uncomment the following 3 lines and comment the 3 lines followed to 
// enable packet size=504 and sampling rate=8kHz (and vice versa) 
//(After chnage the Packet Size and Sampling Rate, the delay limits need to be changed in Debugging-5 of peer1_sock.h) 
//#define CAP_LENGTH    504    //1008 
//#define PLAY_LENGTH   504 
//#define SAMPLE_RATE  8000    // 11025 or 8000 
 
#define CAP_LENGTH    1008    //1008 
#define PLAY_LENGTH   1008 
#define SAMPLE_RATE  11025    // 11025 or 8000 
void pr2(HWND , char); 
 
int InitCapture(HWND); 
 
int FreeDirectSound_cap(); 
 
int CreateCaptureBuffer(HWND); 
 
int InitNotification(HWND); 
 
int Start_Record(HWND); 
 
int Save_Record(HWND, char*); 
 
int Stop_Record(HWND); 
 
int RecordCapturedData(HWND,char*); 
 
void Get_Current_Position(HWND);