Mercurial > audlegacy
changeset 3082:91df04ec5ef7
From: Daniel Drake <dsd@gentoo.org>
We don't need to check playback status 100 times per second. Just start
and stop the visualization when those operations actually happen.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Mon, 16 Jul 2007 13:31:51 -0500 |
parents | 0ac3c3bc5d4a |
children | 7d33bbe11736 |
files | src/audacious/playback.c src/audacious/ui_main.c |
diffstat | 2 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/playback.c Fri Jul 13 09:36:51 2007 -0500 +++ b/src/audacious/playback.c Mon Jul 16 13:31:51 2007 -0500 @@ -49,6 +49,7 @@ #include "ui_playlist.h" #include "ui_skinselector.h" #include "util.h" +#include "visualization.h" #include "playback.h" @@ -120,6 +121,8 @@ gtk_widget_show(mainwin_position); } + vis_playback_start(); + hook_call("playback begin", entry); } @@ -186,6 +189,8 @@ if (song_info_timeout_source) g_source_remove(song_info_timeout_source); + vis_playback_stop(); + g_return_if_fail(mainwin_playstatus != NULL); playstatus_set_status_buffering(mainwin_playstatus, FALSE); }
--- a/src/audacious/ui_main.c Fri Jul 13 09:36:51 2007 -0500 +++ b/src/audacious/ui_main.c Mon Jul 16 13:31:51 2007 -0500 @@ -1639,6 +1639,7 @@ ip_data.stop = TRUE; mainwin_clear_song_info(); playback_stop(); + ab_position_a = ab_position_b = -1; ip_data.stop = FALSE; } @@ -3096,13 +3097,6 @@ GDK_THREADS_ENTER(); - if (playback_get_playing()) - vis_playback_start(); - else { - vis_playback_stop(); - ab_position_a = ab_position_b = -1; - } - draw_main_window(mainwin_force_redraw); if (!count) {