comparison src/audacious/playback.c @ 3168:ee8a1ed30826 trunk

playback_seek(): several WTFs in here (probably from XMMS) fixed
author William Pitcock <nenolod@atheme-project.org>
date Wed, 25 Jul 2007 19:10:53 -0500
parents 8775dfc57ead
children 603577228518
comparison
equal deleted inserted replaced
3167:49c25e9ecf6d 3168:ee8a1ed30826
304 } 304 }
305 305
306 void 306 void
307 playback_seek(gint time) 307 playback_seek(gint time)
308 { 308 {
309 InputPlayback *playback = get_current_input_playback();
309 gboolean restore_pause = FALSE; 310 gboolean restore_pause = FALSE;
310 gint l=0, r=0; 311 gint l=0, r=0;
311 312
312 g_return_if_fail(ip_data.playing); 313 g_return_if_fail(ip_data.playing);
313 g_return_if_fail(get_current_input_playback()); 314 g_return_if_fail(playback != NULL);
314 315
315 /* FIXME WORKAROUND...that should work with all plugins 316 /* FIXME WORKAROUND...that should work with all plugins
316 * mute the volume, start playback again, do the seek, then pause again 317 * mute the volume, start playback again, do the seek, then pause again
317 * -Patrick Sudowe 318 * -Patrick Sudowe
318 */ 319 */
322 output_get_volume(&l, &r); 323 output_get_volume(&l, &r);
323 output_set_volume(0,0); 324 output_set_volume(0,0);
324 playback_pause(); 325 playback_pause();
325 } 326 }
326 327
328 playback->plugin->seek(playback, time);
327 free_vis_data(); 329 free_vis_data();
328 get_current_input_playback()->plugin->seek(get_current_input_playback(), time);
329 330
330 if (restore_pause) 331 if (restore_pause)
331 { 332 {
332 playback_pause(); 333 playback_pause();
333 output_set_volume(l, r); 334 output_set_volume(l, r);