mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-27 15:34:14 +01:00
Deactivate voice recorder workaround for Android 14+ and reduce bitrate for voice messages
(cherry picked from commit 84ef9749d3
)
This commit is contained in:
parent
0a43cdf2dc
commit
57d8ff2539
1 changed files with 3 additions and 3 deletions
|
@ -3359,15 +3359,15 @@ public class ConversationFragment extends XmppFragment
|
|||
mRecorder.setAudioSamplingRate(48_000);
|
||||
} else {
|
||||
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
|
||||
if (AAC_SENSITIVE_DEVICES.contains(Build.MODEL)) {
|
||||
// Changing these three settings for AAC sensitive devices might lead to sporadically truncated (cut-off) voice messages.
|
||||
if (AAC_SENSITIVE_DEVICES.contains(Build.MODEL) && Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) {
|
||||
// Changing these three settings for AAC sensitive devices using Android<=13 might lead to sporadically truncated (cut-off) voice messages.
|
||||
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC);
|
||||
mRecorder.setAudioSamplingRate(24_000);
|
||||
mRecorder.setAudioEncodingBitRate(28_000);
|
||||
} else {
|
||||
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
|
||||
mRecorder.setAudioSamplingRate(44_100);
|
||||
mRecorder.setAudioEncodingBitRate(96_000);
|
||||
mRecorder.setAudioEncodingBitRate(64_000);
|
||||
}
|
||||
}
|
||||
setupOutputFile();
|
||||
|
|
Loading…
Add table
Reference in a new issue