Merge branch 'audiorecorder-1.0.9'

This commit is contained in:
Alexey Kuznetsov 2016-03-13 13:48:38 +03:00
commit 9e4690387e
3 changed files with 2 additions and 9 deletions

View file

@ -8,8 +8,8 @@ android {
applicationId "com.github.axet.audiorecorder"
minSdkVersion 16
targetSdkVersion 23
versionCode 9
versionName "1.0.8"
versionCode 10
versionName "1.0.9"
}
signingConfigs {
release {

View file

@ -53,7 +53,6 @@ public class FileEncoder {
byte[] buf = new byte[(RecordingActivity.AUDIO_FORMAT == AudioFormat.ENCODING_PCM_16BIT ? 2 : 1) * 1000];
int len = is.read(buf);
Log.d("123", "len " + len);
if (len <= 0) {
handler.post(done);
return;

View file

@ -36,7 +36,6 @@ public class MuxerMP4 implements Encoder {
}
public void encode(short[] buf) {
Log.d("123", "encode " + buf.length);
for (int offset = 0; offset < buf.length; ) {
int len = buf.length - offset;
@ -55,7 +54,6 @@ public class MuxerMP4 implements Encoder {
int bytes = len * 2;
encoder.queueInputBuffer(inputIndex, 0, bytes, getCurrentTimeStamp(), 0);
Log.d("123", "put " + bytes);
NumSamples += len / info.channels;
offset += len;
@ -71,7 +69,6 @@ public class MuxerMP4 implements Encoder {
return false;
if (outputIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
Log.d("123", "output set " + encoder.getOutputFormat());
audioTrackIndex = muxer.addTrack(encoder.getOutputFormat());
muxer.start();
}
@ -81,8 +78,6 @@ public class MuxerMP4 implements Encoder {
output.position(outputInfo.offset);
output.limit(outputInfo.offset + outputInfo.size);
Log.d("123", "get " + outputInfo.size);
muxer.writeSampleData(audioTrackIndex, output, outputInfo);
encoder.releaseOutputBuffer(outputIndex, false);
@ -112,7 +107,6 @@ public class MuxerMP4 implements Encoder {
ByteBuffer input = encoder.getInputBuffer(inputIndex);
input.clear();
encoder.queueInputBuffer(inputIndex, 0, 0, getCurrentTimeStamp(), MediaCodec.BUFFER_FLAG_END_OF_STREAM);
Log.d("123", "set end ");
}
}