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

Commit ec9f15a9 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "Increase AudioRecord sample rate limit to 96kHz"

parents e5a87c53 5076ea90
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.");
        }