Mercurial > audlegacy
diff audacious/playback.c @ 143:32c320bba8a6 trunk
[svn] Mutex system
author | nenolod |
---|---|
date | Thu, 10 Nov 2005 16:40:09 -0800 |
parents | cb178e5ad177 |
children | 0faf2fa7fc85 |
line wrap: on
line diff
--- a/audacious/playback.c Thu Nov 10 15:56:32 2005 -0800 +++ b/audacious/playback.c Thu Nov 10 16:40:09 2005 -0800 @@ -91,6 +91,10 @@ if (bmp_playback_get_playing()) bmp_playback_stop(); + ip_data.playback_mutex = g_mutex_new(); + + g_mutex_lock(ip_data.playback_mutex); + vis_clear_data(mainwin_vis); vis_clear_data(playlistwin_vis); svis_clear_data(mainwin_svis); @@ -114,6 +118,8 @@ playlist_check_pos_current(); mainwin_set_info_text(); + + g_mutex_unlock(ip_data.playback_mutex); } void @@ -138,6 +144,8 @@ void bmp_playback_stop(void) { + g_mutex_lock(ip_data.playback_mutex); + if (ip_data.playing && get_current_input_plugin()) { ip_data.playing = FALSE; @@ -158,6 +166,9 @@ } ip_data.playing = FALSE; + + g_mutex_unlock(ip_data.playback_mutex); + g_mutex_free(ip_data.playback_mutex); }