audio/rakarrack: Fix distortion on x86_64.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2014-01-15 12:42:49 +07:00 committed by Erik Hanson
parent 111738dc2a
commit a694bc59e7
6 changed files with 44 additions and 11 deletions

View file

@ -0,0 +1,12 @@
diff -Naur rakarrack-0.6.1/src/Waveshaper.C rakarrack-0.6.1.patched/src/Waveshaper.C
--- rakarrack-0.6.1/src/Waveshaper.C 2010-08-22 09:41:40.000000000 -0400
+++ rakarrack-0.6.1.patched/src/Waveshaper.C 2014-01-14 23:27:09.000000000 -0500
@@ -49,7 +49,7 @@
period_coeff = 8;
ncSAMPLE_RATE=cSAMPLE_RATE/8.0f;
break;
- case 4:
+ default:
period_coeff = 12;
ncSAMPLE_RATE=cSAMPLE_RATE/12.0f;
break;

View file

@ -1,4 +1,10 @@
rakarrack (realtime audio effects processor)
rakarrack (realtime audio effects processor for JACK)
Rakarrack is a virtual digitial effects rack, including such effects as
Rakarrack is a virtual digital effects rack, including such effects as
distortion, echo, reverb, phaser, flanger, chorus, compressor, etc.
This package uses POSIX filesystem capabilities to execute with
elevated privileges (required for realtime audio processing). This
may be considered a security/stability risk. Please read
http://www.slackbuilds.org/caps/ for more information. To disable
capabilities, pass SETCAP=no to the script.

View file

@ -6,9 +6,11 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20140114 bkw: add 64-bit distortion fix and setcap stuff.
PRGNAM=rakarrack
VERSION=${VERSION:-0.6.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -48,10 +50,15 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# work around a bug that causes distorion/overdrive not to work on 64-bit.
# this is a band-aid, not a real solution, but it seems to work OK.
# http://sourceforge.net/p/rakarrack/discussion/778862/thread/e9559a34/
patch -p1 < $CWD/64bit_distortion.diff
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@ -70,8 +77,7 @@ gzip $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING ChangeLog NEWS README TODO \
cp -a AUTHORS COPYING ChangeLog NEWS README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@ -79,5 +85,13 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Only add capability stuff if not disabled:
if [ "${SETCAP:-yes}" = "yes" ]; then
cat $CWD/setcap.sh >> $PKG/install/doinst.sh
# Only allow execution by audio group
chown root:audio $PKG/usr/bin/$PRGNAM
chmod 0750 $PKG/usr/bin/$PRGNAM
fi
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -5,6 +5,6 @@ DOWNLOAD="http://downloads.sourceforge.net/project/rakarrack/rakarrack/rakarrack
MD5SUM="56b1e04779ae3d56cc8a3ad3c4e25152"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="fltk qjackctl set_rlimits"
REQUIRES="fltk jack-audio-connection-kit"
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

View file

@ -0,0 +1 @@
[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/rakarrack

View file

@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
rakarrack: rakarrack (realtime audio effects processor)
rakarrack: rakarrack (realtime audio effects processor for JACK)
rakarrack:
rakarrack: Rakarrack is a virtual digitial effects rack, including such effects
rakarrack: as distortion, echo, reverb, phaser, flanger, chorus, compressor, etc.