This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-media.git


The following commit(s) were added to refs/heads/master by this push:
     new 957249b  feat(android): increase audio encoding bitrate and sampling 
rate (#383)
957249b is described below

commit 957249b6b3f160416c8713a6fd331189052b6c72
Author: エリス <[email protected]>
AuthorDate: Tue Aug 22 23:36:35 2023 +0900

    feat(android): increase audio encoding bitrate and sampling rate (#383)
---
 src/android/AudioPlayer.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/android/AudioPlayer.java b/src/android/AudioPlayer.java
index e19689f..c479177 100644
--- a/src/android/AudioPlayer.java
+++ b/src/android/AudioPlayer.java
@@ -170,6 +170,8 @@ public class AudioPlayer implements OnCompletionListener, 
OnPreparedListener, On
             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.setAudioEncodingBitRate(96000);
+            this.recorder.setAudioSamplingRate(44100);
             this.tempFile = createAudioFilePath(null);
             this.recorder.setOutputFile(this.tempFile);
             try {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to