开发者

Decode PCM audio data with g722 codec

开发者 https://www.devze.com 2023-04-12 13:55 出处:网络
I\'m developing a call recorder for VoIP audio, the audio is encoded by using a g722 codec in a CISCO environment.

I'm developing a call recorder for VoIP audio, the audio is encoded by using a g722 codec in a CISCO environment. Well, I have extracted the data from the RTPs frames and I have decoded this pcm data as follow:

unsigned int payloadSize = htons(udpHdr->len) - (CONSTANT::UDP_HDR_SIZE +开发者_开发百科 CONSTANT::RTP_HDR_SIZE);
char * payload = (char*)rtpHdr + CONSTANT::RTP_HDR_SIZE;
  unsigned short m_payloadType = rtpHdr->pt;
//decode_state is initialize like :g722_decode_init(NULL, 64000, G722_SAMPLE_RATE_8000);
outBuffSize = g722_decode(decode_state, decompressed, (const uint8_t*)payload, payloadSize);

I store in a file this decode data (and all frames of the same flow, equal sscr) and when try to hear the audio, I only hear noise.

I think this problem is for the compressed algorithm used CISCO.

The behaviour of the decoded function is correct.

Any suggestion?

0

精彩评论

暂无评论...
验证码 换一张
取 消