5.4USB电话语音盒编程接口函数在Windows系统平台,USB语音盒的所有接口函数名称和所需参数基本上与PCI语音卡是一致的,除非特别说明,两者函数兼容。USB语音盒提供的编程接口函数如下:初始化和关闭系统接口函数包括:unsignedshortGX_InitializeSystem(void);unsignedshortGX_CloseSystem(void);获取系统参数接口函数unsignedlongGX_GetCardSerialNo(unsignedshortCardNo);unsignedshortGX_GetTotalCardCount(void);unsignedshortGX_GetCardStatus(unsignedshortCardNo);unsignedshortGX_GetTotalChannelCount(void);unsignedshortGX_GetTotalVoiceChannel(void);unsignedshortGX_GetChannelType(unsignedshortChannelNo);unsignedshortGX_GetChannelStatus(unsignedshortChannelNo);unsignedshortGX_UsbWorkStatus();unsignedshortGX_SetBugMsg(unsignedshortType);设置压缩函数unsignedshortGX_SetVoiceCompress(unsignedshortCompressType)打开关闭语音通道接口函数unsignedshortGX_OpenChannel(unsignedshortChannelNo);unsignedshortGX_CloseChannel(unsignedshortChannelNo);获取事件接口函数unsignedshortGX_GetMessageForWindows(unsignedshortWaitTime,PGX_MESSAGE_INFOpMessageBuffer);unsignedshortCheckMessageForWindows(unsignedshortWaitTime,PGX_MESSAGE_INFOpMessageBuffer);两线模拟中继模块操作接口函数包括:unsignedshortGX_TrunkHookOff(unsignedshortChannelNo);unsignedshortGX_TrunkHookOn(unsignedshortChannelNo);unsignedshortGX_StartDetectTrunkPolarity(unsignedshortChannelNo);unsignedshortGX_StopDetectTrunkPolarity(unsignedshortChannelNo);unsignedshortGX_StartTrunkPickUp(unsignedshortChannelNo,unsignedshortTimeByMicroSecond);unsignedshortGX_StopTrunkPickUp(unsignedshortChannelNo);用户模块操作接口函数unsignedshortGX_UserRingOn(unsignedshortChannelNo,unsignedshortRingOnTime,unsignedshortRingOffTime,unsignedshortTotalTimes);unsignedshortGX_UserRingOff(unsignedshortChannelNo);unsignedshortGX_SetUserPickUpTime(unsignedshortTimeByMicroSecond);侦听通道接口函数unsignedshortGX_ListenChannel(unsignedshortChannelNo,unsignedshortSourceChannel);unsignedshortGX_UnListenChannel(unsignedshortChannelNo);unsignedshortGX_SetLink(unsignedshortChannelNo,unsignedshortOtherChannel);unsignedshortGX_ClearLink(unsignedshortChannelNo,unsignedshortOtherChannel);声卡监听/放音接口函数unsignedshortGX_StartPlaySound(char*FileName,unsignedlongOffset,unsignedlongLength,BOOLbWav);unsignedshortGX_StopPlaySound();unsignedshortGX_StartMonitorSound(unsignedshortChannelNo);unsignedshortGX_StopMonitorSound();信号音识别接口函数unsignedshortGX_StartDetectDialTone(unsignedshortChannelNo);unsignedshortGX_StopDetectDialTone(unsignedshortChannelNo);unsignedshortGX_StartDetectBackTone(unsignedshortChannelNo);unsignedshortGX_StopDetectBackTone(unsignedshortChannelNo);unsignedshortGX_StartDetectBusyTone(unsignedshortChannelNo);unsignedshortGX_StopDetectBusyTone(unsignedshortChannelNo);unsignedshortGX_StartDetectToneData(unsignedshortChannelNo);unsignedshortGX_StopDetectToneData(unsignedshortChannelNo);unsignedshortGX_SetToneFrequency(unsignedshortChannelNo,unsignedshortFrequency);unsignedshortGX_GetToneInfo(unsignedshortChannelNo,PGX_TONE_INFOToneInfo);unsignedshortGX_SetToneInfo(unsignedshortChannelNo,PGX_TONE_INFOToneInfo);unsignedshortGX_SetSpecialSignalFrequency(unsignedshortChannelNo,unsignedshortFrequency);unsignedshortGX_StartDetectSpecialSignal(unsignedshortChannelNo,unsignedshortTimeByMilliSecond);unsignedshortGX_StopDetectSpecialSignal(unsignedshortChannelNo);信号音产生接口函数unsignedshortGX_StartGenerateSignal(unsignedshortChannelNo,unsignedshortFrequency0,unsignedshortFrequency1,unsignedshortOnTime,unsignedshortOffTime,unsignedshortTotalTimes,charStopChar);unsignedshortGX_StopGenerateSignal(unsignedshortChannelNo);unsignedshortGX_StartPlaySignal(unsignedshortChannelNo,unsignedshortType,unsignedshortTotalTimes,charStopChar);unsignedshortGX_StopPlaySignal(unsignedshortChannelNo);DTMF按键产生和识别接口函数unsignedshortGX_StartDetectDTMF(unsignedshortChannelNo,unsignedshortSmartLevel);unsignedshortGX_StopDetectDTMF(unsignedshortChannelNo);unsignedshortGX_ClearDTMFBuffer(unsignedshortChannelNo);unsignedshortGX_GetDTMFKey(unsignedshortChannelNo,unsignedshortDTMFCount,char*DTMFKey);unsignedshortGX_GenerateDTMFString(unsignedshortChannelNo,char*DTMFString);unsignedshortGX_AutoDialOut(unsignedshortChannelNo,char*DTMFString);录音接口函数unsignedshortGX_StartRecordFile(unsignedshortChannelNo,char*FileName,unsignedlongOffset,unsignedlongLength,charStopChar);unsignedshortGX_StartRecordWaveFile(unsignedshortChannelNo,char*FileName,unsignedlongOffset,unsignedlongLength,charStopChar);unsignedshortGX_StartRecordBuffer(unsignedshortChannelNo,char*Buffer,unsignedlongOffset,unsignedlongLength,charStopChar);unsignedshortGX_StopRecordVoice(unsignedshortChannelNo);unsignedshortGX_GetRecordLength(unsignedshortChannelNo,unsignedlong*RecordLength);放音接口函数unsignedshortGX_StartPlayFile(unsignedshortChannelNo,char*FileName,unsignedlongOffset,unsignedlongLength,charStopChar);unsignedshortGX_StartPlayWavFile(unsignedshortChannelNo,char*FileName,unsignedlongOffset,unsignedlongLength,charStopChar);unsignedshortGX_StartPlayBuffer(unsignedshortChannelNo,char*Buffer,unsignedlongOffset,unsignedlongLength,charStopChar);unsignedshortGX_StopPlayVoice(unsignedshortChannelNo);unsignedshortGX_GetPlayLength(unsignedshortChannelNo,unsignedlong*PlayLength);unsignedshortGX_In