如何更改互改安卓手机系统文件,才能更改音频采样率多少合适? 看了很多相关文件,感觉好复杂 不能漏改一个地方

安卓手机录音格式是怎样的?_其他_土巴兔问吧
安卓手机录音格式是怎样的?
报价结果将发送到您的手机
装修顾问-馨馨
4年行业经验,24h可咨询
10秒闪电通过好友
报价短信已发送到您的手机
因材料品牌及工程量不同,具体报价以量房实测为准
稍候装修管家将回电您,免费提供装修咨询服务
您的装修预算约
*装修管家将回电您,免费提供装修咨询服务
*装修管家将回电您,免费提供装修咨询服务
*因材料品牌及工程量不同,具体报价以量房实测为准
装修顾问 -馨馨
(四年装修行业经验)
微信扫一扫
安卓手机录音格式是怎样的?
提问者:盛飞鸿|
浏览:1734|
时间: 08:57:07
已有3条答案
回答数:4241|被采纳数:3
合肥玖栎建筑装饰工程设计有限公司
所有回答:&4241
系统自带的通话录音文件在SD卡下/voice文件夹下,是amr格式的
或者 &&sounds文件夹里。不同的手机,不同的系统不一样。你在根目录下找找有没有phoneRecord这个文件夹,录音格式是3gpp
回答数:54252|被采纳数:36
所有回答:&54252
是amr格式的 &&或者 &&sounds文件夹里 && &&因为目前手机对于音频格式的播放和采集已经跨越了格式的限制,很多都能通过自身解码器或采用第三方软件进行播放,所以已经没有必要去采用某种特定的格式;
其次,你所谓的MP4格式的在音频上指代的就是AAC格式,MPEG-2 &&AAC,而不像视频格式的.mp4直接显示MP4的文件类型名
回答数:3123|被采纳数:3
所有回答:&3123
 当我们通话录音完毕后,可以看到“通话录音成功”提示,有显示存储路径哦,路径为:SD卡/MIUI/sound_recorder。
除非特别设定,一般的安卓手机录音时候的格式都是mp3格式的
已有 3 个回答
已有 3 个回答
已有 3 个回答
已有 3 个回答
已有 3 个回答
位业主已在问吧找到答案
北欧简约、复古美式、大气欧式、清新地中海风,总有一款适合你!
一万套装修案例
下载土巴兔APP
中国装修网下次自动登录
现在的位置:
& 综合 & 正文
ffmpeg解码音频数据时,进行重采样(即改变文件原有的采样率)
我们使用ffmpeg解码音频的时候,往往需要改变原音频的采样率,即需要重采样。
比如一音乐文件的采样率22050,而播放端往往是固定的采样率,比如44100。在这种情况下,如果把解码出来的数据直接播放,会产生快进的效果。这个时候就需要对解码出来的数据作一次重采样,将数据转化为44100采样率下的数据,才能正确播放。
ffmpeg提供了一组用来重采样的API,主要如下:
Initialize audio resampling context.
* @param output_channels
number of output channels
* @param input_channels
number of input channels
* @param output_rate
output sample rate
* @param input_rate
input sample rate
* @param sample_fmt_out
requested output sample format
* @param sample_fmt_in
input sample format
* @param filter_length
length of each FIR filter in the filterbank relative to the cutoff frequency
* @param log2_phase_count log2 of the number of entries in the polyphase filterbank
* @param linear
if 1 then the used FIR filter will be linearly interpolated
between the 2 closest, if 0 the closest will be used
* @param cutoff
cutoff frequency, 1.0 corresponds to half the output sampling rate
* @return allocated ReSampleContext, NULL if error occured
ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate,
enum AVSampleFormat sample_fmt_out,
enum AVSampleFormat sample_fmt_in,
int filter_length, int log2_phase_count,
int linear, double cutoff);
int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
* Free resample context.
* @param s a non-NULL pointer to a resample context previously
created with av_audio_resample_init()
void audio_resample_close(ReSampleContext *s);
函数av_audio_resample_init()用来初始化重采样的参数,前4个参数很好理解;后6个参数基本上是使用缺省参数,分别为:
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16,16, 10, 0, 1
函数audio_resample()用来重采样,前3个参数都好理解,最后一个参数是指“原数据的采样个数”,而不是input的bytes数。该函数的返回值也是采样个数,不过是重采样之后的。
函数audio_resample_close()用来清理重采样时分配的资源。
相关如下:
// need to do re-sample
if (m_codec_ctx-&sample_rate != m_out_samplerate)
LOGW("%s, need re-sample, initialize re-sample engine! out channels:%d, out sample rate:%d hz, in channels:%d, in sample rate:%d",__FUNCTION__, 2, m_out_samplerate, m_codec_ctx-&channels, m_codec_ctx-&sample_rate);
m_resample_engine = av_audio_resample_init( 2, m_codec_ctx-&channels, m_out_samplerate, m_codec_ctx-&sample_rate, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16, 16, 10, 0, 1);
重采样代码
frame_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
memset(m_audio_buff, 0, AVCODEC_MAX_AUDIO_FRAME_SIZE);
decoded_len = avcodec_decode_audio3(m_codec_ctx, (short *)m_audio_buff, &frame_size, &m_avpkt);
LOGI("%s, current decoded size:%d", __FUNCTION__, decoded_len);
if (decoded_len & 0)
m_avpkt.size -= decoded_
m_avpkt.data += decoded_
decoded_audio_len = frame_
valid_data_pointer = m_audio_
// need to re-sample
if (m_resample_engine)
// convert byte to short
int after_resampled_len = 0;
int before_resampled_len = frame_size/(2 * m_codec_ctx-&channels);
memset(m_audio_resampled_buff, 0, AVCODEC_MAX_AUDIO_FRAME_SIZE);
after_resampled_len = audio_resample(m_resample_engine, (short *)m_audio_resampled_buff, (short *)m_audio_buff, before_resampled_len);
LOGI("%s, re-sampled! length in:%d, length out:%d", __FUNCTION__, before_resampled_len, after_resampled_len);
decoded_audio_len = after_resampled_len * 2 * 2; //convert short to byte, and 2 channels
valid_data_pointer = m_audio_resampled_
memcpy(buff+copied_len, valid_data_pointer, decoded_audio_len);
copied_len += decoded_audio_
LOGI("%s, copy1, %d bytes has copied to output buff, total:%d!", __FUNCTION__, decoded_audio_len, copied_len);
if (m_resample_engine)
audio_resample_close(m_resample_engine);
m_resample_engine = 0;
&&&&推荐文章:
【上篇】【下篇】}

我要回帖

更多关于 音频采样率 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信