summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-01-31 19:41:29 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-01-31 19:41:29 +0000
commit91948d12aa76645fefe817931d64145196140430 (patch)
tree5a7c73b30b30f2c3f90ab0f554d3ef2692ee8018 /apps
parent31c8eee99d7917bf83bbc6cf4cb9579af10d4d42 (diff)
downloadrockbox-91948d12aa76645fefe817931d64145196140430.tar.gz
rockbox-91948d12aa76645fefe817931d64145196140430.zip
FS#9638 - temp_cue is unused and wasting memory.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19890 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-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
4 files changed, 7 insertions, 36 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 @@
#define CUE_DIR ROCKBOX_DIR "/cue"
struct cuesheet *curr_cue;
-struct cuesheet *temp_cue;
#if CONFIG_CODEC != SWCODEC
/* special trickery because the hwcodec playback engine is in firmware/ */
@@ -59,13 +58,11 @@ void cuesheet_init(void)
{
if (global_settings.cuesheet) {
curr_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet));
- temp_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet));
#if CONFIG_CODEC != SWCODEC
audio_set_cuesheet_callback(cuesheet_handler);
#endif
} else {
curr_cue = NULL;
- temp_cue = NULL;
}
}
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 {
};
extern struct cuesheet *curr_cue;
-extern struct cuesheet *temp_cue;
/* returns true if cuesheet support is initialised */
bool 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)
&& strcmp(gwps->state->id3->path, curr_cue->audio_filename))
{
/* the current cuesheet isn't the right one any more */
+ /* We need to parse the new cuesheet */
- if (!strcmp(gwps->state->id3->path, temp_cue->audio_filename)) {
- /* We have the new cuesheet in memory (temp_cue),
- let's make it the current one ! */
- memcpy(curr_cue, temp_cue, sizeof(struct cuesheet));
- }
- else {
- /* We need to parse the new cuesheet */
-
- char cuepath[MAX_PATH];
+ char cuepath[MAX_PATH];
- if (look_for_cuesheet_file(gwps->state->id3->path, cuepath) &&
- parse_cuesheet(cuepath, curr_cue))
- {
- gwps->state->id3->cuesheet_type = 1;
- strcpy(curr_cue->audio_filename, gwps->state->id3->path);
- }
+ if (look_for_cuesheet_file(gwps->state->id3->path, cuepath) &&
+ parse_cuesheet(cuepath, curr_cue))
+ {
+ gwps->state->id3->cuesheet_type = 1;
+ strcpy(curr_cue->audio_filename, gwps->state->id3->path);
}
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)
size_t offset = 0;
bool start_play = start_play_g;
-#if 0
- if (cuesheet_is_enabled() && tracks[track_widx].id3.cuesheet_type == 1)
- {
- char cuepath[MAX_PATH];
-
- struct cuesheet *cue = start_play ? curr_cue : temp_cue;
-
- if (look_for_cuesheet_file(trackname, cuepath) &&
- parse_cuesheet(cuepath, cue))
- {
- strcpy((cue)->audio_filename, trackname);
- if (start_play)
- cue_spoof_id3(curr_cue, &tracks[track_widx].id3);
- }
- }
-#endif
-
track_load_started = false;
if (tracks[track_widx].id3_hid < 0) {