mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
FS#9638 - temp_cue is unused and wasting memory.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19890 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
31c8eee99d
commit
91948d12aa
6 changed files with 7 additions and 38 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -30,7 +30,6 @@ struct wps_state wps_state;
|
|||
struct gui_wps gui_wps[NB_SCREENS];
|
||||
struct wps_data wps_datas[NB_SCREENS];
|
||||
struct cuesheet *curr_cue;
|
||||
struct cuesheet *temp_cue;
|
||||
struct system_status global_status;
|
||||
struct gui_syncstatusbar statusbars;
|
||||
struct playlist_info current_playlist;
|
||||
|
|
|
@ -40,7 +40,6 @@ extern struct wps_state wps_state;
|
|||
extern struct gui_wps gui_wps[NB_SCREENS];
|
||||
extern struct wps_data wps_datas[NB_SCREENS];
|
||||
extern struct cuesheet *curr_cue;
|
||||
extern struct cuesheet *temp_cue;
|
||||
extern struct system_status global_status;
|
||||
extern struct gui_syncstatusbar statusbars;
|
||||
extern struct playlist_info current_playlist;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue