diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index c28d63c40..0bf86c8b4 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -5328,10 +5328,11 @@ public class ConversationFragment extends XmppFragment } final int outputFormat; if (("opus".equals(userChosenCodec) || ("".equals(userChosenCodec) && Config.USE_OPUS_VOICE_MESSAGES)) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - outputFormat = MediaRecorder.OutputFormat.OGG; + outputFormat = MediaRecorder.OutputFormat.WEBM; mRecorder.setOutputFormat(outputFormat); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.OPUS); - mRecorder.setAudioEncodingBitRate(32000); + mRecorder.setAudioEncodingBitRate(64000); + mRecorder.setAudioSamplingRate(48000); } else if ("mpeg4".equals(userChosenCodec) || !Config.USE_OPUS_VOICE_MESSAGES) { outputFormat = MediaRecorder.OutputFormat.MPEG_4; mRecorder.setOutputFormat(outputFormat); @@ -5514,8 +5515,8 @@ public class ConversationFragment extends XmppFragment final String extension; if (outputFormat == MediaRecorder.OutputFormat.MPEG_4) { extension = "m4a"; - } else if (outputFormat == MediaRecorder.OutputFormat.OGG) { - extension = "oga"; + } else if (outputFormat == MediaRecorder.OutputFormat.WEBM) { + extension = "opus"; } else if (outputFormat == MediaRecorder.OutputFormat.THREE_GPP) { extension = "awb"; } else { diff --git a/src/main/res/xml/preferences_attachments.xml b/src/main/res/xml/preferences_attachments.xml index f62ae45a8..adb4ad10b 100644 --- a/src/main/res/xml/preferences_attachments.xml +++ b/src/main/res/xml/preferences_attachments.xml @@ -57,7 +57,7 @@ android:key="clear_blocked_media" />