forked from len0rd/rockbox
Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROL
Also move the definition to config.h Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff Reviewed-on: http://gerrit.rockbox.org/234 Reviewed-by: Nils Wallménius <nils@rockbox.org>
This commit is contained in:
parent
d26a35d10b
commit
d29a11b7a8
98 changed files with 50 additions and 245 deletions
|
@ -80,7 +80,7 @@ gui/bitmap/list-skinned.c
|
|||
gui/charcell/list.c
|
||||
#endif
|
||||
gui/option_select.c
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
gui/pitchscreen.c
|
||||
#endif
|
||||
#ifdef HAVE_QUICKSCREEN
|
||||
|
|
|
@ -374,13 +374,13 @@ static char* create_bookmark()
|
|||
snprintf(global_bookmark, sizeof(global_bookmark),
|
||||
/* new optional bookmark token descriptors should be inserted
|
||||
just before the "%s;%s" in this line... */
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHCONTROL)
|
||||
">%d;%d;%ld;%d;%ld;%d;%d;%ld;%ld;%s;%s",
|
||||
#else
|
||||
">%d;%d;%ld;%d;%ld;%d;%d;%s;%s",
|
||||
#endif
|
||||
/* ... their flags should go here ... */
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHCONTROL)
|
||||
BM_PITCH | BM_SPEED,
|
||||
#else
|
||||
0,
|
||||
|
@ -392,7 +392,7 @@ static char* create_bookmark()
|
|||
global_settings.repeat_mode,
|
||||
global_settings.playlist_shuffle,
|
||||
/* ...and their values should go here */
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHCONTROL)
|
||||
(long)sound_get_pitch(),
|
||||
(long)dsp_get_timestretch(),
|
||||
#endif
|
||||
|
@ -954,7 +954,7 @@ static void say_bookmark(const char* bookmark,
|
|||
/* ------------------------------------------------------------------------*/
|
||||
static bool play_bookmark(const char* bookmark)
|
||||
{
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHCONTROL)
|
||||
/* preset pitch and speed to 100% in case bookmark doesn't have info */
|
||||
bm.pitch = sound_get_pitch();
|
||||
bm.speed = dsp_get_timestretch();
|
||||
|
@ -964,7 +964,7 @@ static bool play_bookmark(const char* bookmark)
|
|||
{
|
||||
global_settings.repeat_mode = bm.repeat_mode;
|
||||
global_settings.playlist_shuffle = bm.shuffle;
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
|
||||
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHCONTROL)
|
||||
sound_set_pitch(bm.pitch);
|
||||
dsp_set_timestretch(bm.speed);
|
||||
#endif
|
||||
|
|
|
@ -88,7 +88,7 @@ masd
|
|||
morse_input
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PITCHSCREEN)
|
||||
#if defined(HAVE_PITCHCONTROL)
|
||||
pitchscreen
|
||||
#endif
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ char* get_dir(char* buf, int buf_size, const char* path, int level)
|
|||
return buf;
|
||||
}
|
||||
|
||||
#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHSCREEN)
|
||||
#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHCONTROL)
|
||||
/* A helper to determine the enum value for pitch/speed.
|
||||
|
||||
When there are two choices (i.e. boolean), return 1 if the value is
|
||||
|
@ -1462,7 +1462,7 @@ const char *get_token_value(struct gui_wps *gwps,
|
|||
}
|
||||
#endif /* (CONFIG_CODEC == SWCODEC) */
|
||||
|
||||
#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHSCREEN)
|
||||
#if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHCONTROL)
|
||||
case SKIN_TOKEN_SOUND_PITCH:
|
||||
{
|
||||
int32_t pitch = sound_get_pitch();
|
||||
|
@ -1477,7 +1477,7 @@ const char *get_token_value(struct gui_wps *gwps,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHSCREEN)
|
||||
#if (CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHCONTROL)
|
||||
case SKIN_TOKEN_SOUND_SPEED:
|
||||
{
|
||||
int32_t pitch = sound_get_pitch();
|
||||
|
|
|
@ -1011,7 +1011,7 @@ long gui_wps_show(void)
|
|||
#endif /* BUTTON_F3 */
|
||||
|
||||
/* pitch screen */
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
case ACTION_WPS_PITCHSCREEN:
|
||||
{
|
||||
gwps_leave_wps();
|
||||
|
@ -1020,7 +1020,7 @@ long gui_wps_show(void)
|
|||
restore = true;
|
||||
}
|
||||
break;
|
||||
#endif /* HAVE_PITCHSCREEN */
|
||||
#endif /* HAVE_PITCHCONTROL */
|
||||
|
||||
#ifdef AB_REPEAT_ENABLE
|
||||
/* reset A&B markers */
|
||||
|
|
|
@ -103,7 +103,7 @@ MENUITEM_SETTING(depth_3d, &global_settings.depth_3d, NULL);
|
|||
&crossfeed, &crossfeed_direct_gain, &crossfeed_cross_gain,
|
||||
&crossfeed_hf_attenuation, &crossfeed_hf_cutoff);
|
||||
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
static int timestretch_callback(int action,const struct menu_item_ex *this_item)
|
||||
{
|
||||
switch (action)
|
||||
|
@ -185,7 +185,7 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
|
|||
#endif
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
,&crossfeed_menu, &equalizer_menu, &dithering_enabled
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
,×tretch_enabled
|
||||
#endif
|
||||
,&compressor_menu
|
||||
|
|
|
@ -1000,7 +1000,7 @@ static int browse_id3_wrapper(void)
|
|||
/* CONTEXT_WPS items */
|
||||
MENUITEM_FUNCTION(browse_id3_item, MENU_FUNC_CHECK_RETVAL, ID2P(LANG_MENU_SHOW_ID3_INFO),
|
||||
browse_id3_wrapper, NULL, NULL, Icon_NOICON);
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH),
|
||||
gui_syncpitchscreen_run, NULL, NULL, Icon_Audio);
|
||||
#endif
|
||||
|
@ -1189,7 +1189,7 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
|
|||
#endif
|
||||
&browse_id3_item, &list_viewers_item,
|
||||
&delete_file_item, &view_cue_item,
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
&pitch_screen_item,
|
||||
#endif
|
||||
);
|
||||
|
@ -1283,7 +1283,7 @@ static struct hotkey_assignment hotkey_items[] = {
|
|||
{ HOTKEY_SHOW_TRACK_INFO, LANG_MENU_SHOW_ID3_INFO,
|
||||
HOTKEY_FUNC(browse_id3, NULL),
|
||||
ONPLAY_RELOAD_DIR },
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
{ HOTKEY_PITCHSCREEN, LANG_PITCH,
|
||||
HOTKEY_FUNC(gui_syncpitchscreen_run, NULL),
|
||||
ONPLAY_RELOAD_DIR },
|
||||
|
|
|
@ -568,7 +568,7 @@ static const struct plugin_api rockbox_api = {
|
|||
dsp_crossfeed_enable,
|
||||
dsp_eq_enable,
|
||||
dsp_dither_enable,
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
dsp_set_timestretch,
|
||||
#endif
|
||||
dsp_configure,
|
||||
|
@ -614,7 +614,7 @@ static const struct plugin_api rockbox_api = {
|
|||
mpeg_get_last_header,
|
||||
#endif
|
||||
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \
|
||||
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHSCREEN)
|
||||
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
|
||||
sound_set_pitch,
|
||||
#endif
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ struct plugin_api {
|
|||
void (*dsp_crossfeed_enable)(bool enable);
|
||||
void (*dsp_eq_enable)(bool enable);
|
||||
void (*dsp_dither_enable)(bool enable);
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
void (*dsp_set_timestretch)(int32_t percent);
|
||||
#endif
|
||||
intptr_t (*dsp_configure)(struct dsp_config *dsp,
|
||||
|
@ -742,7 +742,7 @@ struct plugin_api {
|
|||
unsigned long (*mpeg_get_last_header)(void);
|
||||
#endif
|
||||
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \
|
||||
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHSCREEN)
|
||||
(CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
|
||||
void (*sound_set_pitch)(int32_t pitch);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -481,7 +481,7 @@ static void audio_thread(void)
|
|||
init_mad();
|
||||
|
||||
td.dsp = rb->dsp_get_config(CODEC_IDX_AUDIO);
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
rb->sound_set_pitch(PITCH_SPEED_100);
|
||||
rb->dsp_set_timestretch(PITCH_SPEED_100);
|
||||
#endif
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "core_alloc.h"
|
||||
#include "tdspeed.h"
|
||||
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
static int handles[4] = { 0, 0, 0, 0 };
|
||||
|
||||
static int move_callback(int handle, void *current, void *new)
|
||||
|
@ -100,5 +100,5 @@ void tdspeed_free_buffers(int32_t **buffers, int nbuf)
|
|||
buffers[i] = NULL;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_PITCHSCREEN */
|
||||
#endif /* HAVE_PITCHCONTROL */
|
||||
|
||||
|
|
|
@ -993,7 +993,7 @@ void settings_apply(bool read_disk)
|
|||
}
|
||||
|
||||
dsp_dither_enable(global_settings.dithering_enabled);
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
dsp_timestretch_enable(global_settings.timestretch_enabled);
|
||||
#endif
|
||||
dsp_set_compressor(&global_settings.compressor_settings);
|
||||
|
|
|
@ -341,7 +341,7 @@ struct user_settings
|
|||
int keyclick; /* keyclick volume */
|
||||
int keyclick_repeats; /* keyclick on repeats */
|
||||
bool dithering_enabled;
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
bool timestretch_enabled;
|
||||
#endif
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
@ -733,7 +733,7 @@ struct user_settings
|
|||
struct touchscreen_parameter ts_calibration_data;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
/* pitch screen settings */
|
||||
bool pitch_mode_semitone;
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
|
|
|
@ -1474,7 +1474,7 @@ const struct settings_list settings[] = {
|
|||
OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false,
|
||||
"dithering enabled", dsp_dither_enable),
|
||||
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
/* timestretch */
|
||||
OFFON_SETTING(F_SOUNDSETTING, timestretch_enabled, LANG_TIMESTRETCH, false,
|
||||
"timestretch enabled", dsp_timestretch_enable),
|
||||
|
@ -1848,7 +1848,7 @@ const struct settings_list settings[] = {
|
|||
#endif
|
||||
OFFON_SETTING(0, prevent_skip, LANG_PREVENT_SKIPPING, false, "prevent track skip", NULL),
|
||||
|
||||
#ifdef HAVE_PITCHSCREEN
|
||||
#ifdef HAVE_PITCHCONTROL
|
||||
OFFON_SETTING(0, pitch_mode_semitone, LANG_SEMITONE, false,
|
||||
"Semitone pitch change", NULL),
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue