diff --git a/CHANGELOG.md b/CHANGELOG.md index 5287f80..8235986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.4.9 +* fix the power calculation for android + ## 0.4.8 * Fix version number in .podspec diff --git a/android/src/main/java/com/zeno/flutter_audio_recorder/FlutterAudioRecorderPlugin.java b/android/src/main/java/com/zeno/flutter_audio_recorder/FlutterAudioRecorderPlugin.java index fc6325c..f452df4 100644 --- a/android/src/main/java/com/zeno/flutter_audio_recorder/FlutterAudioRecorderPlugin.java +++ b/android/src/main/java/com/zeno/flutter_audio_recorder/FlutterAudioRecorderPlugin.java @@ -5,7 +5,6 @@ import android.media.AudioFormat; import android.media.AudioRecord; import android.media.MediaRecorder; -import android.os.Environment; import android.os.SystemClock; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; @@ -18,9 +17,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; -import java.util.Date; import java.util.HashMap; -import java.util.concurrent.TimeUnit; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; @@ -336,15 +333,15 @@ private void resetRecorder(){ } private void updatePowers(byte[] bdata){ - double max=0; - double sum=0; short[] data = byte2short(bdata); - for(int i=0; i - tao zhu