Skip to content

Commit

Permalink
update readme file.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoshuai904 committed Aug 26, 2018
1 parent 8b5a300 commit 05b3646
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 56 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,69 @@
# RecordWav
# RecordWav

集 【录制】、【播放】、【解析】于一体的wav文件的工具类。

功能包括:

- 录制wav文件。(录音、暂停、完成)
- 播放wav文件。(自定义播放、系统播放)
- 解析已有wav文件的信息。

![show_recorder](https://github.com/shaoshuai904/RecordWav/blob/master/screens/show_recorder.png)


集 【录制】、【播放】、【解析】于一体的wav文件的工具类。
### 快速使用

功能包括:
**Step 1.** Add it in your root build.gradle at the end of repositories:

- 录制wav文件。(录音、暂停、完成)
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

- 播放wav文件。(自定义播放、系统播放)
**Step 2.** Add the dependency

- 解析已有wav文件的信息。
```groovy
dependencies {
compile 'com.github.shaoshuai904:RecordWav:1.0'
}
```


### MsRecorder

构造参数:[ 文件保存路径 + 参数配置 + 各类监听回调 ]
方法:startRecording pauseRecording resumeRecording stopRecording

```
Recorder recorder;
recorder = MsRecorder.wav(
new File(voicePath),
new AudioRecordConfig.Default(),
new PullTransport.Default(
new PullTransport.OnAudioChunkPulledListener() {
@Override
public void onAudioChunkPulled(AudioChunk audioChunk) {
Log.d("max ", "amplitude: " + audioChunk.maxAmplitude());
}
}
)
);
TODO:
wav文件格式转换
recorder.startRecording();
recorder.pauseRecording();
recorder.resumeRecording();
recorder.stopRecording();
```


开发平台:android studio

开发平台:android studio。
运行平台:android 手机



2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
applicationId "com.maple.recordwav"
minSdkVersion 14
targetSdkVersion 26
versionCode 7
versionCode 8
versionName "1.0"
}
buildTypes {
Expand Down

0 comments on commit 05b3646

Please sign in to comment.