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

Commit 5076ea90 authored by Andy Hung's avatar Andy Hung
Browse files

Increase AudioRecord sample rate limit to 96kHz

Change-Id: I3e296a30b828cbea9fd2eab2b8db81833c20d7cf
parent 00b9bcda
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@ public class AudioRecord
    //---------------------------------------------------------
    // Constants
    //--------------------

    /** Minimum value for sample rate */
    private static final int SAMPLE_RATE_HZ_MIN = 4000;
    /** Maximum value for sample rate */
    private static final int SAMPLE_RATE_HZ_MAX = 96000;

    /**
     *  indicates AudioRecord state is not successfully initialized.
     */
@@ -571,7 +577,7 @@ public class AudioRecord

        //--------------
        // sample rate
        if ( (sampleRateInHz < 4000) || (sampleRateInHz > 48000) ) {
        if ((sampleRateInHz < SAMPLE_RATE_HZ_MIN) || (sampleRateInHz > SAMPLE_RATE_HZ_MAX)) {
            throw new IllegalArgumentException(sampleRateInHz
                    + "Hz is not a supported sample rate.");
        }