From 87754504672322333bed20f42ded36bbf222b4f4 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 11 Jan 2018 12:30:12 -0500 Subject: [PATCH 1/3] Revert back to using DEFAULT encode/decode Revert back to plugins original use of DEFAULT as the audio encode and decoder. --- src/android/AudioPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/AudioPlayer.java b/src/android/AudioPlayer.java index 861421e7..40b12378 100644 --- a/src/android/AudioPlayer.java +++ b/src/android/AudioPlayer.java @@ -151,8 +151,8 @@ public void startRecording(String file) { this.audioFile = file; this.recorder = new MediaRecorder(); this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); - this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR); - this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB); + this.recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); + this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); this.tempFile = generateTempFile(); this.recorder.setOutputFile(this.tempFile); try { From 5c7e3bf887acc50c1a47f797022d756aa83863d8 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 11 Jan 2018 12:45:24 -0500 Subject: [PATCH 2/3] Revert "Revert back to using DEFAULT encode/decode" This reverts commit 87754504672322333bed20f42ded36bbf222b4f4. --- src/android/AudioPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/AudioPlayer.java b/src/android/AudioPlayer.java index 40b12378..861421e7 100644 --- a/src/android/AudioPlayer.java +++ b/src/android/AudioPlayer.java @@ -151,8 +151,8 @@ public void startRecording(String file) { this.audioFile = file; this.recorder = new MediaRecorder(); this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); - this.recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); - this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); + this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR); + this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB); this.tempFile = generateTempFile(); this.recorder.setOutputFile(this.tempFile); try { From 0a9bc5df863521325117a36e5679afd41b685e9b Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 11 Jan 2018 12:47:02 -0500 Subject: [PATCH 3/3] Encoding / Decoding fix CB-13774: (android) Fix bug with media encoding/decoding --- src/android/AudioPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/AudioPlayer.java b/src/android/AudioPlayer.java index 861421e7..40b12378 100644 --- a/src/android/AudioPlayer.java +++ b/src/android/AudioPlayer.java @@ -151,8 +151,8 @@ public void startRecording(String file) { this.audioFile = file; this.recorder = new MediaRecorder(); this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); - this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR); - this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB); + this.recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); + this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); this.tempFile = generateTempFile(); this.recorder.setOutputFile(this.tempFile); try {