Make disabling HAVE_PITCHSCREEN actually work without breaking the build

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2010-09-17 20:28:47 +00:00
parent bd43690170
commit f366090562
12 changed files with 51 additions and 14 deletions

View file

@ -348,13 +348,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
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
">%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
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
BM_PITCH | BM_SPEED,
#else
0,
@ -366,7 +366,7 @@ static char* create_bookmark()
global_settings.repeat_mode,
global_settings.playlist_shuffle,
/* ...and their values should go here */
#if CONFIG_CODEC == SWCODEC
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
(long)sound_get_pitch(),
(long)dsp_get_timestretch(),
#endif
@ -913,7 +913,7 @@ static void say_bookmark(const char* bookmark,
/* ------------------------------------------------------------------------*/
static bool play_bookmark(const char* bookmark)
{
#if CONFIG_CODEC == SWCODEC
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
/* preset pitch and speed to 100% in case bookmark doesn't have info */
bm.pitch = sound_get_pitch();
bm.speed = dsp_get_timestretch();
@ -923,7 +923,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
#if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN)
sound_set_pitch(bm.pitch);
dsp_set_timestretch(bm.speed);
#endif