void ui_main_evlistener_playback_begin (void * hook_data, void * user_data) { mainwin_disable_seekbar(); mainwin_update_song_info(); gtk_widget_show (mainwin_stime_min); gtk_widget_show (mainwin_stime_sec); gtk_widget_show (mainwin_minus_num); gtk_widget_show (mainwin_10min_num); gtk_widget_show (mainwin_min_num); gtk_widget_show (mainwin_10sec_num); gtk_widget_show (mainwin_sec_num); if (aud_drct_get_ready () && aud_drct_get_length () > 0) { gtk_widget_show (mainwin_position); gtk_widget_show (mainwin_sposition); } ui_skinned_playstatus_set_status(mainwin_playstatus, STATUS_PLAY); title_change (); info_change (); }
static void ui_main_evlistener_hide_seekbar(gpointer hook_data, gpointer user_data) { mainwin_disable_seekbar(); }
void playlist_play(void) { char *filename = NULL; if (get_playlist_length() == 0) return; /* If the user wants a skin randomly selected on play */ if (cfg.random_skin_on_play) { /* Get the current skin list */ scan_skins(); /* If there are entries */ if (g_list_length(skinlist)) { /* Get a random value to select the skin to use */ int randval = (gint)(random() / (RAND_MAX + 1.0) * (g_list_length(skinlist) + 1)); /* If the random value is 0, use the default skin */ /* Otherwise subtract 1 from the random value and */ /* select the skin */ if (randval == 0) load_skin(NULL); else { struct SkinNode *skin; skin = g_list_nth(skinlist, randval - 1)->data; load_skin(skin->path); } } /* Call scan_skins() again to make sure skin selector */ /* is up to date */ scan_skins(); } if (get_input_playing()) input_stop(); vis_clear_data(mainwin_vis); vis_clear_data(playlistwin_vis); svis_clear_data(mainwin_svis); mainwin_disable_seekbar(); PL_LOCK(); if (playlist) { if (!playlist_position) { if (cfg.shuffle) playlist_position = shuffle_list->data; else playlist_position = playlist->data; } filename = playlist_position->filename; } PL_UNLOCK(); if (!filename) return; input_play(filename); if (input_get_time() != -1) { equalizerwin_load_auto_preset(filename); input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, cfg.equalizer_bands); } playlist_check_pos_current(); }