A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657

+11 -155
-7
apps/gui/list.c
··· 778 return gui_synclist_do_button(lists, action, wrap); 779 } 780 781 - bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, 782 - enum screen_type screen, int item) 783 - { 784 - int nb_lines = list_get_nb_lines(lists, screen); 785 - return (unsigned)(item - lists->start_item[screen]) < (unsigned) nb_lines; 786 - } 787 - 788 /* Simple use list implementation */ 789 static int simplelist_line_count = 0; 790 static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
··· 778 return gui_synclist_do_button(lists, action, wrap); 779 } 780 781 /* Simple use list implementation */ 782 static int simplelist_line_count = 0; 783 static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
-2
apps/gui/list.h
··· 165 enum themable_icons icon); 166 extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, 167 bool hide); 168 - extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, 169 - enum screen_type screen, int item); 170 /* 171 * Do the action implied by the given button, 172 * returns true if the action was handled.
··· 165 enum themable_icons icon); 166 extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, 167 bool hide); 168 /* 169 * Do the action implied by the given button, 170 * returns true if the action was handled.
-33
apps/gui/skin_engine/skin_display.c
··· 95 96 #ifdef HAVE_LCD_BITMAP 97 98 - void skin_statusbar_changed(struct gui_wps *skin) 99 - { 100 - if (!skin) 101 - return; 102 - struct wps_data *data = skin->data; 103 - const struct screen *display = skin->display; 104 - const int screen = display->screen_type; 105 - struct skin_viewport *svp = skin_find_item(VP_DEFAULT_LABEL_STRING, SKIN_FIND_VP, data); 106 - 107 - struct viewport *vp = &svp->vp; 108 - viewport_set_defaults(vp, screen); 109 - 110 - if (data->wps_sb_tag) 111 - { /* fix up the default viewport */ 112 - if (data->show_sb_on_wps) 113 - { 114 - if (statusbar_position(screen) != STATUSBAR_OFF) 115 - return; /* vp is fixed already */ 116 - 117 - vp->y = STATUSBAR_HEIGHT; 118 - vp->height = display->lcdheight - STATUSBAR_HEIGHT; 119 - } 120 - else 121 - { 122 - if (statusbar_position(screen) == STATUSBAR_OFF) 123 - return; /* vp is fixed already */ 124 - vp->y = vp->x = 0; 125 - vp->height = display->lcdheight; 126 - vp->width = display->lcdwidth; 127 - } 128 - } 129 - } 130 - 131 void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) 132 { 133 struct screen *display = gwps->display;
··· 95 96 #ifdef HAVE_LCD_BITMAP 97 98 void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) 99 { 100 struct screen *display = gwps->display;
-3
apps/gui/skin_engine/skin_engine.h
··· 57 bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, 58 const char *buf, bool isfile); 59 60 - /* call this in statusbar toggle handlers if needed */ 61 - void skin_statusbar_changed(struct gui_wps*); 62 - 63 bool skin_has_sbs(enum screen_type screen, struct wps_data *data); 64 65
··· 57 bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, 58 const char *buf, bool isfile); 59 60 bool skin_has_sbs(enum screen_type screen, struct wps_data *data); 61 62
+2
apps/metadata.c
··· 250 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV, 251 }; 252 253 /* get AFMT_* corresponding REC_FORMAT_* */ 254 const int afmt_rec_format[AFMT_NUM_CODECS] = 255 { ··· 261 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK, 262 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV, 263 }; 264 #endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */ 265 266 #if CONFIG_CODEC == SWCODEC
··· 250 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV, 251 }; 252 253 + #if 0 /* Currently unused, left for reference and future use */ 254 /* get AFMT_* corresponding REC_FORMAT_* */ 255 const int afmt_rec_format[AFMT_NUM_CODECS] = 256 { ··· 262 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK, 263 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV, 264 }; 265 + #endif 266 #endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */ 267 268 #if CONFIG_CODEC == SWCODEC
+1 -1
apps/metadata.h
··· 149 /* get REC_FORMAT_* corresponding AFMT_* */ 150 extern const int rec_format_afmt[REC_NUM_FORMATS]; 151 /* get AFMT_* corresponding REC_FORMAT_* */ 152 - extern const int afmt_rec_format[AFMT_NUM_CODECS]; 153 154 #define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \ 155 { label, root_fname, enc_root_fname, func, ext_list }
··· 149 /* get REC_FORMAT_* corresponding AFMT_* */ 150 extern const int rec_format_afmt[REC_NUM_FORMATS]; 151 /* get AFMT_* corresponding REC_FORMAT_* */ 152 + /* unused: extern const int afmt_rec_format[AFMT_NUM_CODECS]; */ 153 154 #define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \ 155 { label, root_fname, enc_root_fname, func, ext_list }
-6
apps/playback.c
··· 3625 } 3626 } 3627 3628 - /* Has the playback buffer been completely claimed? */ 3629 - bool audio_buffer_state_trashed(void) 3630 - { 3631 - return buffer_state == AUDIOBUF_STATE_TRASHED; 3632 - } 3633 - 3634 3635 /** --- Miscellaneous public interfaces --- **/ 3636
··· 3625 } 3626 } 3627 3628 3629 /** --- Miscellaneous public interfaces --- **/ 3630
-1
apps/playback.h
··· 87 }; 88 bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */ 89 size_t audio_get_filebuflen(void); 90 - bool audio_buffer_state_trashed(void); 91 92 /* Automatic transition? Only valid to call during the track change events, 93 otherwise the result is undefined. */
··· 87 }; 88 bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */ 89 size_t audio_get_filebuflen(void); 90 91 /* Automatic transition? Only valid to call during the track change events, 92 otherwise the result is undefined. */
-11
apps/playlist_viewer.c
··· 126 127 static bool update_playlist(bool force); 128 static int onplay_menu(int index); 129 - static int save_playlist_func(void); 130 131 static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer, 132 int names_buffer_size) ··· 437 return true; 438 } 439 440 - MENUITEM_FUNCTION(save_playlist_item, 0, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), 441 - save_playlist_func, 0, NULL, Icon_NOICON); 442 - 443 /* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen. 444 Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist 445 changed. */ ··· 519 } 520 } 521 return ret; 522 - } 523 - 524 - /* Save playlist to disk */ 525 - static int save_playlist_func(void) 526 - { 527 - save_playlist_screen(viewer.playlist); 528 - return 0; 529 } 530 531 /* View current playlist */
··· 126 127 static bool update_playlist(bool force); 128 static int onplay_menu(int index); 129 130 static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer, 131 int names_buffer_size) ··· 436 return true; 437 } 438 439 /* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen. 440 Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist 441 changed. */ ··· 515 } 516 } 517 return ret; 518 } 519 520 /* View current playlist */
+2
apps/radio/presets.c
··· 617 radio_save_presets(); 618 } 619 620 #ifdef HAVE_LCD_BITMAP 621 static inline void draw_vertical_line_mark(struct screen * screen, 622 int x, int y, int h) ··· 643 } 644 } 645 #endif
··· 617 radio_save_presets(); 618 } 619 620 + #if 0 /* disabled in draw_progressbar() */ 621 #ifdef HAVE_LCD_BITMAP 622 static inline void draw_vertical_line_mark(struct screen * screen, 623 int x, int y, int h) ··· 644 } 645 } 646 #endif 647 + #endif
+2 -1
apps/radio/radio.h
··· 62 char name[MAX_FMPRESET_LEN+1]; 63 }; 64 const char* radio_get_preset_name(int preset); 65 void presets_draw_markers(struct screen *screen, int x, int y, int w, int h); 66 67 #ifdef HAVE_ALBUMART 68 void radioart_init(bool entering_screen); ··· 79 80 /* only radio.c should be using these! */ 81 int fms_do_button_loop(bool update_screen); 82 - struct gui_wps *fms_get(enum screen_type screen); 83 void fms_fix_displays(enum fms_exiting toggle_state); 84 85 #endif /* CONFIG_TUNER */
··· 62 char name[MAX_FMPRESET_LEN+1]; 63 }; 64 const char* radio_get_preset_name(int preset); 65 + #if 0 /* disabled in draw_progressbar() */ 66 void presets_draw_markers(struct screen *screen, int x, int y, int w, int h); 67 + #endif 68 69 #ifdef HAVE_ALBUMART 70 void radioart_init(bool entering_screen); ··· 81 82 /* only radio.c should be using these! */ 83 int fms_do_button_loop(bool update_screen); 84 void fms_fix_displays(enum fms_exiting toggle_state); 85 86 #endif /* CONFIG_TUNER */
-4
apps/radio/radio_skin.c
··· 125 return button; 126 } 127 128 - struct gui_wps *fms_get(enum screen_type screen) 129 - { 130 - return skin_get_gwps(FM_SCREEN, screen); 131 - }
··· 125 return button; 126 } 127
-17
apps/recorder/icons.c
··· 126 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00}; 127 #endif 128 129 - /* 130 - * Print play mode to status bar 131 - */ 132 - void statusbar_icon_play_mode(int mode) 133 - { 134 - lcd_mono_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS, 135 - STATUSBAR_Y_POS, ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT); 136 - } 137 - 138 - /* 139 - * Print shuffle mode to status bar 140 - */ 141 - void statusbar_icon_shuffle(void) 142 - { 143 - lcd_mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS, 144 - STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT); 145 - }
··· 126 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00}; 127 #endif 128
-14
apps/recorder/icons.h
··· 128 #define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH 129 #define TIME_X_END STATUSBAR_WIDTH-1 130 131 - extern void statusbar_wipe(void); 132 - extern void statusbar_icon_battery(int percent); 133 - extern bool statusbar_icon_volume(int percent); 134 - extern void statusbar_icon_play_state(int state); 135 - extern void statusbar_icon_play_mode(int mode); 136 - extern void statusbar_icon_shuffle(void); 137 - extern void statusbar_icon_lock(void); 138 - #if CONFIG_RTC 139 - extern void statusbar_time(int hour, int minute); 140 - #endif 141 - #if (CONFIG_LED == LED_VIRTUAL) 142 - extern void statusbar_led(void); 143 - #endif 144 - 145 #endif /* End HAVE_LCD_BITMAP */ 146 #endif /* PLUGIN */ 147 #endif /* _ICONS_H_ */
··· 128 #define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH 129 #define TIME_X_END STATUSBAR_WIDTH-1 130 131 #endif /* End HAVE_LCD_BITMAP */ 132 #endif /* PLUGIN */ 133 #endif /* _ICONS_H_ */
-22
apps/tagcache.c
··· 1309 return true; 1310 } 1311 1312 - bool tagcache_is_busy(void) 1313 - { 1314 - return read_lock || write_lock; 1315 - } 1316 - 1317 bool tagcache_search(struct tagcache_search *tcs, int tag) 1318 { 1319 struct tagcache_header tag_hdr; ··· 3303 } 3304 #endif /* !__PCTOOL__ */ 3305 3306 - long tagcache_get_serial(void) 3307 - { 3308 - return current_tcmh.serial; 3309 - } 3310 - 3311 - long tagcache_get_commitid(void) 3312 - { 3313 - return current_tcmh.commitid; 3314 - } 3315 - 3316 static bool write_tag(int fd, const char *tagstr, const char *datastr) 3317 { 3318 char buf[512]; ··· 4793 { 4794 queue_post(&tagcache_queue, Q_STOP_SCAN, 0); 4795 } 4796 - 4797 - #ifdef HAVE_TC_RAMCACHE 4798 - bool tagcache_is_ramcache(void) 4799 - { 4800 - return tc_stat.ramcache; 4801 - } 4802 - #endif 4803 4804 #endif /* !__PCTOOL__ */ 4805
··· 1309 return true; 1310 } 1311 1312 bool tagcache_search(struct tagcache_search *tcs, int tag) 1313 { 1314 struct tagcache_header tag_hdr; ··· 3298 } 3299 #endif /* !__PCTOOL__ */ 3300 3301 static bool write_tag(int fd, const char *tagstr, const char *datastr) 3302 { 3303 char buf[512]; ··· 4778 { 4779 queue_post(&tagcache_queue, Q_STOP_SCAN, 0); 4780 } 4781 4782 #endif /* !__PCTOOL__ */ 4783
-3
apps/tagcache.h
··· 214 bool tagcache_find_index(struct tagcache_search *tcs, const char *filename); 215 bool tagcache_check_clauses(struct tagcache_search *tcs, 216 struct tagcache_search_clause **clause, int count); 217 - bool tagcache_is_busy(void); 218 bool tagcache_search(struct tagcache_search *tcs, int tag); 219 void tagcache_search_set_uniqbuf(struct tagcache_search *tcs, 220 void *buffer, long length); ··· 228 void tagcache_search_finish(struct tagcache_search *tcs); 229 long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); 230 long tagcache_increase_serial(void); 231 - long tagcache_get_serial(void); 232 bool tagcache_import_changelog(void); 233 bool tagcache_create_changelog(struct tagcache_search *tcs); 234 void tagcache_update_numeric(int idx_id, int tag, long data); ··· 244 void tagcache_screensync_enable(bool state); 245 246 #ifdef HAVE_TC_RAMCACHE 247 - bool tagcache_is_ramcache(void); 248 #ifdef HAVE_DIRCACHE 249 bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); 250 #endif
··· 214 bool tagcache_find_index(struct tagcache_search *tcs, const char *filename); 215 bool tagcache_check_clauses(struct tagcache_search *tcs, 216 struct tagcache_search_clause **clause, int count); 217 bool tagcache_search(struct tagcache_search *tcs, int tag); 218 void tagcache_search_set_uniqbuf(struct tagcache_search *tcs, 219 void *buffer, long length); ··· 227 void tagcache_search_finish(struct tagcache_search *tcs); 228 long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); 229 long tagcache_increase_serial(void); 230 bool tagcache_import_changelog(void); 231 bool tagcache_create_changelog(struct tagcache_search *tcs); 232 void tagcache_update_numeric(int idx_id, int tag, long data); ··· 242 void tagcache_screensync_enable(bool state); 243 244 #ifdef HAVE_TC_RAMCACHE 245 #ifdef HAVE_DIRCACHE 246 bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); 247 #endif
-10
apps/tree.c
··· 307 } 308 309 310 - /* drawer function for the GUI_EVENT_REDRAW callback */ 311 - void tree_drawlists(void) 312 - { 313 - /* band-aid to fix the bar/list redrawing properly after leaving a plugin */ 314 - send_event(GUI_EVENT_THEME_CHANGED, NULL); 315 - /* end bandaid */ 316 - gui_synclist_draw(&tree_lists); 317 - } 318 - 319 - 320 struct tree_context* tree_get_context(void) 321 { 322 return &tc;
··· 307 } 308 309 310 struct tree_context* tree_get_context(void) 311 { 312 return &tc;
-1
apps/tree.h
··· 105 * Call one of the two below after yields since the entrys may move inbetween */ 106 struct entry* tree_get_entries(struct tree_context *t); 107 struct entry* tree_get_entry_at(struct tree_context *t, int index); 108 - void tree_drawlists(void); 109 void tree_mem_init(void) INIT_ATTR; 110 void tree_gui_init(void) INIT_ATTR; 111 char* get_current_file(char* buffer, size_t buffer_len);
··· 105 * Call one of the two below after yields since the entrys may move inbetween */ 106 struct entry* tree_get_entries(struct tree_context *t); 107 struct entry* tree_get_entry_at(struct tree_context *t, int index); 108 void tree_mem_init(void) INIT_ATTR; 109 void tree_gui_init(void) INIT_ATTR; 110 char* get_current_file(char* buffer, size_t buffer_len);
+2
firmware/enc_base.c
··· 25 26 /** mp3_enc.codec **/ 27 28 /* These are in descending order rather than in MPEG frequency index 29 order */ 30 const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] = ··· 35 12000, 11025, 8000, /* MPEG 2.5 */ 36 #endif 37 }; 38 39 /* All bitrates used in the MPA L3 standard */ 40 const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR] =
··· 25 26 /** mp3_enc.codec **/ 27 28 + #if 0 /* Currently unused, left for reference and future use */ 29 /* These are in descending order rather than in MPEG frequency index 30 order */ 31 const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] = ··· 36 12000, 11025, 8000, /* MPEG 2.5 */ 37 #endif 38 }; 39 + #endif 40 41 /* All bitrates used in the MPA L3 standard */ 42 const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR] =
+2
firmware/export/enc_base.h
··· 97 /* This number is count of full encoder set */ 98 #define MP3_ENC_NUM_SAMPR 6 99 100 extern const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR]; 101 extern const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR]; 102 103 struct mp3_enc_config
··· 97 /* This number is count of full encoder set */ 98 #define MP3_ENC_NUM_SAMPR 6 99 100 + #if 0 101 extern const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR]; 102 + #endif 103 extern const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR]; 104 105 struct mp3_enc_config
-1
firmware/export/usb.h
··· 132 struct usb_transfer_completion_event_data *event_data); 133 bool usb_driver_enabled(int driver); 134 bool usb_exclusive_storage(void); /* storage is available for usb */ 135 - void usb_storage_try_release_storage(void); 136 #endif 137 int usb_release_exclusive_storage(void); 138
··· 132 struct usb_transfer_completion_event_data *event_data); 133 bool usb_driver_enabled(int driver); 134 bool usb_exclusive_storage(void); /* storage is available for usb */ 135 #endif 136 int usb_release_exclusive_storage(void); 137
-18
firmware/usbstack/usb_storage.c
··· 364 #endif 365 } 366 367 - void usb_storage_try_release_storage(void) 368 - { 369 - /* Check if there is a connected drive left. If not, 370 - release excusive access */ 371 - bool canrelease=true; 372 - int i; 373 - for(i=0;i<storage_num_drives();i++) { 374 - if(!ejected[i] && locked[i]) { 375 - canrelease=false; 376 - break; 377 - } 378 - } 379 - if(canrelease) { 380 - logf("scsi release ata"); 381 - usb_release_exclusive_storage(); 382 - } 383 - } 384 - 385 #ifdef HAVE_HOTSWAP 386 void usb_storage_notify_hotswap(int volume,bool inserted) 387 {
··· 364 #endif 365 } 366 367 #ifdef HAVE_HOTSWAP 368 void usb_storage_notify_hotswap(int volume,bool inserted) 369 {