初级会员
- 积分
- 68
- 金钱
- 68
- 注册时间
- 2018-1-3
- 在线时间
- 26 小时
|
3金钱
录音时单声道模式录音保存后播放出来的声音是正常的(但是只有一个耳机能听到声音),我现在想让两个耳机都能听到声音,改成双声道模式,但是录音保存后播放出来的声音速度快一倍,(两个耳机都有声音),请问是什么问题?谢谢。双声道模式代码如下:
void recoder_enter_rec_mode(u16 agc)
{
VS_WR_Cmd(SPI_BASS,0x0000);
VS_WR_Cmd(SPI_AICTRL0,8000); //éèÖÃ2éÑùÂê,éèÖÃÎa8Khz
VS_WR_Cmd(SPI_AICTRL1,agc); //éèÖÃÔöòæ,0,×Ô¶ˉÔöòæ.1024Ïàμ±óú1±¶,512Ïàμ±óú0.5±¶,×î′óÖμ65535=64±¶
VS_WR_Cmd(SPI_AICTRL2,0); //éèÖÃÔöòæ×î′óÖμ,0,′ú±í×î′óÖμ65536=64X
VS_WR_Cmd(SPI_AICTRL3,5); //×óí¨μà(MICμ¥éùμàêäèë)
VS_WR_Cmd(SPI_CLOCKF,0X2000); //éèÖÃVS10XXμÄê±Öó,MULT:2±¶Æμ;ADD:2»ÔêDí;CLK:12.288Mhz
VS_WR_Cmd(SPI_MODE,0x1804); //MIC,¼òô¼¤»î
delay_ms(5); //μè′yÖáéù1.35ms
VS_Load_Patch((u16*)wav_plugin,40);//VS1053μÄWAV¼òôDèòapatch
}
void recoder_wav_init(__WaveHeader* wavhead) //3õê¼»ˉWAVí·
{
wavhead->riff.ChunkID=0X46464952; //"RIFF"
wavhead->riff.ChunkSize=0; //»1Î′è·¶¨,×îoóDèòa¼ÆËã
wavhead->riff.Format=0X45564157; //"WAVE"
wavhead->fmt.ChunkID=0X20746D66; //"fmt "
wavhead->fmt.ChunkSize=16; //′óD¡Îa16¸ö×Ö½ú
wavhead->fmt.AudioFormat=0X01; //0X01,±íê¾CM;0X01,±íê¾IMA ADPCM
wavhead->fmt.NumOfChannels=2; //μ¥éùμà
wavhead->fmt.SampleRate=8000; //8Khz2éÑùÂê 2éÑùËùÂê
wavhead->fmt.ByteRate=wavhead->fmt.SampleRate*4;//16λ,¼′2¸ö×Ö½ú
wavhead->fmt.BlockAlign=4; //¿é′óD¡,2¸ö×Ö½úÎaò»¸ö¿é
wavhead->fmt.BitsPerSample=16; //16λCM
wavhead->data.ChunkID=0X61746164; //"data"
wavhead->data.ChunkSize=0; //êy¾Y′óD¡,»1Dèòa¼ÆËã
}
|
|