revert back to AAC for voice messages
iOS can not do opus out of the box
This commit is contained in:
parent
503b04e8e0
commit
86f46ece83
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue