Mercurial > audlegacy
comparison audacious/playback.c @ 1649:f3934d790a2e trunk
[svn] - abstractionalize a lot of stuff, build still broken, live with it
author | nenolod |
---|---|
date | Thu, 07 Sep 2006 21:44:05 -0700 |
parents | 06329cbf186a |
children | a6e6d3500c13 |
comparison
equal
deleted
inserted
replaced
1648:d878473e6e3e | 1649:f3934d790a2e |
---|---|
38 #include "libaudacious/util.h" | 38 #include "libaudacious/util.h" |
39 #include "libaudacious/configdb.h" | 39 #include "libaudacious/configdb.h" |
40 | 40 |
41 #include "input.h" | 41 #include "input.h" |
42 #include "main.h" | 42 #include "main.h" |
43 #include "mainwin.h" | |
44 #include "equalizer.h" | |
45 #include "output.h" | 43 #include "output.h" |
46 #include "playlist.h" | 44 #include "playlist.h" |
47 #include "ui_playlist.h" | |
48 #include "skinwin.h" | 45 #include "skinwin.h" |
49 #include "urldecode.h" | 46 #include "urldecode.h" |
50 #include "util.h" | 47 #include "util.h" |
51 | 48 |
52 | 49 |
53 #include "playback.h" | 50 #include "playback.h" |
54 | 51 #include "interface.h" |
55 | |
56 /* FIXME: yuck!! this shouldn't be here... */ | |
57 void | |
58 bmp_playback_set_random_skin(void) | |
59 { | |
60 SkinNode *node; | |
61 guint32 randval; | |
62 | |
63 /* Get a random value to select the skin to use */ | |
64 randval = g_random_int_range(0, g_list_length(skinlist)); | |
65 node = g_list_nth(skinlist, randval)->data; | |
66 bmp_active_skin_load(node->path); | |
67 } | |
68 | 52 |
69 gint | 53 gint |
70 bmp_playback_get_time(void) | 54 bmp_playback_get_time(void) |
71 { | 55 { |
72 if (!bmp_playback_get_playing()) | 56 if (!bmp_playback_get_playing()) |
87 return; | 71 return; |
88 | 72 |
89 if (bmp_playback_get_playing()) | 73 if (bmp_playback_get_playing()) |
90 bmp_playback_stop(); | 74 bmp_playback_stop(); |
91 | 75 |
76 #if 0 | |
92 vis_clear_data(mainwin_vis); | 77 vis_clear_data(mainwin_vis); |
93 svis_clear_data(mainwin_svis); | 78 svis_clear_data(mainwin_svis); |
94 mainwin_disable_seekbar(); | 79 mainwin_disable_seekbar(); |
80 #endif | |
95 | 81 |
96 entry = playlist_get_entry_to_play(); | 82 entry = playlist_get_entry_to_play(); |
97 | 83 |
98 if (!entry) | 84 if (!entry) |
99 return; | 85 return; |
100 | 86 |
101 if (!bmp_playback_play_file(entry)) | 87 if (!bmp_playback_play_file(entry)) |
102 return; | 88 return; |
103 | 89 |
104 if (bmp_playback_get_time() != -1) { | 90 if (bmp_playback_get_time() != -1) { |
91 #if 0 | |
105 equalizerwin_load_auto_preset(entry->filename); | 92 equalizerwin_load_auto_preset(entry->filename); |
93 #endif | |
106 input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, | 94 input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, |
107 cfg.equalizer_bands); | 95 cfg.equalizer_bands); |
108 output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, | 96 output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, |
109 cfg.equalizer_bands); | 97 cfg.equalizer_bands); |
110 } | 98 } |
122 if (!get_current_input_plugin()) | 110 if (!get_current_input_plugin()) |
123 return; | 111 return; |
124 | 112 |
125 ip_data.paused = !ip_data.paused; | 113 ip_data.paused = !ip_data.paused; |
126 | 114 |
115 #if 0 | |
127 if (ip_data.paused) | 116 if (ip_data.paused) |
128 playstatus_set_status(mainwin_playstatus, STATUS_PAUSE); | 117 playstatus_set_status(mainwin_playstatus, STATUS_PAUSE); |
129 else | 118 else |
130 playstatus_set_status(mainwin_playstatus, STATUS_PLAY); | 119 playstatus_set_status(mainwin_playstatus, STATUS_PLAY); |
120 #endif | |
131 | 121 |
132 if (get_current_input_plugin()->pause) | 122 if (get_current_input_plugin()->pause) |
133 get_current_input_plugin()->pause(ip_data.paused); | 123 get_current_input_plugin()->pause(ip_data.paused); |
134 } | 124 } |
135 | 125 |
154 mainwin_set_info_text(); | 144 mainwin_set_info_text(); |
155 } | 145 } |
156 } | 146 } |
157 | 147 |
158 ip_data.buffering = FALSE; | 148 ip_data.buffering = FALSE; |
159 playstatus_set_status_buffering(mainwin_playstatus, FALSE); | 149 current_interface->buffering_notify(FALSE); |
160 ip_data.playing = FALSE; | 150 ip_data.playing = FALSE; |
161 } | 151 } |
162 | 152 |
163 void | 153 void |
164 bmp_playback_stop_reentrant(void) | 154 bmp_playback_stop_reentrant(void) |
189 const gchar *markup = | 179 const gchar *markup = |
190 N_("<b><big>No output plugin selected.</big></b>\n" | 180 N_("<b><big>No output plugin selected.</big></b>\n" |
191 "You have not selected an output plugin."); | 181 "You have not selected an output plugin."); |
192 | 182 |
193 GtkWidget *dialog = | 183 GtkWidget *dialog = |
194 gtk_message_dialog_new_with_markup(GTK_WINDOW(mainwin), | 184 gtk_message_dialog_new_with_markup(GTK_WINDOW(current_interface->parentwin), |
195 GTK_DIALOG_DESTROY_WITH_PARENT, | 185 GTK_DIALOG_DESTROY_WITH_PARENT, |
196 GTK_MESSAGE_ERROR, | 186 GTK_MESSAGE_ERROR, |
197 GTK_BUTTONS_OK, | 187 GTK_BUTTONS_OK, |
198 _(markup)); | 188 _(markup)); |
199 gtk_dialog_run(GTK_DIALOG(dialog)); | 189 gtk_dialog_run(GTK_DIALOG(dialog)); |