Index: bookmark.c =================================================================== --- bookmark.c (revision 24808) +++ bookmark.c (working copy) @@ -30,6 +30,7 @@ #include "settings.h" #include "tree.h" #include "bookmark.h" +#include "dsp.h" #include "system.h" #include "icons.h" #include "menu.h" @@ -84,6 +85,8 @@ long* ms, int * repeat_mode, bool *shuffle, + int * pitch, + int * timestretch, char* file_name); static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line); static const char* get_bookmark_info(int list_index, @@ -335,7 +338,7 @@ /* create the bookmark */ snprintf(global_bookmark, sizeof(global_bookmark), - "%d;%ld;%d;%d;%ld;%d;%d;%s;%s", + "%d;%ld;%d;%d;%ld;%d;%d;%d;%d;%s;%s", resume_index, id3->offset, playlist_get_seed(NULL), @@ -343,6 +346,8 @@ id3->elapsed, global_settings.repeat_mode, global_settings.playlist_shuffle, + sound_get_pitch(), + dsp_get_timestretch(), playlist_get_name(NULL, global_temp_buffer, sizeof(global_temp_buffer)), file+1); @@ -359,7 +364,7 @@ return parse_bookmark(bookmark, NULL,NULL,NULL, NULL, NULL,0,NULL,NULL, - NULL, NULL); + NULL,NULL,NULL, NULL); } /* ----------------------------------------------------------------------- */ @@ -577,7 +582,7 @@ if (!parse_bookmark(bookmarks->items[index - bookmarks->start], &resume_index, NULL, NULL, NULL, global_temp_buffer, - sizeof(global_temp_buffer), &resume_time, NULL, &shuffle, + sizeof(global_temp_buffer), &resume_time, NULL, &shuffle,NULL,NULL, global_filename)) { return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " "; @@ -851,7 +856,7 @@ if (!parse_bookmark(bookmark, &resume_index, NULL, NULL, NULL, global_temp_buffer,sizeof(global_temp_buffer), - &ms, NULL, &playlist_shuffle, + &ms, NULL, &playlist_shuffle, NULL, NULL, global_filename)) { talk_id(LANG_BOOKMARK_INVALID, false); @@ -909,7 +914,8 @@ int index; int offset; int seed; - + int pitch; + int timestretch; if (parse_bookmark(bookmark, &index, &offset, @@ -920,8 +926,14 @@ NULL, &global_settings.repeat_mode, &global_settings.playlist_shuffle, + &pitch, + ×tretch, global_filename)) { + if (!warn_on_pl_erase()) + return false; + sound_set_pitch(pitch); + dsp_set_timestretch(timestretch); return bookmark_play(global_temp_buffer, index, offset, seed, global_filename); } @@ -988,6 +1000,7 @@ unsigned int resume_file_size, long* ms, int * repeat_mode, bool *shuffle, + int * pitch, int * timestretch, char* file_name) { const char* s = bookmark; @@ -1000,6 +1013,8 @@ s = long_token(s, ms); s = int_token(s, repeat_mode); s = bool_token(s, shuffle); + s = int_token(s, pitch); + s = int_token(s, timestretch); if (*s == 0) {