revert back to AAC for voice messages

iOS can not do opus out of the box
This commit is contained in:
Daniel Gultsch 2023-09-29 18:42:26 +02:00
parent 503b04e8e0
commit 86f46ece83
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 5 additions and 1 deletions

View file

@ -83,6 +83,8 @@ public final class Config {
public static final boolean XEP_0392 = true; //enables XEP-0392 v0.6.0
// media file formats. Homogenous Android or Conversations only deployments can switch to opus and webp
public static final int AVATAR_SIZE = 192;
public static final Bitmap.CompressFormat AVATAR_FORMAT = Bitmap.CompressFormat.JPEG;
public static final int AVATAR_CHAR_LIMIT = 9400;
@ -91,6 +93,8 @@ public final class Config {
public static final Bitmap.CompressFormat IMAGE_FORMAT = Bitmap.CompressFormat.JPEG;
public static final int IMAGE_QUALITY = 75;
public static final boolean USE_OPUS_VOICE_MESSAGES = false;
public static final int MESSAGE_MERGE_WINDOW = 20;
public static final int PAGE_SIZE = 50;

View file

@ -99,7 +99,7 @@ public class RecordingActivity extends Activity implements View.OnClickListener
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
final int outputFormat;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
if (Config.USE_OPUS_VOICE_MESSAGES && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
outputFormat = MediaRecorder.OutputFormat.OGG;
mRecorder.setOutputFormat(outputFormat);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.OPUS);