Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8883a13 authored by Sidipotu Ashok's avatar Sidipotu Ashok Committed by Linux Build Service Account
Browse files

audio: enable recording in new formats

- Remove the redudant if statement blocking the
audio record of newer formats.

Change-Id: I484489cb26f96c58b3c928217de7b6aca4bd6813
parent 1e83fee1
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -860,18 +860,6 @@ public class AudioRecord
            return ERROR_BAD_VALUE;
        }

        // PCM_8BIT is not supported at the moment
        if (audioFormat != AudioFormat.ENCODING_PCM_16BIT
            && audioFormat != AudioFormat.ENCODING_AMRNB
            && audioFormat != AudioFormat.ENCODING_AMRWB
            && audioFormat != AudioFormat.ENCODING_EVRC
            && audioFormat != AudioFormat.ENCODING_EVRCB
            && audioFormat != AudioFormat.ENCODING_EVRCWB
            && audioFormat != AudioFormat.ENCODING_EVRCNW) {
            loge("getMinBufferSize(): Invalid audio format.");
            return ERROR_BAD_VALUE;
        }

        int size = native_get_min_buff_size(sampleRateInHz, channelCount, audioFormat);
        if (size == 0) {
            return ERROR_BAD_VALUE;