• 大小: 899KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-21
  • 语言: 其他
  • 标签:

资源简介

一个非常好的VC语音对讲呼叫机源代码程序...

资源截图

代码片段和文件信息

#include “stdafx.h“
#include “AudioCode.h“

extern “C“ void va_g729a_init_encoder();
extern “C“ void va_g729a_encoder(short *speech unsigned char *bitstream);
extern “C“ void va_g729a_init_decoder();
extern “C“ void va_g729a_decoder(unsigned char *bitstream short *synth_short int bfi);
#define  L_frame_COMPRESSED 10
#define  L_frame            80

#pragma comment(lib“G729a“)

CAudioCode::CAudioCode()
{
va_g729a_init_encoder();
va_g729a_init_decoder();
}

CAudioCode::~CAudioCode()
{
}

BOOL CAudioCode::EncodeAudioData(char *pinint lenchar* poutint* lenr)
{
BOOL bRet=FALSE;
if(!pin||len!=SIZE_AUDIO_frame||!pout)
goto RET;

va_g729a_encoder((short*)pin(BYTE*)pout);
va_g729a_encoder((short*)(pin+160)(BYTE*)pout+10);
va_g729a_encoder((short*)(pin+320)(BYTE*)pout+20);
va_g729a_encoder((short*)(pin+480)(BYTE*)pout+30);
va_g729a_encoder((short*)(pin+640)(BYTE*)pout+40);
va_g729a_encoder((short*)(pin+800)(BYTE*)pout+50);

if(lenr)
*lenr=SIZE_AUDIO_PACKED;

bRet=TRUE;
RET:
return bRet;
}

BOOL CAudioCode::DecodeAudioData(char *pinint lenchar* poutint* lenr)
{
BOOL bRet=FALSE;
if(!pin||len!=SIZE_AUDIO_PACKED||!pout)
goto RET;

va_g729a_decoder((BYTE*)pin(short*)(pout)0);
va_g729a_decoder((BYTE*)pin+10(short*)(pout+160)0);
va_g729a_decoder((BYTE*)pin+20(short*)(pout+320)0);
va_g729a_decoder((BYTE*)pin+30(short*)(pout+480)0);
va_g729a_decoder((BYTE*)pin+40(short*)(pout+640)0);
va_g729a_decoder((BYTE*)pin+50(short*)(pout+800)0);

if(lenr)
*lenr=SIZE_AUDIO_frame;

bRet=TRUE;
RET:
return bRet;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      32256  2003-01-08 17:01  语音对讲呼叫机\20051191296654\对讲机Talk\文档\Talk dll 结构.doc

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\文档\readme.txt

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\文档\使用说明.txt

     文件         64  2006-10-30 23:18  语音对讲呼叫机\20051191296654\对讲机Talk\文档\代码秀『源码下载交流』.htm

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\readme.txt

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\readme.txt

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\res\readme.txt

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\res\使用说明.txt

     文件         64  2006-10-30 23:18  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\res\代码秀『源码下载交流』.htm

     文件        399  2002-12-20 17:50  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\res\TalkDll.rc2

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\ReadMe.txt

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\res\readme.txt

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\res\使用说明.txt

     文件         64  2006-10-30 23:18  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\res\代码秀『源码下载交流』.htm

     文件        766  1998-10-14 17:47  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\res\CLIENT.ICO

     文件        766  1998-10-14 17:47  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\res\Talk.ICO

     文件        396  2005-06-23 00:27  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\res\Talk.rc2

     文件       1615  2006-10-30 23:08  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\使用说明.txt

     文件         64  2006-10-30 23:18  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\代码秀『源码下载交流』.htm

     文件       1130  2005-06-24 03:41  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\PWDLG.h

     文件        864  2005-06-24 03:35  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\resource.h

     文件       1102  2005-06-23 00:27  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\StdAfx.h

     文件       4064  1998-08-12 19:21  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\SYSTEMTRAY.H

     文件       1445  2005-06-23 04:54  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\Talk.h

     文件       1617  2005-06-23 21:04  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\TalkDlg.h

     文件       1059  2005-06-24 03:44  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\PWDLG.cpp

     文件        206  2005-06-23 00:27  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\StdAfx.cpp

     文件      12869  2000-10-21 02:42  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\SYSTEMTRAY.CPP

     文件       2657  2005-06-24 03:51  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\Talk.cpp

     文件       5622  2005-06-24 03:40  语音对讲呼叫机\20051191296654\对讲机Talk\TalkDll\Talk\TalkDlg.cpp

............此处省略124个文件信息

评论

共有 条评论

相关资源