class AudibleSettings {

    public void load(@NonNull SharedPreferences prefs) {
        final String audibleMode = prefs.getString("audible_mode", "horizontal_speed");
        mode = AudibleModes.get(audibleMode);
        min = Numbers.parseDouble(prefs.getString("audible_min", Float.toString(mode.defaultMin)));
        max = Numbers.parseDouble(prefs.getString("audible_max", Float.toString(mode.defaultMax)));
        precision = Numbers.parseInt(prefs.getString("audible_precision", Integer.toString(mode.defaultPrecision)), mode.defaultPrecision);
        speechInterval = Numbers.parseFloat(prefs.getString("audible_interval", "2.5"));
        speechRate = Numbers.parseFloat(prefs.getString("audible_rate", "1.0"));
        isEnabled = prefs.getBoolean("audible_enabled", false);
        airplaneMode = prefs.getBoolean("audible_quiet", true);
    }

}