你好,欢迎来到电脑编程技巧与维护杂志社! 杂志社简介广告服务读者反馈编程社区  
合订本订阅
 
 
您的位置:杂志经典 / 编程语言
多路音频实时采样压缩存盘DLL的实现和使用(五)
 

3.3音频解压缩与回放  

音频解压缩部份也在winio.dll封装,在VB程序中调用,解压部份用了话音压缩解码库G729a.lib中的函数va_g729a_init_decoder()

bool _stdcall talk729decoderinit ()//初始化解码器

{

va_g729a_init_decoder();

return  TRUE;

}

bool _stdcall DecodeAudioData( BYTE* pin,int len,short* pout,int* lenr)

//解压音频数据, 一次解压260字节压缩数据,

{

 va_g729a_decoder(pin, pout,0);

 va_g729a_decoder(pin+10, pout+80,0);

 va_g729a_decoder(pin+20, pout+160,0);

 va_g729a_decoder(pin+30, pout+240,0);

  

 va_g729a_decoder(pin+250, pout+1820,0);

return  TRUE;

}

解压缩函数void va_g729a_decoder(unsigned char *bitstream, short *synth_short, int bfi),每次解压10个字节 数据,变成8016 位 数据,是压缩的反过程。

 

3.4 封装在VB6.0 调用的函数

bool _stdcall talk729decoderinit ()//初始化解压器

bool _stdcall DecodeAudioData( BYTE* pin,int len,short* pout,int* lenr)//解压音频数据, 一次解压260字节压缩数据。

 

bool _stdcall sendhwndtlp(HWND apitexthwnd,unsigned char* apilpmax,HWND apistorekhwnd,short* apilpalldata1,short* apilpalldata2,unsigned char* apilpcodedata)//DLL传送句柄与数据地址指针
  推荐精品文章

·2024年2月目录 
·2024年1月目录
·2023年12月目录
·2023年11月目录
·2023年10月目录
·2023年9月目录 
·2023年8月目录 
·2023年7月目录
·2023年6月目录 
·2023年5月目录
·2023年4月目录 
·2023年3月目录 
·2023年2月目录 
·2023年1月目录 

  联系方式
TEL:010-82561037
Fax: 010-82561614
QQ: 100164630
Mail:gaojian@comprg.com.cn

  友情链接
 
Copyright 2001-2010, www.comprg.com.cn, All Rights Reserved
京ICP备14022230号-1,电话/传真:010-82561037 82561614 ,Mail:gaojian@comprg.com.cn
地址:北京市海淀区远大路20号宝蓝大厦E座704,邮编:100089