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

Commit 9e4a66d6 authored by Andy Hung's avatar Andy Hung Committed by Jean-Michel Trivi
Browse files

Fix track sample rate limit

Should be controlled by SAMPLE_RATE_HZ_MIN and SAMPLE_RATE_HZ_MAX.
Associated with testing the following sample rate bugs.

Bug: 12979141
Bug: 15933066
Change-Id: Id130613fe28c7a1070e42f9bc44ed3b00a4113a3
parent f79aad63
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ public class AudioTrack
                                 int channelConfig, int audioFormat, int mode) {
        //--------------
        // sample rate, note these values are subject to change
        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.");
        }