diff options
-rw-r--r-- | apps/bookmark.c | 14 |
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() | |||
341 | snprintf(global_bookmark, sizeof(global_bookmark), | 341 | snprintf(global_bookmark, sizeof(global_bookmark), |
342 | /* new optional bookmark token descriptors should be inserted | 342 | /* new optional bookmark token descriptors should be inserted |
343 | just before the "%s;%s" in this line... */ | 343 | just before the "%s;%s" in this line... */ |
344 | #if CONFIG_CODEC == SWCODEC | ||
345 | ">%d;%d;%ld;%d;%ld;%d;%d;%s;%s", | ||
346 | #else | ||
344 | ">%d;%d;%ld;%d;%ld;%d;%d;%d;%d;%s;%s", | 347 | ">%d;%d;%ld;%d;%ld;%d;%d;%d;%d;%s;%s", |
348 | #endif | ||
345 | /* ... their flags should go here ... */ | 349 | /* ... their flags should go here ... */ |
350 | #if CONFIG_CODEC == SWCODEC | ||
346 | BM_PITCH | BM_SPEED, | 351 | BM_PITCH | BM_SPEED, |
352 | #else | ||
353 | 0, | ||
354 | #endif | ||
347 | resume_index, | 355 | resume_index, |
348 | id3->offset, | 356 | id3->offset, |
349 | playlist_get_seed(NULL), | 357 | playlist_get_seed(NULL), |
@@ -351,8 +359,10 @@ static char* create_bookmark() | |||
351 | global_settings.repeat_mode, | 359 | global_settings.repeat_mode, |
352 | global_settings.playlist_shuffle, | 360 | global_settings.playlist_shuffle, |
353 | /* ...and their values should go here */ | 361 | /* ...and their values should go here */ |
362 | #if CONFIG_CODEC == SWCODEC | ||
354 | sound_get_pitch(), | 363 | sound_get_pitch(), |
355 | dsp_get_timestretch(), | 364 | dsp_get_timestretch(), |
365 | #endif | ||
356 | /* more mandatory tokens */ | 366 | /* more mandatory tokens */ |
357 | playlist_get_name(NULL, global_temp_buffer, | 367 | playlist_get_name(NULL, global_temp_buffer, |
358 | sizeof(global_temp_buffer)), | 368 | sizeof(global_temp_buffer)), |
@@ -896,16 +906,20 @@ static void say_bookmark(const char* bookmark, | |||
896 | /* ------------------------------------------------------------------------*/ | 906 | /* ------------------------------------------------------------------------*/ |
897 | static bool play_bookmark(const char* bookmark) | 907 | static bool play_bookmark(const char* bookmark) |
898 | { | 908 | { |
909 | #if CONFIG_CODEC == SWCODEC | ||
899 | /* preset pitch and speed to 100% in case bookmark doesn't have info */ | 910 | /* preset pitch and speed to 100% in case bookmark doesn't have info */ |
900 | bm.pitch = sound_get_pitch(); | 911 | bm.pitch = sound_get_pitch(); |
901 | bm.speed = dsp_get_timestretch(); | 912 | bm.speed = dsp_get_timestretch(); |
913 | #endif | ||
902 | 914 | ||
903 | if (parse_bookmark(bookmark, true)) | 915 | if (parse_bookmark(bookmark, true)) |
904 | { | 916 | { |
905 | global_settings.repeat_mode = bm.repeat_mode; | 917 | global_settings.repeat_mode = bm.repeat_mode; |
906 | global_settings.playlist_shuffle = bm.shuffle; | 918 | global_settings.playlist_shuffle = bm.shuffle; |
919 | #if CONFIG_CODEC == SWCODEC | ||
907 | sound_set_pitch(bm.pitch); | 920 | sound_set_pitch(bm.pitch); |
908 | dsp_set_timestretch(bm.speed); | 921 | dsp_set_timestretch(bm.speed); |
922 | #endif | ||
909 | return bookmark_play(global_temp_buffer, bm.resume_index, | 923 | return bookmark_play(global_temp_buffer, bm.resume_index, |
910 | bm.resume_offset, bm.resume_seed, global_filename); | 924 | bm.resume_offset, bm.resume_seed, global_filename); |
911 | } | 925 | } |