summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/cuesheet.c3
-rw-r--r--apps/cuesheet.h1
-rw-r--r--apps/gui/gwps-common.c22
-rw-r--r--apps/playback.c17
-rw-r--r--utils/wpseditor/libwps/src/dummies.c1
-rw-r--r--utils/wpseditor/libwps/src/dummies.h1
6 files changed, 7 insertions, 38 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 4b3f5e9bc4..0a7521bbc5 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -45,7 +45,6 @@
45#define CUE_DIR ROCKBOX_DIR "/cue" 45#define CUE_DIR ROCKBOX_DIR "/cue"
46 46
47struct cuesheet *curr_cue; 47struct cuesheet *curr_cue;
48struct cuesheet *temp_cue;
49 48
50#if CONFIG_CODEC != SWCODEC 49#if CONFIG_CODEC != SWCODEC
51/* special trickery because the hwcodec playback engine is in firmware/ */ 50/* special trickery because the hwcodec playback engine is in firmware/ */
@@ -59,13 +58,11 @@ void cuesheet_init(void)
59{ 58{
60 if (global_settings.cuesheet) { 59 if (global_settings.cuesheet) {
61 curr_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet)); 60 curr_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet));
62 temp_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet));
63#if CONFIG_CODEC != SWCODEC 61#if CONFIG_CODEC != SWCODEC
64 audio_set_cuesheet_callback(cuesheet_handler); 62 audio_set_cuesheet_callback(cuesheet_handler);
65#endif 63#endif
66 } else { 64 } else {
67 curr_cue = NULL; 65 curr_cue = NULL;
68 temp_cue = NULL;
69 } 66 }
70} 67}
71 68
diff --git a/apps/cuesheet.h b/apps/cuesheet.h
index de51512195..41ee9be397 100644
--- a/apps/cuesheet.h
+++ b/apps/cuesheet.h
@@ -53,7 +53,6 @@ struct cuesheet {
53}; 53};
54 54
55extern struct cuesheet *curr_cue; 55extern struct cuesheet *curr_cue;
56extern struct cuesheet *temp_cue;
57 56
58/* returns true if cuesheet support is initialised */ 57/* returns true if cuesheet support is initialised */
59bool cuesheet_is_enabled(void); 58bool cuesheet_is_enabled(void);
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 5a672ba2a7..e07436e565 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -437,23 +437,15 @@ bool update(struct gui_wps *gwps)
437 && strcmp(gwps->state->id3->path, curr_cue->audio_filename)) 437 && strcmp(gwps->state->id3->path, curr_cue->audio_filename))
438 { 438 {
439 /* the current cuesheet isn't the right one any more */ 439 /* the current cuesheet isn't the right one any more */
440 /* We need to parse the new cuesheet */
440 441
441 if (!strcmp(gwps->state->id3->path, temp_cue->audio_filename)) { 442 char cuepath[MAX_PATH];
442 /* We have the new cuesheet in memory (temp_cue),
443 let's make it the current one ! */
444 memcpy(curr_cue, temp_cue, sizeof(struct cuesheet));
445 }
446 else {
447 /* We need to parse the new cuesheet */
448
449 char cuepath[MAX_PATH];
450 443
451 if (look_for_cuesheet_file(gwps->state->id3->path, cuepath) && 444 if (look_for_cuesheet_file(gwps->state->id3->path, cuepath) &&
452 parse_cuesheet(cuepath, curr_cue)) 445 parse_cuesheet(cuepath, curr_cue))
453 { 446 {
454 gwps->state->id3->cuesheet_type = 1; 447 gwps->state->id3->cuesheet_type = 1;
455 strcpy(curr_cue->audio_filename, gwps->state->id3->path); 448 strcpy(curr_cue->audio_filename, gwps->state->id3->path);
456 }
457 } 449 }
458 450
459 cue_spoof_id3(curr_cue, gwps->state->id3); 451 cue_spoof_id3(curr_cue, gwps->state->id3);
diff --git a/apps/playback.c b/apps/playback.c
index 8a15b9dc8d..55c1878d4e 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1768,23 +1768,6 @@ static void audio_finish_load_track(void)
1768 size_t offset = 0; 1768 size_t offset = 0;
1769 bool start_play = start_play_g; 1769 bool start_play = start_play_g;
1770 1770
1771#if 0
1772 if (cuesheet_is_enabled() && tracks[track_widx].id3.cuesheet_type == 1)
1773 {
1774 char cuepath[MAX_PATH];
1775
1776 struct cuesheet *cue = start_play ? curr_cue : temp_cue;
1777
1778 if (look_for_cuesheet_file(trackname, cuepath) &&
1779 parse_cuesheet(cuepath, cue))
1780 {
1781 strcpy((cue)->audio_filename, trackname);
1782 if (start_play)
1783 cue_spoof_id3(curr_cue, &tracks[track_widx].id3);
1784 }
1785 }
1786#endif
1787
1788 track_load_started = false; 1771 track_load_started = false;
1789 1772
1790 if (tracks[track_widx].id3_hid < 0) { 1773 if (tracks[track_widx].id3_hid < 0) {
diff --git a/utils/wpseditor/libwps/src/dummies.c b/utils/wpseditor/libwps/src/dummies.c
index e70bc3c28f..96c30ee1b3 100644
--- a/utils/wpseditor/libwps/src/dummies.c
+++ b/utils/wpseditor/libwps/src/dummies.c
@@ -30,7 +30,6 @@ struct wps_state wps_state;
30struct gui_wps gui_wps[NB_SCREENS]; 30struct gui_wps gui_wps[NB_SCREENS];
31struct wps_data wps_datas[NB_SCREENS]; 31struct wps_data wps_datas[NB_SCREENS];
32struct cuesheet *curr_cue; 32struct cuesheet *curr_cue;
33struct cuesheet *temp_cue;
34struct system_status global_status; 33struct system_status global_status;
35struct gui_syncstatusbar statusbars; 34struct gui_syncstatusbar statusbars;
36struct playlist_info current_playlist; 35struct playlist_info current_playlist;
diff --git a/utils/wpseditor/libwps/src/dummies.h b/utils/wpseditor/libwps/src/dummies.h
index 758a8636fa..15ee29cca1 100644
--- a/utils/wpseditor/libwps/src/dummies.h
+++ b/utils/wpseditor/libwps/src/dummies.h
@@ -40,7 +40,6 @@ extern struct wps_state wps_state;
40extern struct gui_wps gui_wps[NB_SCREENS]; 40extern struct gui_wps gui_wps[NB_SCREENS];
41extern struct wps_data wps_datas[NB_SCREENS]; 41extern struct wps_data wps_datas[NB_SCREENS];
42extern struct cuesheet *curr_cue; 42extern struct cuesheet *curr_cue;
43extern struct cuesheet *temp_cue;
44extern struct system_status global_status; 43extern struct system_status global_status;
45extern struct gui_syncstatusbar statusbars; 44extern struct gui_syncstatusbar statusbars;
46extern struct playlist_info current_playlist; 45extern struct playlist_info current_playlist;