mt6735 sound recorder录音模式为“标准”时,录音格式怎么改为amr
时间:10-02
整理:3721RD
点击:
[Audio App]sound recorder录音模式为“标准”时,录音格式怎么改为AMR
[DESCRIPTION]
SoundRecorder的录音模式选为“标准”时,录音如何改成amr格式?
[SOLUTION]
请在RecordParamsSetting.java文件中修改如下:
getRecordParams{
……
case FORMAT_STANDARD:
params = sStandardParams.clone();
recordParams.mAudioEncoder = sPreferences.getInt(STANDARD_ENCODER, params[0]);
recordParams.mAudioChannels = sPreferences.getInt(STANDARD_AUDIO_CHANNELS, params[1]);
recordParams.mAudioEncodingBitRate = sPreferences.getInt(STANDARD_ENCODE_BITRATE, params[2]);
recordParams.mAudioSamplingRate = sPreferences.getInt(STANDARD_SAMPLE_RATE, params[3]);
recordParams.mOutputFormat = sPreferences.getInt(STANDARD_OUTPUT_FORMAT, params[4]);
//请添加如下:
recordParams.mAudioEncoder =1;
recordParams.mAudioChannels = 1;
recordParams.mAudioEncodingBitRate =12200;
recordParams.mAudioSamplingRate = 8000;
recordParams.mOutputFormat = 3;
//请添加如上
}
[DESCRIPTION]
SoundRecorder的录音模式选为“标准”时,录音如何改成amr格式?
[SOLUTION]
请在RecordParamsSetting.java文件中修改如下:
getRecordParams{
……
case FORMAT_STANDARD:
params = sStandardParams.clone();
recordParams.mAudioEncoder = sPreferences.getInt(STANDARD_ENCODER, params[0]);
recordParams.mAudioChannels = sPreferences.getInt(STANDARD_AUDIO_CHANNELS, params[1]);
recordParams.mAudioEncodingBitRate = sPreferences.getInt(STANDARD_ENCODE_BITRATE, params[2]);
recordParams.mAudioSamplingRate = sPreferences.getInt(STANDARD_SAMPLE_RATE, params[3]);
recordParams.mOutputFormat = sPreferences.getInt(STANDARD_OUTPUT_FORMAT, params[4]);
//请添加如下:
recordParams.mAudioEncoder =1;
recordParams.mAudioChannels = 1;
recordParams.mAudioEncodingBitRate =12200;
recordParams.mAudioSamplingRate = 8000;
recordParams.mOutputFormat = 3;
//请添加如上
}