Index: rockbox-devel/apps/dsp.c =================================================================== --- rockbox-devel.orig/apps/dsp.c +++ rockbox-devel/apps/dsp.c @@ -221,7 +221,6 @@ static struct resample_data resample_dat struct crossfeed_data crossfeed_data IBSS_ATTR; static struct eq_state eq_data; -static int pitch_ratio = 1000; static int channels_mode = 0; static int32_t sw_gain, sw_cross; @@ -238,13 +237,12 @@ static int32_t resample_buf[RESAMPLE_BUF int sound_get_pitch(void) { - return pitch_ratio; + return global_settings.pitch_ratio; } void sound_set_pitch(int permille) { - pitch_ratio = permille; - + global_settings.pitch_ratio = permille; dsp_configure(DSP_SWITCH_FREQUENCY, (int *)dsp->codec_frequency); } @@ -1002,7 +1000,7 @@ bool dsp_configure(int setting, void *va not need this feature. */ if (current_codec == CODEC_IDX_AUDIO) - dsp->frequency = pitch_ratio * dsp->codec_frequency / 1000; + dsp->frequency = global_settings.pitch_ratio * dsp->codec_frequency / 1000; else dsp->frequency = dsp->codec_frequency; resampler_set_delta(dsp->frequency); Index: rockbox-devel/apps/onplay.c =================================================================== --- rockbox-devel.orig/apps/onplay.c +++ rockbox-devel/apps/onplay.c @@ -1233,12 +1233,6 @@ int onplay(char* file, int attr, int fro } if (context == CONTEXT_WPS) { -#ifdef HAVE_PITCHSCREEN - /* Pitch screen access */ - items[i].desc = ID2P(LANG_PITCH); - items[i].function = pitch_screen; - i++; -#endif #if CONFIG_CODEC == SWCODEC /* Equalizer menu items */ items[i].desc = ID2P(LANG_EQUALIZER_GRAPHICAL); Index: rockbox-devel/apps/settings.c =================================================================== --- rockbox-devel.orig/apps/settings.c +++ rockbox-devel/apps/settings.c @@ -696,6 +696,8 @@ static const struct bit_entry hd_bits[] {2, S_O(rec_trigger_type), 0, "trigger type", "stop,pause,nf stp"}, #endif + {11, S_O(pitch_ratio), 1000, "pitch", NULL }, + /* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */ }; @@ -1303,8 +1305,11 @@ void settings_apply(void) } dsp_dither_enable(global_settings.dithering_enabled); + #endif + sound_set_pitch(global_settings.pitch_ratio); + #ifdef HAVE_WM8758 eq_hw_enable(global_settings.eq_hw_enabled); #endif Index: rockbox-devel/apps/settings.h =================================================================== --- rockbox-devel.orig/apps/settings.h +++ rockbox-devel/apps/settings.h @@ -460,6 +460,8 @@ struct user_settings bool dithering_enabled; #endif + int pitch_ratio; + #if LCD_DEPTH > 1 unsigned char backdrop_file[MAX_FILENAME+1]; /* backdrop bitmap file */ #endif Index: rockbox-devel/apps/sound_menu.c =================================================================== --- rockbox-devel.orig/apps/sound_menu.c +++ rockbox-devel/apps/sound_menu.c @@ -780,6 +780,9 @@ bool sound_menu(void) #ifdef HAVE_WM8758 { ID2P(LANG_EQUALIZER_HARDWARE), eq_hw_menu }, #endif +#ifdef HAVE_PITCHSCREEN + { ID2P(LANG_PITCH), pitch_screen }, +#endif #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) { ID2P(LANG_LOUDNESS), loudness }, { ID2P(LANG_AUTOVOL), avc },