Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87c9033

Browse files
committed
更新api到最新版本
1 parent d6cfbd8 commit 87c9033

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

library/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
4-
version = "1.0"
4+
version = "1.0.1"
55
android {
6-
compileSdkVersion 21
7-
buildToolsVersion "21.1.2"
6+
compileSdkVersion 23
7+
buildToolsVersion "23.0.2"
88
resourcePrefix "AndroidMP3RecorderLibrary_" //这个随便填
99
defaultConfig {
1010
minSdkVersion 9
11-
targetSdkVersion 21
11+
targetSdkVersion 23
1212
// 暂时屏蔽,等AndroidStudio NDK开发完善后再放开
1313
// ndk {
1414
// moduleName "mp3lame"
@@ -24,7 +24,7 @@ android {
2424
}
2525

2626
dependencies {
27-
compile 'com.android.support:support-v4:21.0.3'
27+
compile 'com.android.support:support-v4:23.1.1'
2828
}
2929

3030
def siteUrl = 'https://github.com/GavinCT/AndroidMP3Recorder' // 项目的主页

library/src/main/java/com/czt/mp3recorder/DataEncodeThread.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void handleMessage(Message msg) {
5656
* Constructor
5757
* @param file file
5858
* @param bufferSize bufferSize
59-
* @throws FileNotFoundException
59+
* @throws FileNotFoundException file not found
6060
*/
6161
public DataEncodeThread(File file, int bufferSize) throws FileNotFoundException {
6262
this.mFileOutputStream = new FileOutputStream(file);
@@ -73,6 +73,7 @@ public void run() {
7373

7474
/**
7575
* Return the handler attach to this thread
76+
* @return the handler attach to this thread
7677
*/
7778
public Handler getHandler() {
7879
try {

library/src/main/java/com/czt/mp3recorder/MP3Recorder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class MP3Recorder {
5050
/**
5151
* Default constructor. Setup recorder with default sampling rate 1 channel,
5252
* 16 bits pcm
53+
* @param recordFile target file
5354
*/
5455
public MP3Recorder(File recordFile) {
5556
mRecordFile = recordFile;
@@ -59,7 +60,7 @@ public MP3Recorder(File recordFile) {
5960
* Start recording. Create an encoding thread. Start record from this
6061
* thread.
6162
*
62-
* @throws IOException
63+
* @throws IOException initAudioRecorder throws
6364
*/
6465
public void start() throws IOException {
6566
if (mIsRecording) return;

library/src/main/java/com/czt/mp3recorder/util/LameUtil.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ public class LameUtil {
1717
* @param outBitrate
1818
* brate compression ratio in KHz.
1919
* @param quality
20-
* quality=0..9. 0=best (very slow). 9=worst.<br />
21-
* recommended:<br />
22-
* 2 near-best quality, not too slow<br />
23-
* 5 good quality, fast<br />
20+
* <p>quality=0..9. 0=best (very slow). 9=worst.</p>
21+
* <p>recommended:</p>
22+
* <p>2 near-best quality, not too slow</p>
23+
* <p>5 good quality, fast</p>
2424
* 7 ok quality, really fast
2525
*/
2626
public native static void init(int inSamplerate, int inChannel,
@@ -38,10 +38,10 @@ public native static void init(int inSamplerate, int inChannel,
3838
* @param mp3buf
3939
* result encoded MP3 stream. You must specified
4040
* "7200 + (1.25 * buffer_l.length)" length array.
41-
* @return number of bytes output in mp3buf. Can be 0.<br />
42-
* -1: mp3buf was too small<br />
43-
* -2: malloc() problem<br />
44-
* -3: lame_init_params() not called<br />
41+
* @return <p>number of bytes output in mp3buf. Can be 0.</p>
42+
* <p>-1: mp3buf was too small</p>
43+
* <p>-2: malloc() problem</p>
44+
* <p>-3: lame_init_params() not called</p>
4545
* -4: psycho acoustic problems
4646
*/
4747
public native static int encode(short[] bufferLeft, short[] bufferRight,

sample/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 21
5-
buildToolsVersion "21.1.2"
4+
compileSdkVersion 23
5+
buildToolsVersion "23.0.2"
66

77
defaultConfig {
88
applicationId "com.czt.mp3recorder.sample"
99
minSdkVersion 11
10-
targetSdkVersion 21
10+
targetSdkVersion 23
1111
}
1212

1313
buildTypes {
@@ -20,5 +20,5 @@ android {
2020

2121
dependencies {
2222
compile project(':library')
23-
compile 'com.android.support:support-v4:21.0.3'
23+
compile 'com.android.support:support-v4:23.1.1'
2424
}

0 commit comments

Comments
 (0)