android录制mp3 github,GitHub - xj999/AndroidMP3Recorder: 为Android提供MP3录音功能

AndroidMP3Recorder

为Android提供MP3录音功能

1. 目录简介

library: MP3录音实现源码库

sample : 使用范例

2. 使用方法

集成到项目中

dependencies {

compile 'com.czt.mp3recorder:library:1.0.1'

}

录音功能实现

创建MP3Recorder, 传入录音文件的File对象。

MP3Recorder mRecorder = new MP3Recorder(new File(Environment.getExternalStorageDirectory(),"test.mp3"));

开始录音: 调用MP3Recorder对象的start()方法。

mRecorder.start();

停止录音: 调用MP3Recorder对象的stop()方法。

mRecorder.stop();

代码示例见:AndroidMP3RecorderSample

3. 关于音量部分的解释

音量的计算,来自于 三星开发者文档-Displaying Sound Volume in Real-Time While Recording

里面对于音量的最大值设置为了4000,而我实际测验中发现大部分声音不超过2000,所以就在代码中暂时设置为2000。

这方面没有找到相关资料,如果有人知道理论值之类的,请联系我(chentong.think@gmail.com) 完善此库,谢谢。

4. 关于so库的声明

so库本身没有任何限制,但受限于Android NDK的支持

arm armv7 支持Android 1.5 (API Level 3)及以上版本

x86支持Android 2.3 (API Level 9)及以上版本

5. 常见问题声明

本库提供了arm armv7 支持, 即会有armeabi和armeabi-v7a两个文件夹。

如果您当前使用的其他so文件只有两个文件夹中的一种,建议您进行拷贝,保证两个文件夹内都有so文件,避免引发java.lang.UnsatisfiedLinkError错误。

以app使用了百度地图sdk为例:

一般会引发java.lang.UnsatisfiedLinkError: Couldn't load BaiduMapSDK_v3_2_0_15 from loader错误。

解决办法: 将armeabi文件夹下的 .so文件,一并copy至armeabi-v7a,使两个文件夹下都有相应文件。

6. License

Copyright 2014 GavinCT

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

7. CHANGELOG

1.0.1 新增64位so so编译改为all mips及 64位均支持

1.0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值