Index: apps/features.txt
===================================================================
--- apps/features.txt (revision 16176)
+++ apps/features.txt (working copy)
@@ -76,7 +76,7 @@
masd
#endif
-#if defined(HAVE_PITCHSCREEN)
+#if defined(HAVE_ADJUSTABLE_PITCH)
pitchscreen
#endif
Index: apps/gui/gwps.c
===================================================================
--- apps/gui/gwps.c (revision 16176)
+++ apps/gui/gwps.c (working copy)
@@ -553,7 +553,7 @@
#endif /* BUTTON_F3 */
/* pitch screen */
-#ifdef HAVE_PITCHSCREEN
+#ifdef HAVE_ADJUSTABLE_PITCH
case ACTION_WPS_PITCHSCREEN:
#if LCD_DEPTH > 1
show_main_backdrop();
@@ -571,7 +571,7 @@
#endif
restore = true;
break;
-#endif /* HAVE_PITCHSCREEN */
+#endif /* HAVE_ADJUSTABLE_PITCH */
#ifdef AB_REPEAT_ENABLE
/* reset A&B markers */
Index: apps/lang/english.lang
===================================================================
--- apps/lang/english.lang (revision 16176)
+++ apps/lang/english.lang (working copy)
@@ -11574,3 +11574,45 @@
swcodec: "Keyclick Repeats"
+
+ id: LANG_PITCH_CHANGE_MODE
+ desc: in the system menu
+ user:
+
+ *: "Pitch Change Mode"
+
+
+ *: "Pitch Change Mode"
+
+
+ *: "Pitch Change Mode"
+
+
+
+ id: LANG_PITCH_CHANGE_SMALL_STEPS
+ desc: in the pitch change mode menu
+ user:
+
+ *: "Small Steps"
+
+
+ *: "Small Steps"
+
+
+ *: "Small Steps"
+
+
+
+ id: LANG_PITCH_CHANGE_SEMITONES
+ desc: in the pitch change mode menu
+ user:
+
+ *: "Semitones"
+
+
+ *: "Semitones"
+
+
+ *: "Semitones"
+
+
Index: apps/menus/settings_menu.c
===================================================================
--- apps/menus/settings_menu.c (revision 16176)
+++ apps/menus/settings_menu.c (working copy)
@@ -352,6 +352,9 @@
MENUITEM_SETTING(buttonlight_brightness, &global_settings.buttonlight_brightness, NULL);
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+MENUITEM_SETTING(pitch_change_mode, &global_settings.pitch_change_mode, NULL);
+#endif
MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
0, Icon_System_menu,
@@ -388,6 +391,9 @@
#if CONFIG_CODEC == SWCODEC
&keyclick_menu,
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ &pitch_change_mode,
+#endif
);
/* SYSTEM MENU */
Index: apps/menus/sound_menu.c
===================================================================
--- apps/menus/sound_menu.c (revision 16176)
+++ apps/menus/sound_menu.c (working copy)
@@ -99,8 +99,12 @@
MENUITEM_SETTING(mdb_shape, &global_settings.mdb_shape, NULL);
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ MENUITEM_SETTING(pitch, &global_settings.pitch, soundmenu_callback);
+#endif
+
MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
&volume,
&bass,
@@ -119,5 +123,8 @@
,&loudness,&avc,&superbass,&mdb_enable,&mdb_strength
,&mdb_harmonics,&mdb_center,&mdb_shape
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ ,&pitch
+#endif
);
Index: apps/onplay.c
===================================================================
--- apps/onplay.c (revision 16176)
+++ apps/onplay.c (working copy)
@@ -1011,7 +1011,7 @@
/* CONTEXT_WPS items */
MENUITEM_FUNCTION(browse_id3_item, 0, ID2P(LANG_MENU_SHOW_ID3_INFO),
browse_id3, NULL, NULL, Icon_NOICON);
-#ifdef HAVE_PITCHSCREEN
+#ifdef HAVE_ADJUSTABLE_PITCH
MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH),
pitch_screen, NULL, NULL, Icon_Audio);
#endif
@@ -1145,7 +1145,7 @@
&rating_item,
#endif
&bookmark_menu, &browse_id3_item, &delete_file_item, &view_cue_item,
-#ifdef HAVE_PITCHSCREEN
+#ifdef HAVE_ADJUSTABLE_PITCH
&pitch_screen_item,
#endif
#if CONFIG_CODEC == SWCODEC
Index: apps/screens.c
===================================================================
--- apps/screens.c (revision 16176)
+++ apps/screens.c (working copy)
@@ -384,7 +384,7 @@
}
#endif /* CONFIG_CHARGING && !HAVE_POWEROFF_WHILE_CHARGING && defined(CPU_SH) */
-#ifdef HAVE_PITCHSCREEN
+#ifdef HAVE_ADJUSTABLE_PITCH
#define PITCH_MAX 2000
#define PITCH_MIN 500
@@ -392,10 +392,9 @@
#define PITCH_BIG_DELTA 10
#define PITCH_NUDGE_DELTA 20
-#define PITCH_MODE_ABSOLUTE 1
-#define PITCH_MODE_SEMITONE -PITCH_MODE_ABSOLUTE
-static int pitch_mode = PITCH_MODE_ABSOLUTE; /* 1 - absolute, -1 - semitone */
+static bool pitch_mode_initialized = false;
+static int pitch_mode;
/* returns:
0 if no key was pressed
@@ -544,6 +543,11 @@
bool exit = false;
int i;
+ if (!pitch_mode_initialized) {
+ pitch_mode = global_settings.pitch_change_mode;
+ pitch_mode_initialized = true;
+ }
+
#if CONFIG_CODEC == SWCODEC
pcmbuf_set_low_latency(true);
#endif
@@ -603,7 +607,8 @@
break;
case ACTION_PS_TOGGLE_MODE:
- pitch_mode = -pitch_mode;
+ pitch_mode = (pitch_mode == PITCH_MODE_ABSOLUTE) ?
+ PITCH_MODE_SEMITONE : PITCH_MODE_ABSOLUTE;
break;
case ACTION_PS_EXIT:
@@ -634,7 +639,7 @@
lcd_setfont(FONT_UI);
return 0;
}
-#endif /* HAVE_PITCHSCREEN */
+#endif /* HAVE_ADJUSTABLE_PITCH */
#ifdef HAVE_QUICKSCREEN
Index: apps/screens.h
===================================================================
--- apps/screens.h (revision 16176)
+++ apps/screens.h (working copy)
@@ -36,7 +36,7 @@
int mmc_remove_request(void);
#endif
-#ifdef HAVE_PITCHSCREEN
+#ifdef HAVE_ADJUSTABLE_PITCH
bool pitch_screen(void);
#endif
Index: apps/settings.c
===================================================================
--- apps/settings.c (revision 16176)
+++ apps/settings.c (working copy)
@@ -713,6 +713,9 @@
sound_set(SOUND_MDB_ENABLE, global_settings.mdb_enable);
sound_set(SOUND_SUPERBASS, global_settings.superbass);
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ sound_set(SOUND_PITCH, global_settings.pitch);
+#endif
#ifdef HAVE_WM8758
sound_set(SOUND_BASS_CUTOFF, global_settings.bass_cutoff);
Index: apps/settings.h
===================================================================
--- apps/settings.h (revision 16176)
+++ apps/settings.h (working copy)
@@ -155,6 +155,15 @@
#endif
#endif /* HAVE_RTC_ALARM */
+
+#ifdef HAVE_ADJUSTABLE_PITCH
+enum
+{
+ PITCH_MODE_ABSOLUTE = 0,
+ PITCH_MODE_SEMITONE
+};
+#endif /* HAVE_ADJUSTABLE_PITCH */
+
/** virtual pointer stuff.. move to another .h maybe? **/
/* These define "virtual pointers", which could either be a literal string,
or a mean a string ID if the pointer is in a certain range.
@@ -289,6 +298,13 @@
int treble; /* treble boost/cut in decibels */
int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */
int stereo_width; /* 0-255% */
+#ifdef HAVE_ADJUSTABLE_PITCH
+ int pitch; /* pitch in permille of the normal sound (2000=octave higher) */
+ int pitch_change_mode; /* How pitch is changed in the pitch screen. */
+ /* 0=small steps, 1=semitone. This is not a sound setting, */
+ /* but it's better to keep these settings together since they */
+ /* are guarded by the same #ifdef */
+#endif
#if CONFIG_CODEC != SWCODEC
int loudness; /* loudness eq: 0-100 0=off 100=max */
Index: apps/settings_list.c
===================================================================
--- apps/settings_list.c (revision 16176)
+++ apps/settings_list.c (working copy)
@@ -328,6 +328,12 @@
SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE),
+#ifdef HAVE_ADJUSTABLE_PITCH
+ SOUND_SETTING(F_NO_WRAP, pitch, LANG_PITCH, "pitch", SOUND_PITCH),
+ CHOICE_SETTING(0, pitch_change_mode, LANG_PITCH_CHANGE_MODE, 0,
+ "pitch change mode", "small steps,semitones", NULL, 2,
+ ID2P(LANG_PITCH_CHANGE_SMALL_STEPS), ID2P(LANG_PITCH_CHANGE_SEMITONES)),
+#endif
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS),
Index: firmware/drivers/audio/as3514.c
===================================================================
--- firmware/drivers/audio/as3514.c (revision 16176)
+++ firmware/drivers/audio/as3514.c (working copy)
@@ -39,6 +39,9 @@
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 39, 23},
[SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* Shadow registers */
Index: firmware/drivers/audio/mas35xx.c
===================================================================
--- firmware/drivers/audio/mas35xx.c (revision 16176)
+++ firmware/drivers/audio/mas35xx.c (working copy)
@@ -51,4 +51,7 @@
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 15, 8},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 15, 2},
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
Index: firmware/drivers/audio/tlv320.c
===================================================================
--- firmware/drivers/audio/tlv320.c (revision 16176)
+++ firmware/drivers/audio/tlv320.c (working copy)
@@ -35,6 +35,9 @@
[SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 1},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* convert tenth of dB volume (-840..0) to master volume register value */
Index: firmware/drivers/audio/uda1380.c
===================================================================
--- firmware/drivers/audio/uda1380.c (revision 16176)
+++ firmware/drivers/audio/uda1380.c (working copy)
@@ -36,6 +36,9 @@
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* convert tenth of dB volume (-840..0) to master volume register value */
Index: firmware/drivers/audio/wm8721.c
===================================================================
--- firmware/drivers/audio/wm8721.c (revision 16176)
+++ firmware/drivers/audio/wm8721.c (working copy)
@@ -46,6 +46,9 @@
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* convert tenth of dB volume (-730..60) to master volume register value */
Index: firmware/drivers/audio/wm8731.c
===================================================================
--- firmware/drivers/audio/wm8731.c (revision 16176)
+++ firmware/drivers/audio/wm8731.c (working copy)
@@ -46,6 +46,9 @@
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 0},
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* Init values/shadows
Index: firmware/drivers/audio/wm8751.c
===================================================================
--- firmware/drivers/audio/wm8751.c (revision 16176)
+++ firmware/drivers/audio/wm8751.c (working copy)
@@ -40,6 +40,9 @@
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* Flags used in combination with settings */
Index: firmware/drivers/audio/wm8758.c
===================================================================
--- firmware/drivers/audio/wm8758.c (revision 16176)
+++ firmware/drivers/audio/wm8758.c (working copy)
@@ -43,6 +43,9 @@
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
[SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1},
[SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* shadow registers */
Index: firmware/drivers/audio/wm8975.c
===================================================================
--- firmware/drivers/audio/wm8975.c (revision 16176)
+++ firmware/drivers/audio/wm8975.c (working copy)
@@ -45,6 +45,9 @@
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* convert tenth of dB volume (-730..60) to master volume register value */
Index: firmware/drivers/audio/wm8985.c
===================================================================
--- firmware/drivers/audio/wm8985.c (revision 16176)
+++ firmware/drivers/audio/wm8985.c (working copy)
@@ -36,6 +36,9 @@
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
/* convert tenth of dB volume to master volume register value */
Index: firmware/export/audiohw.h
===================================================================
--- firmware/export/audiohw.h (revision 16176)
+++ firmware/export/audiohw.h (working copy)
@@ -73,6 +73,9 @@
SOUND_BASS_CUTOFF,
SOUND_TREBLE_CUTOFF,
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ SOUND_PITCH,
+#endif
};
enum Channel {
Index: firmware/export/config-c200.h
===================================================================
--- firmware/export/config-c200.h (revision 16176)
+++ firmware/export/config-c200.h (working copy)
@@ -36,7 +36,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-cowond2.h
===================================================================
--- firmware/export/config-cowond2.h (revision 16176)
+++ firmware/export/config-cowond2.h (working copy)
@@ -31,7 +31,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-e200.h
===================================================================
--- firmware/export/config-e200.h (revision 16176)
+++ firmware/export/config-e200.h (working copy)
@@ -36,7 +36,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-fmrecorder.h
===================================================================
--- firmware/export/config-fmrecorder.h (revision 16176)
+++ firmware/export/config-fmrecorder.h (working copy)
@@ -17,7 +17,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-gigabeat-s.h
===================================================================
--- firmware/export/config-gigabeat-s.h (revision 16176)
+++ firmware/export/config-gigabeat-s.h (working copy)
@@ -18,7 +18,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-gigabeat.h
===================================================================
--- firmware/export/config-gigabeat.h (revision 16176)
+++ firmware/export/config-gigabeat.h (working copy)
@@ -21,7 +21,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-h10.h
===================================================================
--- firmware/export/config-h10.h (revision 16176)
+++ firmware/export/config-h10.h (working copy)
@@ -33,7 +33,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-h100.h
===================================================================
--- firmware/export/config-h100.h (revision 16176)
+++ firmware/export/config-h100.h (working copy)
@@ -27,7 +27,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-h10_5gb.h
===================================================================
--- firmware/export/config-h10_5gb.h (revision 16176)
+++ firmware/export/config-h10_5gb.h (working copy)
@@ -33,7 +33,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-h120.h
===================================================================
--- firmware/export/config-h120.h (revision 16176)
+++ firmware/export/config-h120.h (working copy)
@@ -22,7 +22,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-h300.h
===================================================================
--- firmware/export/config-h300.h (revision 16176)
+++ firmware/export/config-h300.h (working copy)
@@ -22,7 +22,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-iaudiom5.h
===================================================================
--- firmware/export/config-iaudiom5.h (revision 16176)
+++ firmware/export/config-iaudiom5.h (working copy)
@@ -35,7 +35,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-iaudiox5.h
===================================================================
--- firmware/export/config-iaudiox5.h (revision 16176)
+++ firmware/export/config-iaudiox5.h (working copy)
@@ -38,7 +38,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipod1g2g.h
===================================================================
--- firmware/export/config-ipod1g2g.h (revision 16176)
+++ firmware/export/config-ipod1g2g.h (working copy)
@@ -26,7 +26,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipod3g.h
===================================================================
--- firmware/export/config-ipod3g.h (revision 16176)
+++ firmware/export/config-ipod3g.h (working copy)
@@ -27,7 +27,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipod4g.h
===================================================================
--- firmware/export/config-ipod4g.h (revision 16176)
+++ firmware/export/config-ipod4g.h (working copy)
@@ -36,7 +36,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipodcolor.h
===================================================================
--- firmware/export/config-ipodcolor.h (revision 16176)
+++ firmware/export/config-ipodcolor.h (working copy)
@@ -33,7 +33,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipodmini.h
===================================================================
--- firmware/export/config-ipodmini.h (revision 16176)
+++ firmware/export/config-ipodmini.h (working copy)
@@ -26,7 +26,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipodmini2g.h
===================================================================
--- firmware/export/config-ipodmini2g.h (revision 16176)
+++ firmware/export/config-ipodmini2g.h (working copy)
@@ -26,7 +26,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipodnano.h
===================================================================
--- firmware/export/config-ipodnano.h (revision 16176)
+++ firmware/export/config-ipodnano.h (working copy)
@@ -33,7 +33,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ipodvideo.h
===================================================================
--- firmware/export/config-ipodvideo.h (revision 16176)
+++ firmware/export/config-ipodvideo.h (working copy)
@@ -33,7 +33,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-logikdax.h
===================================================================
--- firmware/export/config-logikdax.h (revision 16176)
+++ firmware/export/config-logikdax.h (working copy)
@@ -25,7 +25,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-mrobe100.h
===================================================================
--- firmware/export/config-mrobe100.h (revision 16176)
+++ firmware/export/config-mrobe100.h (working copy)
@@ -17,7 +17,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-mrobe500.h
===================================================================
--- firmware/export/config-mrobe500.h (revision 16176)
+++ firmware/export/config-mrobe500.h (working copy)
@@ -39,7 +39,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-ondiofm.h
===================================================================
--- firmware/export/config-ondiofm.h (revision 16176)
+++ firmware/export/config-ondiofm.h (working copy)
@@ -28,7 +28,7 @@
#define CONFIG_KEYPAD ONDIO_PAD
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
Index: firmware/export/config-ondiosp.h
===================================================================
--- firmware/export/config-ondiosp.h (revision 16176)
+++ firmware/export/config-ondiosp.h (working copy)
@@ -21,7 +21,7 @@
#define CONFIG_KEYPAD ONDIO_PAD
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF
Index: firmware/export/config-recorder.h
===================================================================
--- firmware/export/config-recorder.h (revision 16176)
+++ firmware/export/config-recorder.h (working copy)
@@ -17,7 +17,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-recorderv2.h
===================================================================
--- firmware/export/config-recorderv2.h (revision 16176)
+++ firmware/export/config-recorderv2.h (working copy)
@@ -17,7 +17,7 @@
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* define this if you would like tagcache to build on this target */
#define HAVE_TAGCACHE
Index: firmware/export/config-tpj1022.h
===================================================================
--- firmware/export/config-tpj1022.h (revision 16176)
+++ firmware/export/config-tpj1022.h (working copy)
@@ -20,7 +20,7 @@
#define HAVE_QUICKSCREEN
/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
+#define HAVE_ADJUSTABLE_PITCH
/* LCD dimensions */
#define LCD_WIDTH 220
Index: firmware/export/mp3_playback.h
===================================================================
--- firmware/export/mp3_playback.h (revision 16176)
+++ firmware/export/mp3_playback.h (working copy)
@@ -29,7 +29,7 @@
int avc, int channel_config, int stereo_width,
int mdb_strength, int mdb_harmonics,
int mdb_center, int mdb_shape, bool mdb_enable,
- bool superbass);
+ bool superbass, int pitch);
/* exported just for mpeg.c, to keep the recording there */
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
Index: firmware/export/sound.h
===================================================================
--- firmware/export/sound.h (revision 16176)
+++ firmware/export/sound.h (working copy)
@@ -59,7 +59,7 @@
void sound_set(int setting, int value);
int sound_val2phys(int setting, int value);
-#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
+#ifdef HAVE_ADJUSTABLE_PITCH
void sound_set_pitch(int permille);
int sound_get_pitch(void);
#endif
Index: firmware/mp3_playback.c
===================================================================
--- firmware/mp3_playback.c (revision 16176)
+++ firmware/mp3_playback.c (working copy)
@@ -331,7 +331,7 @@
int avc, int channel_config, int stereo_width,
int mdb_strength, int mdb_harmonics,
int mdb_center, int mdb_shape, bool mdb_enable,
- bool superbass)
+ bool superbass, int pitch)
{
#ifdef SIMULATOR
(void)volume;
@@ -348,6 +348,7 @@
(void)mdb_shape;
(void)mdb_enable;
(void)superbass;
+ (void)pitch;
#else
#if CONFIG_CODEC == MAS3507D
unsigned long val;
@@ -465,6 +466,13 @@
sound_set(SOUND_MDB_ENABLE, mdb_enable);
sound_set(SOUND_SUPERBASS, superbass);
#endif
+
+#if HAVE_ADJUSTABLE_PITCH
+ sound_set(SOUND_PITCH, pitch);
+#else
+ (void)pitch;
+#endif
+
#endif /* !SIMULATOR */
playing = false;
Index: firmware/sound.c
===================================================================
--- firmware/sound.c (revision 16176)
+++ firmware/sound.c (working copy)
@@ -84,8 +84,11 @@
[SOUND_MDB_ENABLE] = {"", 0, 1, 0, 1, 0},
[SOUND_SUPERBASS] = {"", 0, 1, 0, 1, 0},
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ [SOUND_PITCH] = {"%", 1, 1, 500,2000,1000},
+#endif
};
-#endif
+#endif /* #ifdef SIMULATOR */
const char *sound_unit(int setting)
{
@@ -189,6 +192,11 @@
result = sound_set_superbass;
break;
#endif
+#ifdef HAVE_ADJUSTABLE_PITCH
+ case SOUND_PITCH:
+ result = sound_set_pitch;
+ break;
+#endif
}
return result;
Index: manual/configure_rockbox/sound_settings.tex
===================================================================
--- manual/configure_rockbox/sound_settings.tex (revision 16176)
+++ manual/configure_rockbox/sound_settings.tex (working copy)
@@ -431,3 +431,15 @@
Rockbox uses highpass triangular distribution noise as the dithering noise
source, and a third order noise shaper.
}
+
+\opt{HAVE_ADJUSTABLE_PITCH}{
+\section{\label{ref:SettingPitch}Pitch}
+
+With this setting, you can set the initial value of the pitch and (at the same
+time) the playback speed. The value set here is saved in the Rockbox
+configuration file and will be used when the \dap\ is turned on the next time.
+You can also change the pitch in the pitch screen (see
+\reference{sec:pitchscreen}). However the value set there is not saved and
+will be forgotten when the \dap\ is turned off.
+
+}
Index: manual/configure_rockbox/system_options.tex
===================================================================
--- manual/configure_rockbox/system_options.tex (revision 16176)
+++ manual/configure_rockbox/system_options.tex (working copy)
@@ -192,3 +192,12 @@
Changes the brightness of the button lights.
}
}
+
+\opt{HAVE_ADJUSTABLE_PITCH}{
+ \subsection{\label{ref:PitchChangeMode}Pitch Change Mode}
+ This option defines the pitch changing mode when you enter the pitch screen
+ (see \reference{sec:pitchscreen}) for the first time after the \dap\ has
+ been turned on. You can also change the pitch changing mode in the pitch
+ screen. However the mode set there is not saved and will be forgotten when
+ the \dap\ is turned off.
+}
Index: manual/rockbox_interface/wps.tex
===================================================================
--- manual/rockbox_interface/wps.tex (revision 16176)
+++ manual/rockbox_interface/wps.tex (working copy)
@@ -207,11 +207,17 @@
between 50\% and 200\%. 50\% means half the normal playback speed and the
pitch that's an octave lower than the normal pitch. 200\% means double
playback speed and the pitch that's an octave higher than the normal pitch.
- It is not possible to change the pitch without changing the playback speed and
- vice versa. Changing the pitch can be done in two modes: procentual and
- semitone. Initially (after the \dap{} is switched on), procentual mode
- is active.
+ It is not possible to change the pitch without changing the playback speed
+ and vice versa. Changing the pitch can be done in two modes: procentual and
+ semitone. Which mode is active after the \dap{} is switched on, is defined
+ by the setting \setting{Pitch Change Mode} (see
+ \reference{ref:PitchChangeMode}).
+ Note that the values set in this screen (both the pitch changing mode and
+ the pitch itself) are not saved and will be lost when the \dap\ is turned
+ off. To set the pitch permanently, use the pitch setting in the sound menu
+ (see \reference{ref:SettingPitch}).
+
\begin{table}
\begin{btnmap}{}{}
\ActionPsToggleMode