Celt Codec 간단 한 사용법
1296 단어 code
g_dwNotifySize = (pwfxInput->nAvgBytesPerSec * 20)/ 1000;
: AudioLength=samplingrate * (20ms) * channl * 2
void TestCeltCodec(short * sAudio)/* sAudio */
{
//
int err,samplingrate=32000,framesize=640,channl=1;
int nEncodingAudioLength;//
unsigned char cEncodingAudioContainer[960];//
// CELT
CELTMode * mode=celt_mode_create(samplingrate,framesize,&err);
CELTEncoder * enc_state=celt_encoder_create(mode, channl, &err);
CELTDecoder * dec_state=celt_decoder_create(mode, channl, &err);
//
nEncodingAudioLength=celt_encode(enc_state,(celt_int16 *)sAudio,framesize,cEncodingAudioContainer,framesize);
//
celt_int16 * out=(celt_int16*)malloc(framesize*channl*sizeof(celt_int16));
//
celt_decode(dec_state,cEncodingAudioContainer,nEncodingAudioLength,out,framesize);
//
short sOutput[FRAME_SIZE];
for (int i=0;i<framesize;i++)
{
sOutput[i]=out[i];
}
//
AudioPay((BYTE*)sAudio,nEncodingAudioLength*2);
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Visual Studio 코드에 무료 Cursive(Italic) 글꼴 추가우리 모두는 기능과 확장성 때문에 Visual Studio 코드 편집기를 좋아합니다. 이 기사에서는 필기체(이탤릭체) 글꼴을 완전 무료로 설정하는 방법에 대한 유용한 팁을 보여드리겠습니다. 그 때문에 사람들은 Ope...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.