summaryrefslogtreecommitdiffstats
path: root/apps/bookmark.c
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2010-04-10 21:41:01 +0000
committerJeffrey Goode <jeffg7@gmail.com>2010-04-10 21:41:01 +0000
commit4f3f7dd8567f86d03ebd7ea6658fde54bcc4d5e5 (patch)
tree16f7e7026041dc681a161541e4223d94a8586311 /apps/bookmark.c
parent55064f7b7d09375c53582f1743bb52164aec8fd2 (diff)
downloadrockbox-4f3f7dd8567f86d03ebd7ea6658fde54bcc4d5e5.tar.gz
rockbox-4f3f7dd8567f86d03ebd7ea6658fde54bcc4d5e5.tar.bz2
rockbox-4f3f7dd8567f86d03ebd7ea6658fde54bcc4d5e5.zip
Fix bookmarks for hwcodec targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25577 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/bookmark.c')
-rw-r--r--apps/bookmark.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index eed4219ae7..2c9b3d5d17 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -341,9 +341,17 @@ 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
+ ">%d;%d;%ld;%d;%ld;%d;%d;%s;%s",
+#else
">%d;%d;%ld;%d;%ld;%d;%d;%d;%d;%s;%s",
+#endif
/* ... their flags should go here ... */
+#if CONFIG_CODEC == SWCODEC
BM_PITCH | BM_SPEED,
+#else
+ 0,
+#endif
resume_index,
id3->offset,
playlist_get_seed(NULL),
@@ -351,8 +359,10 @@ static char* create_bookmark()
global_settings.repeat_mode,
global_settings.playlist_shuffle,
/* ...and their values should go here */
+#if CONFIG_CODEC == SWCODEC
sound_get_pitch(),
dsp_get_timestretch(),
+#endif
/* more mandatory tokens */
playlist_get_name(NULL, global_temp_buffer,
sizeof(global_temp_buffer)),
@@ -896,16 +906,20 @@ static void say_bookmark(const char* bookmark,
/* ------------------------------------------------------------------------*/
static bool play_bookmark(const char* bookmark)
{
+#if CONFIG_CODEC == SWCODEC
/* preset pitch and speed to 100% in case bookmark doesn't have info */
bm.pitch = sound_get_pitch();
bm.speed = dsp_get_timestretch();
+#endif
if (parse_bookmark(bookmark, true))
{
global_settings.repeat_mode = bm.repeat_mode;
global_settings.playlist_shuffle = bm.shuffle;
+#if CONFIG_CODEC == SWCODEC
sound_set_pitch(bm.pitch);
dsp_set_timestretch(bm.speed);
+#endif
return bookmark_play(global_temp_buffer, bm.resume_index,
bm.resume_offset, bm.resume_seed, global_filename);
}