private static int calculateBitRate(int mpegVer, int layer, int code) {
        int[] arr = null;

        if (mpegVer == AudioFrame.MPEG_V1) {
            switch (layer) {
                case AudioFrame.LAYER_1:
                    arr = BIT_RATE_MPEG1_L1;
                    break;
                case AudioFrame.LAYER_2:
                    arr = BIT_RATE_MPEG1_L2;
                    break;
                case AudioFrame.LAYER_3:
                    arr = BIT_RATE_MPEG1_L3;
                    break;
            }
        } else {
            if (layer == AudioFrame.LAYER_1) {
                arr = BIT_RATE_MPEG2_L1;
            } else {
                arr = BIT_RATE_MPEG2_L2;
            }
        }
        return arr[code];
    }
Calculates the bit rate based on the given parameters.

@param mpegVer the MPEG version
@param layer   the layer
@param code    the code for the bit rate
@return the bit rate in bits per second
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-audiovideo-module/src/main/java/org/apache/tika/parser/mp3/MpegStream.java