Mercurial > audlegacy
comparison audacious/playback.c @ 144:0faf2fa7fc85 trunk
[svn] More thread safety, less XMMS braindamage.
author | nenolod |
---|---|
date | Thu, 10 Nov 2005 16:48:36 -0800 |
parents | 32c320bba8a6 |
children | 274c85015c90 |
comparison
equal
deleted
inserted
replaced
143:32c320bba8a6 | 144:0faf2fa7fc85 |
---|---|
123 } | 123 } |
124 | 124 |
125 void | 125 void |
126 bmp_playback_pause(void) | 126 bmp_playback_pause(void) |
127 { | 127 { |
128 g_mutex_lock(ip_data.playback_mutex); | |
129 | |
128 if (!bmp_playback_get_playing()) | 130 if (!bmp_playback_get_playing()) |
129 return; | 131 return; |
130 | 132 |
131 if (!get_current_input_plugin()) | 133 if (!get_current_input_plugin()) |
132 return; | 134 return; |
137 playstatus_set_status(mainwin_playstatus, STATUS_PAUSE); | 139 playstatus_set_status(mainwin_playstatus, STATUS_PAUSE); |
138 else | 140 else |
139 playstatus_set_status(mainwin_playstatus, STATUS_PLAY); | 141 playstatus_set_status(mainwin_playstatus, STATUS_PLAY); |
140 | 142 |
141 get_current_input_plugin()->pause(ip_data.paused); | 143 get_current_input_plugin()->pause(ip_data.paused); |
144 | |
145 g_mutex_unlock(ip_data.playback_mutex); | |
142 } | 146 } |
143 | 147 |
144 void | 148 void |
145 bmp_playback_stop(void) | 149 bmp_playback_stop(void) |
146 { | 150 { |
169 | 173 |
170 g_mutex_unlock(ip_data.playback_mutex); | 174 g_mutex_unlock(ip_data.playback_mutex); |
171 g_mutex_free(ip_data.playback_mutex); | 175 g_mutex_free(ip_data.playback_mutex); |
172 } | 176 } |
173 | 177 |
178 void | |
179 bmp_playback_stop_reentrant(void) | |
180 { | |
181 g_mutex_lock(ip_data.playback_mutex); | |
182 | |
183 if (ip_data.playing && get_current_input_plugin()) { | |
184 ip_data.playing = FALSE; | |
185 | |
186 if (bmp_playback_get_paused()) | |
187 bmp_playback_pause(); | |
188 | |
189 free_vis_data(); | |
190 ip_data.paused = FALSE; | |
191 | |
192 if (input_info_text) { | |
193 g_free(input_info_text); | |
194 input_info_text = NULL; | |
195 mainwin_set_info_text(); | |
196 } | |
197 } | |
198 | |
199 ip_data.playing = FALSE; | |
200 | |
201 g_mutex_unlock(ip_data.playback_mutex); | |
202 g_mutex_free(ip_data.playback_mutex); | |
203 } | |
174 | 204 |
175 static void | 205 static void |
176 run_no_output_plugin_dialog(void) | 206 run_no_output_plugin_dialog(void) |
177 { | 207 { |
178 const gchar *markup = | 208 const gchar *markup = |