ose(fp);
//FILE *fp;
if((fp=fopen("恢复的压缩密文m8000-1out_high.wav","rb"))==NULL)
{ cout<<"cannot open file"<<endl;
exit(0);}
k=0;
while(!feof(fp))
{ d[k]=getword(fp);
k++;}
fclose(fp);
e[0]=d[0];
t=0;m=1;n=1;p=1;q=0;
for(m=1;m<i+l-2;m++)
{
if(t==0)
{
if(abit[p-1]==0)
{
e[n]=d[p];
n++;p++;
}
else
{
e[n]=c[q];
n++;q++;
t=1;
}
}
else
{
if(bbit[q-1]==0)
{
e[n]=c[q];
n++;q++;
}
else
{
e[n]=d[p];
n++;p++;
t=0;
}
}
}
for(w=0;w<20;w++)
cout<<e[w]<<endl;
ofstream out1("G723.1解密的m8000-1out_high.wav",ios::binary);//存放最终转换好的比特流文件
if(!out1)
{cout<<"Cannot open output file.\n!";
return 1;}
offset=0;
out1.seekp(offset,ios::beg);
for(w=0;w<n;w++)
{out1.write((char *)&e[w],1);}
out1.close();
return 0;
}
??
??
??
??