pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/hydrogen fix LOGGER_SLEEP() to not call usleep()...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f06e05c3a44
branches:  trunk
changeset: 354246:4f06e05c3a44
user:      mrg <mrg%pkgsrc.org@localhost>
date:      Tue Oct 25 01:23:55 2016 +0000

description:
fix LOGGER_SLEEP() to not call usleep() with 1000000 which is allowed
to be illegal (and is on netbsd.)  this fixes 100% cpu usage seen
while doing nothing at all.  (it still writes nul to /dev/audio while
doing nothing, but that takes little cpu :)

diffstat:

 audio/hydrogen/Makefile                              |   4 ++--
 audio/hydrogen/distinfo                              |   3 ++-
 audio/hydrogen/patches/patch-src_core_src_logger.cpp |  15 +++++++++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 3f0bfbb80dc4 -r 4f06e05c3a44 audio/hydrogen/Makefile
--- a/audio/hydrogen/Makefile   Mon Oct 24 22:35:21 2016 +0000
+++ b/audio/hydrogen/Makefile   Tue Oct 25 01:23:55 2016 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.51 2016/06/18 11:24:54 ryoon Exp $
+# $NetBSD: Makefile,v 1.52 2016/10/25 01:23:55 mrg Exp $
 
 DISTNAME=      Hydrogen-0.9.6.1
 PKGNAME=       ${DISTNAME:tl}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=hydrogen-music/}
 GITHUB_PROJECT=        Hydrogen
diff -r 3f0bfbb80dc4 -r 4f06e05c3a44 audio/hydrogen/distinfo
--- a/audio/hydrogen/distinfo   Mon Oct 24 22:35:21 2016 +0000
+++ b/audio/hydrogen/distinfo   Tue Oct 25 01:23:55 2016 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.13 2016/06/18 11:24:54 ryoon Exp $
+$NetBSD: distinfo,v 1.14 2016/10/25 01:23:55 mrg Exp $
 
 SHA1 (Hydrogen-0.9.6.1.tar.gz) = 3a288fbb06f65fd257e7f7648e07891276dbf56a
 RMD160 (Hydrogen-0.9.6.1.tar.gz) = a5b3c969c51fdbd18d0fe7eadae3199e44b192aa
 SHA512 (Hydrogen-0.9.6.1.tar.gz) = afb501fb1565a95677aa2702f5d93ee611f03f60dfc8aa5a22714bb261bfeecf2b28e0b591763ec4d1a0b60f8153ef01c3fdfae924ca252943a2396ac953717f
 Size (Hydrogen-0.9.6.1.tar.gz) = 6626629 bytes
+SHA1 (patch-src_core_src_logger.cpp) = 37434775148873248b6f559df2b6d821ad5a9405
diff -r 3f0bfbb80dc4 -r 4f06e05c3a44 audio/hydrogen/patches/patch-src_core_src_logger.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/hydrogen/patches/patch-src_core_src_logger.cpp      Tue Oct 25 01:23:55 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_core_src_logger.cpp,v 1.1 2016/10/25 01:23:55 mrg Exp $
+
+usleep(1000000) is illegal.
+
+--- src/core/src/logger.cpp.orig       2014-09-09 11:39:33.000000000 -0700
++++ src/core/src/logger.cpp    2016-10-24 14:40:32.000000000 -0700
+@@ -31,7 +31,7 @@
+ #define LOGGER_SLEEP Sleep( 100 )
+ #else
+ #include <unistd.h>
+-#define LOGGER_SLEEP usleep( 1000000 )
++#define LOGGER_SLEEP do { usleep( 500000 ); usleep( 500000 ); } while (0)
+ #endif
+ 
+ namespace H2Core {



Home | Main Index | Thread Index | Old Index