Mercurial > audlegacy
changeset 1362:651327e12a3a trunk
[svn] - use of sleep() or usleep() in multi-thread program may cause 100% CPU usage because of signal distribution.
author | yaz |
---|---|
date | Fri, 30 Jun 2006 04:18:20 -0700 |
parents | 62a33367a6cb |
children | 5171f489bace |
files | ChangeLog Plugins/General/scrobbler/xmms_scrobbler.c Plugins/Input/sexypsf/xmms.c Plugins/Output/alsa/audio.c |
diffstat | 4 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jun 29 16:46:01 2006 -0700 +++ b/ChangeLog Fri Jun 30 04:18:20 2006 -0700 @@ -1,3 +1,13 @@ +2006-06-29 23:46:01 +0000 Tony Vroon <chainsaw@gentoo.org> + revision [1634] + Forcibly disabled Altivec ifdefs. The code that it wants to call is not actually present. ffmpeg SVN (libavcodec/ppc) has code you could pinch, but that needs to be integrated in proper style. I have given up on this. If you get it working, submit me a patch. + + Changes: Modified: + +1 -11 trunk/Plugins/Input/wma/libffwma/dsputil.h + +2 -2 trunk/Plugins/Input/wma/libffwma/fft.c + +1 -1 trunk/Plugins/Input/wma/libffwma/wmadec.c + + 2006-06-29 12:58:34 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [1632] - now filepopup menu shows its state through checkbox.
--- a/Plugins/General/scrobbler/xmms_scrobbler.c Thu Jun 29 16:46:01 2006 -0700 +++ b/Plugins/General/scrobbler/xmms_scrobbler.c Fri Jun 30 04:18:20 2006 -0700 @@ -404,7 +404,7 @@ g_mutex_lock(m_scrobbler); run = going; g_mutex_unlock(m_scrobbler); - usleep(100000); + g_usleep(100000); } pdebug("scrobbler thread: exiting", DEBUG); g_thread_exit(NULL); @@ -428,7 +428,7 @@ g_mutex_lock(m_scrobbler); run = going; g_mutex_unlock(m_scrobbler); - sleep(1); + g_usleep(1000000); } pdebug("handshake thread: exiting", DEBUG); g_thread_exit(NULL);
--- a/Plugins/Input/sexypsf/xmms.c Thu Jun 29 16:46:01 2006 -0700 +++ b/Plugins/Input/sexypsf/xmms.c Fri Jun 30 04:18:20 2006 -0700 @@ -97,7 +97,7 @@ { if(t) produce_audio(sexypsf_ip.output->written_time(), FMT_S16_NE, 2, t, Buffer, NULL); - usleep((count-t)*1000*5/441/2); + g_usleep((count-t)*1000*5/441/2); } count-=t; Buffer+=t;
--- a/Plugins/Output/alsa/audio.c Thu Jun 29 16:46:01 2006 -0700 +++ b/Plugins/Output/alsa/audio.c Fri Jun 30 04:18:20 2006 -0700 @@ -154,7 +154,7 @@ while ((err = snd_pcm_resume(alsa_pcm)) == -EAGAIN) /* wait until suspend flag is released */ - sleep(1); + xmms_usleep(1000000); if (err < 0) { g_warning("alsa_handle_error(): "