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 778 return gui_synclist_do_button(lists, action, wrap); 779 779 } 780 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 781 /* Simple use list implementation */ 789 782 static int simplelist_line_count = 0; 790 783 static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
-2
apps/gui/list.h
··· 165 165 enum themable_icons icon); 166 166 extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, 167 167 bool hide); 168 - extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, 169 - enum screen_type screen, int item); 170 168 /* 171 169 * Do the action implied by the given button, 172 170 * returns true if the action was handled.
-33
apps/gui/skin_engine/skin_display.c
··· 95 95 96 96 #ifdef HAVE_LCD_BITMAP 97 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 98 void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) 132 99 { 133 100 struct screen *display = gwps->display;
-3
apps/gui/skin_engine/skin_engine.h
··· 57 57 bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, 58 58 const char *buf, bool isfile); 59 59 60 - /* call this in statusbar toggle handlers if needed */ 61 - void skin_statusbar_changed(struct gui_wps*); 62 - 63 60 bool skin_has_sbs(enum screen_type screen, struct wps_data *data); 64 61 65 62
+2
apps/metadata.c
··· 250 250 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV, 251 251 }; 252 252 253 + #if 0 /* Currently unused, left for reference and future use */ 253 254 /* get AFMT_* corresponding REC_FORMAT_* */ 254 255 const int afmt_rec_format[AFMT_NUM_CODECS] = 255 256 { ··· 261 262 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK, 262 263 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV, 263 264 }; 265 + #endif 264 266 #endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */ 265 267 266 268 #if CONFIG_CODEC == SWCODEC
+1 -1
apps/metadata.h
··· 149 149 /* get REC_FORMAT_* corresponding AFMT_* */ 150 150 extern const int rec_format_afmt[REC_NUM_FORMATS]; 151 151 /* get AFMT_* corresponding REC_FORMAT_* */ 152 - extern const int afmt_rec_format[AFMT_NUM_CODECS]; 152 + /* unused: extern const int afmt_rec_format[AFMT_NUM_CODECS]; */ 153 153 154 154 #define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \ 155 155 { label, root_fname, enc_root_fname, func, ext_list }
-6
apps/playback.c
··· 3625 3625 } 3626 3626 } 3627 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 3628 3635 3629 /** --- Miscellaneous public interfaces --- **/ 3636 3630
-1
apps/playback.h
··· 87 87 }; 88 88 bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */ 89 89 size_t audio_get_filebuflen(void); 90 - bool audio_buffer_state_trashed(void); 91 90 92 91 /* Automatic transition? Only valid to call during the track change events, 93 92 otherwise the result is undefined. */
-11
apps/playlist_viewer.c
··· 126 126 127 127 static bool update_playlist(bool force); 128 128 static int onplay_menu(int index); 129 - static int save_playlist_func(void); 130 129 131 130 static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer, 132 131 int names_buffer_size) ··· 437 436 return true; 438 437 } 439 438 440 - MENUITEM_FUNCTION(save_playlist_item, 0, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), 441 - save_playlist_func, 0, NULL, Icon_NOICON); 442 - 443 439 /* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen. 444 440 Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist 445 441 changed. */ ··· 519 515 } 520 516 } 521 517 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 518 } 530 519 531 520 /* View current playlist */
+2
apps/radio/presets.c
··· 617 617 radio_save_presets(); 618 618 } 619 619 620 + #if 0 /* disabled in draw_progressbar() */ 620 621 #ifdef HAVE_LCD_BITMAP 621 622 static inline void draw_vertical_line_mark(struct screen * screen, 622 623 int x, int y, int h) ··· 643 644 } 644 645 } 645 646 #endif 647 + #endif
+2 -1
apps/radio/radio.h
··· 62 62 char name[MAX_FMPRESET_LEN+1]; 63 63 }; 64 64 const char* radio_get_preset_name(int preset); 65 + #if 0 /* disabled in draw_progressbar() */ 65 66 void presets_draw_markers(struct screen *screen, int x, int y, int w, int h); 67 + #endif 66 68 67 69 #ifdef HAVE_ALBUMART 68 70 void radioart_init(bool entering_screen); ··· 79 81 80 82 /* only radio.c should be using these! */ 81 83 int fms_do_button_loop(bool update_screen); 82 - struct gui_wps *fms_get(enum screen_type screen); 83 84 void fms_fix_displays(enum fms_exiting toggle_state); 84 85 85 86 #endif /* CONFIG_TUNER */
-4
apps/radio/radio_skin.c
··· 125 125 return button; 126 126 } 127 127 128 - struct gui_wps *fms_get(enum screen_type screen) 129 - { 130 - return skin_get_gwps(FM_SCREEN, screen); 131 - }
-17
apps/recorder/icons.c
··· 126 126 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00}; 127 127 #endif 128 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 - }
-14
apps/recorder/icons.h
··· 128 128 #define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH 129 129 #define TIME_X_END STATUSBAR_WIDTH-1 130 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 131 #endif /* End HAVE_LCD_BITMAP */ 146 132 #endif /* PLUGIN */ 147 133 #endif /* _ICONS_H_ */
-22
apps/tagcache.c
··· 1309 1309 return true; 1310 1310 } 1311 1311 1312 - bool tagcache_is_busy(void) 1313 - { 1314 - return read_lock || write_lock; 1315 - } 1316 - 1317 1312 bool tagcache_search(struct tagcache_search *tcs, int tag) 1318 1313 { 1319 1314 struct tagcache_header tag_hdr; ··· 3303 3298 } 3304 3299 #endif /* !__PCTOOL__ */ 3305 3300 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 3301 static bool write_tag(int fd, const char *tagstr, const char *datastr) 3317 3302 { 3318 3303 char buf[512]; ··· 4793 4778 { 4794 4779 queue_post(&tagcache_queue, Q_STOP_SCAN, 0); 4795 4780 } 4796 - 4797 - #ifdef HAVE_TC_RAMCACHE 4798 - bool tagcache_is_ramcache(void) 4799 - { 4800 - return tc_stat.ramcache; 4801 - } 4802 - #endif 4803 4781 4804 4782 #endif /* !__PCTOOL__ */ 4805 4783
-3
apps/tagcache.h
··· 214 214 bool tagcache_find_index(struct tagcache_search *tcs, const char *filename); 215 215 bool tagcache_check_clauses(struct tagcache_search *tcs, 216 216 struct tagcache_search_clause **clause, int count); 217 - bool tagcache_is_busy(void); 218 217 bool tagcache_search(struct tagcache_search *tcs, int tag); 219 218 void tagcache_search_set_uniqbuf(struct tagcache_search *tcs, 220 219 void *buffer, long length); ··· 228 227 void tagcache_search_finish(struct tagcache_search *tcs); 229 228 long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); 230 229 long tagcache_increase_serial(void); 231 - long tagcache_get_serial(void); 232 230 bool tagcache_import_changelog(void); 233 231 bool tagcache_create_changelog(struct tagcache_search *tcs); 234 232 void tagcache_update_numeric(int idx_id, int tag, long data); ··· 244 242 void tagcache_screensync_enable(bool state); 245 243 246 244 #ifdef HAVE_TC_RAMCACHE 247 - bool tagcache_is_ramcache(void); 248 245 #ifdef HAVE_DIRCACHE 249 246 bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); 250 247 #endif
-10
apps/tree.c
··· 307 307 } 308 308 309 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 310 struct tree_context* tree_get_context(void) 321 311 { 322 312 return &tc;
-1
apps/tree.h
··· 105 105 * Call one of the two below after yields since the entrys may move inbetween */ 106 106 struct entry* tree_get_entries(struct tree_context *t); 107 107 struct entry* tree_get_entry_at(struct tree_context *t, int index); 108 - void tree_drawlists(void); 109 108 void tree_mem_init(void) INIT_ATTR; 110 109 void tree_gui_init(void) INIT_ATTR; 111 110 char* get_current_file(char* buffer, size_t buffer_len);
+2
firmware/enc_base.c
··· 25 25 26 26 /** mp3_enc.codec **/ 27 27 28 + #if 0 /* Currently unused, left for reference and future use */ 28 29 /* These are in descending order rather than in MPEG frequency index 29 30 order */ 30 31 const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] = ··· 35 36 12000, 11025, 8000, /* MPEG 2.5 */ 36 37 #endif 37 38 }; 39 + #endif 38 40 39 41 /* All bitrates used in the MPA L3 standard */ 40 42 const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR] =
+2
firmware/export/enc_base.h
··· 97 97 /* This number is count of full encoder set */ 98 98 #define MP3_ENC_NUM_SAMPR 6 99 99 100 + #if 0 100 101 extern const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR]; 102 + #endif 101 103 extern const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR]; 102 104 103 105 struct mp3_enc_config
-1
firmware/export/usb.h
··· 132 132 struct usb_transfer_completion_event_data *event_data); 133 133 bool usb_driver_enabled(int driver); 134 134 bool usb_exclusive_storage(void); /* storage is available for usb */ 135 - void usb_storage_try_release_storage(void); 136 135 #endif 137 136 int usb_release_exclusive_storage(void); 138 137
-18
firmware/usbstack/usb_storage.c
··· 364 364 #endif 365 365 } 366 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 367 #ifdef HAVE_HOTSWAP 386 368 void usb_storage_notify_hotswap(int volume,bool inserted) 387 369 {