/** * Menu to set Line Selector Type (Pointer/Bar) */ static bool invert_cursor(void) { return set_bool_options(str(LANG_INVERT_CURSOR), &global_settings.invert_cursor, STR(LANG_INVERT_CURSOR_BAR), STR(LANG_INVERT_CURSOR_POINTER), NULL); }
static bool car_adapter_mode(void) { return set_bool_options( str(LANG_CAR_ADAPTER_MODE), &global_settings.car_adapter_mode, STR(LANG_SET_BOOL_YES), STR(LANG_SET_BOOL_NO), NULL); }
/** * Menu to reverse Hebrew and Arabic text according to BiDi algorythm */ static bool bidi_support(void) { return set_bool_options( str(LANG_BIDI_SUPPORT), &global_settings.bidi_support, STR(LANG_SET_BOOL_YES), STR(LANG_SET_BOOL_NO), set_bidi_support); }
static bool id3_order(void) { return set_bool_options( str(LANG_ID3_ORDER), &global_settings.id3_v1_first, STR(LANG_ID3_V1_FIRST), STR(LANG_ID3_V2_FIRST), mpeg_id3_options); }
static bool superbass(void) { return set_bool_options(str(LANG_SUPERBASS), &global_settings.superbass, STR(LANG_SET_BOOL_YES), STR(LANG_SET_BOOL_NO), set_superbass); }
static bool mdb_enable(void) { return set_bool_options(str(LANG_MDB_ENABLE), &global_settings.mdb_enable, STR(LANG_SET_BOOL_YES), STR(LANG_SET_BOOL_NO), set_mdb_enable); }
static bool spdif(void) { bool rc = set_bool_options(str(LANG_SPDIF_ENABLE), &global_settings.spdif_enable, STR(LANG_ON), STR(LANG_OFF), spdif_power_enable); return rc; }
/** * Menu to set LCD Mode (normal/inverse) */ static bool invert(void) { bool rc = set_bool_options(str(LANG_INVERT), &global_settings.invert, STR(LANG_INVERT_LCD_INVERSE), STR(LANG_INVERT_LCD_NORMAL), lcd_set_invert_display); return rc; }
static bool replaygain_mode(void) { bool result = set_bool_options(str(LANG_REPLAYGAIN_MODE), &global_settings.replaygain_track, STR(LANG_TRACK_GAIN), STR(LANG_ALBUM_GAIN), NULL); dsp_set_replaygain(true); return result; }
static bool runtimedb(void) { bool rc; bool old = global_settings.runtimedb; rc = set_bool_options( str(LANG_RUNTIMEDB_ACTIVE), &global_settings.runtimedb, STR(LANG_SET_BOOL_YES), STR(LANG_SET_BOOL_NO), NULL); if (old && !global_settings.runtimedb) rundb_shutdown(); if (!old && global_settings.runtimedb) rundb_init(); return rc; }
/** * Menu to select wether the scale of the meter * displays dBfs of linear values. */ static int peak_meter_scale(void) { bool retval = false; bool use_dbfs = global_settings.peak_meter_dbfs; retval = set_bool_options(str(LANG_PM_SCALE), &use_dbfs, STR(LANG_PM_DBFS), STR(LANG_PM_LINEAR), NULL); /* has the user really changed the scale? */ if (use_dbfs != global_settings.peak_meter_dbfs) { /* store the change */ global_settings.peak_meter_dbfs = use_dbfs; peak_meter_set_use_dbfs(use_dbfs); /* If the user changed the scale mode the meaning of peak_meter_min (peak_meter_max) has changed. Thus we have to convert the values stored in global_settings. */ if (use_dbfs) { /* we only store -dBfs */ global_settings.peak_meter_min = -peak_meter_get_min() / 100; global_settings.peak_meter_max = -peak_meter_get_max() / 100; /* limit the returned value to the allowed range */ if(global_settings.peak_meter_min > 89) global_settings.peak_meter_min = 89; } else { int max; /* linear percent */ global_settings.peak_meter_min = peak_meter_get_min(); /* converting dBfs -> percent results in a precision loss. I assume that the user doesn't bother that conversion dBfs <-> percent isn't symmetrical for odd values but that he wants 0 dBfs == 100%. Thus I 'correct' the percent value resulting from dBfs -> percent manually here */ max = peak_meter_get_max(); global_settings.peak_meter_max = max < 99 ? max : 100; } settings_apply_pm_range(); } return retval; }