赞
踩
pcm to g711编码,资料很多,这里只说一下g711u转换为g711a的方法,很简单,如下:
unsigned char * ulawtoalaw(unsigned char * ulawbuffer,int len)
{
unsigned char * ulaw = ulawbuffer;
unsigned char * alaw = new unsigned char[len];
int count = 0;
while(count < len )
{
alaw[count] = ulaw2alaw(*ulaw);
count++;
ulaw++;
}
return alaw;
}
说明一下:第一个参数是g711u的buffer,第二个参数是buffer的长度,函数返回g711a数据。其中ulaw2alaw(*ulaw),这个函数是库g711codec里面的
本文简单说了一下g711u to g711a ,其实g711a to g711u是一样的,就不说了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。