commit 0e7a03bc897a984d7f970a8c696bfed3e3da6525
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
audio-drivers/ngjackspa: install manpage
commit 1471adb08839db86109306620a54d34f615b070e
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
audio-players/cantata: version 1.3.3
commit 312cff3d9300f904393b52f9530192445ac082db
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
audio-players/mpd: version 0.18.9
commit 83cba9559eaabaca0aa198024419bb1b3a556099
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
audio-creation/ardour3: version 3.5.357
commit d77931c55c0f75a8613db3c0e105ef4da57c421c
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
audio-libs/aubio: version 0.4.1
commit f721f7b64ee8f965da585f6a7e52045f576a8266
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
remove options from waf that aren't common to all users of waf
commit a40990b4dc040523e73d38b3d1313d2ae6841d27
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
libs/raptor: version 2.0.13
commit 425b6dce61da768ebdb3b479d796999ec7d460a5
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
audio-libs/liblo: version 0.28
diff --git a/ChangeLog b/ChangeLog
index 60598a0..a2c1e15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-04-09 Vlad Glagolev <stealth AT sourcemage.org>
+ * python-pypi/pip: new spell, Python easy_install replacement
+
+2014-04-07 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * libs/libtcod: new spell, a library for developing roguelike games
+
+2014-04-05 Treeve Jelbert <treeve AT sourcemage.org>
+ * gnu.gpg: add D7E69871 "Daiki Ueno <ueno AT unixuser.org>
+
+2014-04-01 Vlad Glagolev <stealth AT sourcemage.org>
+ * utils/gstpw: new spell, simple GTK+2 stopwatch program
+
2014-03-25 Ismael Luceno <ismael AT sourcemage.org>
* editors/vimoutliner: new spell, Outline processor designed for
lightning fast authoring
@@ -13,6 +25,7 @@
* audio-plugins/calf-plugins: new spell, professional-grade audio
plugins
for jack
* audio-libs/stk: new spell, the synthesis toolkit in C++
+ * FUNCTIONS: bring waf_build into line with default_build
2014-03-22 Treeve Jelbert <treeve AT sourcemage.org>
* python-pypi/rbtools: new spell, tools for ReviewBoard
diff --git a/FUNCTIONS b/FUNCTIONS
index f8db363..970d697 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -522,11 +522,10 @@ function note_config_files() {
# and waf is fast without it as well
-optional_depends lash \
- "--enable-lash" \
- "--disable-lash" \
- "for LASH support (it will force alsa and jack depends)"
+optional_depends LIBAVCODEC \
+ "--enable-avcodec" \
+ "--disable-avcodec" \
+ "use avcodec"
diff --git a/audio-libs/aubio/DETAILS b/audio-libs/aubio/DETAILS
index da796e6..b265258 100755
--- a/audio-libs/aubio/DETAILS
+++ b/audio-libs/aubio/DETAILS
@@ -1,8 +1,8 @@
SPELL=aubio
- VERSION=0.3.2
- SOURCE=$SPELL-$VERSION.tar.gz
+ VERSION=0.4.1
+ SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_URL[0]=http://aubio.org/pub/$SOURCE
-
SOURCE_HASH=sha512:b3d8445716c0cde02ee1e7b036864598ec7562d8a938a61f644c384d80e95601abcb6e713cdaab7b2613f6f4f27db1cfafa7c23824c61f504e83d11fefdee8fc
+
SOURCE_HASH=sha512:f36800f1a0cbe72509e05d15d79759ed25975e92701804597ed4c9d93e27d5e7b908e0aa65819ce763882945123ea174a0825c7aacf9f9494f56d72de5b8308c
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
WEB_SITE=http://aubio.org/
LICENSE[0]=GPL
diff --git a/audio-libs/aubio/HISTORY b/audio-libs/aubio/HISTORY
index 6024564..a23df2c 100644
--- a/audio-libs/aubio/HISTORY
+++ b/audio-libs/aubio/HISTORY
@@ -1,2 +1,8 @@
+2014-03-24 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS, DEPENDS: version 0.4.1
+ * BUILD, INSTALL: use waf
+ * 0001-disable-tests.patch, PRE_BUILD: don't build tests as they
+ fail to link
+
2008-07-10 Vlad Glagolev <stealth AT sourcemage.org>
* DEPENDS, DETAILS: spell created
diff --git a/audio-libs/aubio/INSTALL b/audio-libs/aubio/INSTALL
new file mode 100755
index 0000000..0ea15cc
--- /dev/null
+++ b/audio-libs/aubio/INSTALL
@@ -0,0 +1 @@
+waf_install
diff --git a/audio-libs/aubio/PRE_BUILD b/audio-libs/aubio/PRE_BUILD
new file mode 100755
index 0000000..ab8f858
--- /dev/null
+++ b/audio-libs/aubio/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+patch -p1 < $SPELL_DIRECTORY/0001-disable-tests.patch
diff --git a/audio-libs/liblo/DETAILS b/audio-libs/liblo/DETAILS
index 7e25fb2..8b4604e 100755
--- a/audio-libs/liblo/DETAILS
+++ b/audio-libs/liblo/DETAILS
@@ -1,8 +1,8 @@
SPELL=liblo
- VERSION=0.27
+ VERSION=0.28
SOURCE=$SPELL-$VERSION.tar.gz
- SOURCE_URL[0]=$SOURCEFORGE_URL/$SPELL/$SOURCE
-
SOURCE_HASH=sha512:079f12d349d7fb58d4f7393d2ad72ca6844570524992c56ce87b23531620c2387ac6ba5316f92684b3fae72c7a5abe03e49fcbd97196efdb35d11a2422b065bc
+ SOURCE_URL[0]=$SOURCEFORGE_URL/${SPELL}/${SPELL}/${VERSION}/${SOURCE}
+
SOURCE_HASH=sha512:05818218d2d6a7042714b8fa905e7242fb9707795ad53ea27b2a1af3661f0822d25585ce17d286aa269c534ef24e19e377e041bf7fe194c8e47c0046fefcb85f
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
WEB_SITE=http://liblo.sourceforge.net/
ENTERED=20070723
diff --git a/audio-libs/liblo/HISTORY b/audio-libs/liblo/HISTORY
index 02e7108..06b3d34 100644
--- a/audio-libs/liblo/HISTORY
+++ b/audio-libs/liblo/HISTORY
@@ -1,3 +1,6 @@
+2014-03-24 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 0.28
+
2014-01-30 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: updated spell to 0.27
diff --git a/audio-libs/taglib/DETAILS b/audio-libs/taglib/DETAILS
index 0ef1a2d..ddbbe53 100755
--- a/audio-libs/taglib/DETAILS
+++ b/audio-libs/taglib/DETAILS
@@ -1,9 +1,9 @@
SPELL=taglib
- VERSION=1.8
-
SOURCE_HASH=sha512:04c3b12bd11d11000ebf6721bfebd47e2995b9b11ad28c1560a83370b9d871eb37155a006637b36b4c3daa68cd690f09c1ab4faf4d3214e6f3f5388b5581fc94
+ VERSION=1.9.1
+
SOURCE_HASH=sha512:63a4f06b88b33be716dde3111e62a624995bc020127c9d22f63e918a535ebba858c59308ca4295eeedb29dc72b87d6673db5483f20d9dbf3f56cd93c7ba7ed58
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
- SOURCE_URL[0]=https://github.com/downloads/taglib/taglib/$SOURCE
+ SOURCE_URL[0]=http://taglib.github.io/releases/$SOURCE
WEB_SITE=http://developer.kde.org/~wheeler/taglib
ENTERED=20040120
LICENSE[0]=GPL
diff --git a/audio-libs/taglib/HISTORY b/audio-libs/taglib/HISTORY
index e726c9b..ced8284 100644
--- a/audio-libs/taglib/HISTORY
+++ b/audio-libs/taglib/HISTORY
@@ -1,3 +1,7 @@
+2014-04-07 Treeve Jelbert <treeve AT sourcemage.org>
+ * DETAILS: version 1.9.1
+ new URL
+
2012-10-04 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 1.8
new URL
diff --git a/audio-players/cantata/DETAILS b/audio-players/cantata/DETAILS
index c90c5d1..fc7b261 100755
--- a/audio-players/cantata/DETAILS
+++ b/audio-players/cantata/DETAILS
@@ -1,8 +1,8 @@
SPELL=cantata
- VERSION=1.3.0.1
+ VERSION=1.3.3
SOURCE="${SPELL}-${VERSION}.tar.bz2"
-
SOURCE_URL[0]="https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60czZxNXJtdWllc0E"
-
SOURCE_HASH=sha512:9a48ef75f7ac23656c27d2a05e0db8b01dfdddf575cf00ba7fa0b1a54027ca010f0c081184db1f03bc27fda64fa2ae5a5259f770c333a2b40a8a2c92eafa9964
+
SOURCE_URL[0]="https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60ZUN1NThacGFrdFE"
+
SOURCE_HASH=sha512:1f50abf9e92316ba3cd8da0a542a6fbdabfa58bb8dd7349058ffeffa5f95a4db31e4810e580497fea5c08f31f8e891c1c7b600f66f81f400527d40c58f14148a
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE="https://code.google.com/p/cantata/"
LICENSE[0]=GPL
diff --git a/audio-players/cantata/HISTORY b/audio-players/cantata/HISTORY
index 8fdbfc1..2b4d57e 100644
--- a/audio-players/cantata/HISTORY
+++ b/audio-players/cantata/HISTORY
@@ -1,3 +1,6 @@
+2014-03-26 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 1.3.3
+
2014-02-28 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 1.3.0.1
* DEPENDS: add dependency on qjson, optional deps on cdparanoia,
diff --git a/audio-players/deadbeef/DETAILS b/audio-players/deadbeef/DETAILS
index 1f214c7..fbf810b 100755
--- a/audio-players/deadbeef/DETAILS
+++ b/audio-players/deadbeef/DETAILS
@@ -1,29 +1,46 @@
SPELL=deadbeef
- VERSION=0.6.0
+ VERSION=0.6.1
SOURCE=${SPELL}-${VERSION}.tar.bz2
SOURCE_URL[0]=${SOURCEFORGE_URL}/${SPELL}/${SOURCE}
-
SOURCE_HASH=sha512:3f6add4998dd0fc67c94c289905700144153ae2dc8c7e6cfa1bbfab7844c7dfe3985d5ff87909d9d0b1abe4926b5498055389ab74e83cc7db63f254081d7e666
+
SOURCE_HASH=sha512:0812f2d6b2ebc2ef1e65af9912546fa769e0e6d090f15cf3f2c4170bfa5aab03545cd63f26dcdcde905416801c0b56bd190cd1792f29eabaa318db212db99f90
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE="http://deadbeef.sourceforge.net/"
LICENSE[0]="GPLv2"
ENTERED=20100308
KEYWORDS=""
- SHORT="DeaDBeeF (as in 0xDEADBEEF) is an audio player for
GNU/Linux systems with X11 and console support."
+ SHORT="ultimate music player for GNU/Linux"
cat << EOF
Main features:
-
- * mp3, ogg vorbis, flac, ape, wv, wav, m4a, mpc, cd audio (and many
- more) * sid, nsf and lots of other popular chiptune formats * ID3v1,
- ID3v2.2, ID3v2.3, ID3v2.4, APEv2, xing/info tags support * character
- set detection for non-unicode id3 tags - supports cp1251 and iso8859-1 *
- unicode tags are fully supported as well (both utf8 and ucs2) * cuesheet
- (.cue files) support, with charset detection (utf8/cp1251/iso8859-1) *
- tracker modules like mod, s3m, it, xm, etc * HVSC song length database
- support for sid * gtk2 interface with efficient custom widgets * no GNOME
- or KDE dependencies * minimize to tray, with scrollwheel volume control *
- drag and drop, both inside of playlist, and from filemanagers and such
- * control playback from command line * global hotkeys * plugin support;
- bundled with lots of plugins, such as global hotkeys and last.fm
scrobbler;
- sdk is included * duration calculation is as precise as possible for
- vbr mp3 files (with and without xing/info tags)
+- mp3, ogg vorbis, flac, ape, wv/iso.wv, wav, m4a/mp3 (aac and alac), mpc,
tta,
+ cd audio, and many more
+- nsf, ay, vtx, vgm/vgz, spc and many other popular chiptune formats
+- SID with HVSC song length database support for sid
+- tracker modules - mod, s3m, it, xm, etc
+- ID3v1, ID3v2.2, ID3v2.3, ID3v2.4, APEv2, Xing/Info, VorbisComments tag
reading
+ and writing, as well as reading many other tag/metadata formats in most
+ supported formats
+- automatic character set detection for non-unicode id3 tags - supports
cp1251,
+ iso8859-1, and now chinese cp936 (optional), as well as SHIFT-JIS and
MS-DOS
+ CP866 for selected formats
+- unicode tags are fully supported as well (both utf8 and ucs2)
+- cuesheet (.cue files) support, including charset detection/conversion
+- clean fast GUI using GTK2 and GTK3, you pick what you like more!
+- no GNOME or KDE dependencies
+- minimization to system tray, with scrollwheel volume control, etc
+- drag and drop, both in playlist, and from other apps
+- control playback from command line
+- global hotkeys
+- multiple playlists using tabbed interface
+- album cover display
+- OSD notifications about current playing songs
+- 18-band graphical equalizer and other DSP plugins
+- built-in high quality tag editor, with custom fields support
+- customizable groups in playlists
+- customizable columns with flexible title formatting
+- streaming radio support for ogg vorbis, mp3 and aac streams
+- gapless playback for correctly encoded files
+- lots of plugin, such as global hotkeys, last.fm scrobbler, converter, and
many
+ more, sdk is included
+- comes with advanced Converter plugin, which allows to transcode files to
other
+ formats
EOF
diff --git a/audio-players/deadbeef/HISTORY b/audio-players/deadbeef/HISTORY
index f87c724..bf8eaac 100644
--- a/audio-players/deadbeef/HISTORY
+++ b/audio-players/deadbeef/HISTORY
@@ -1,3 +1,6 @@
+2014-04-05 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: updated spell to 0.6.1; updated descriptions
+
2013-12-10 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: updated spell to 0.6.0
* CONFIGURE: added missing config options
diff --git a/audio-players/mpd/DETAILS b/audio-players/mpd/DETAILS
index 9902b76..03acd06 100755
--- a/audio-players/mpd/DETAILS
+++ b/audio-players/mpd/DETAILS
@@ -1,10 +1,10 @@
SPELL=mpd
- VERSION=0.18.8
+ VERSION=0.18.9
BRANCH=`echo $VERSION | cut -d . -f 1,2`
SOURCE=$SPELL-$VERSION.tar.xz
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
SOURCE_URL[0]=http://www.musicpd.org/download/$SPELL/$BRANCH/$SOURCE
-
SOURCE_HASH=sha512:a6f540813b3f91c74645d3903a0b36edd1546880bfa7d1c06f2cb61b37e9c1e343b03ff06a685c4ded796a7f486b19e89849ca43f2b978c839b72eb0be184f34
+
SOURCE_HASH=sha512:12e45e14108cce0a3a993b6d17dfc05ed7d14ea99cce85f202904b9bf1624bfecadbd4d465e3c9057822691a1a245e67524229b160fceb2f72d27d6a8bd56479
LICENSE[0]=GPL
KEYWORDS="music players audio"
WEB_SITE=http://www.musicpd.org/
diff --git a/audio-players/mpd/HISTORY b/audio-players/mpd/HISTORY
index 81914b6..da518dc 100644
--- a/audio-players/mpd/HISTORY
+++ b/audio-players/mpd/HISTORY
@@ -1,3 +1,6 @@
+2014-03-26 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 0.18.9
+
2014-02-28 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 0.18.8
diff --git a/audio-plugins/rt-plugins/0003-switch-build-system-to-cmake.patch
b/audio-plugins/rt-plugins/0003-switch-build-system-to-cmake.patch
new file mode 100644
index 0000000..bd159c9
--- /dev/null
+++ b/audio-plugins/rt-plugins/0003-switch-build-system-to-cmake.patch
@@ -0,0 +1,6136 @@
+From 3acb2bea8282214f002af2c45699eeee1cdc8db5 Mon Sep 17 00:00:00 2001
+From: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+Date: Sun, 6 Apr 2014 14:31:38 +0000
+Subject: [PATCH] switch build system to cmake
+
+- reorganize directory layout. source files go to src,
+headers to include
+- remove unnecessary macros from all .c files
+- use the <> form of #include for the ladspa header
+- remove redundant definition of f_round from ladspa-util.h
+- remove redundant config.h header file; this seems to have been
+an auto-generated header at some point copied from some other
+project. It isn't used anywhere in this project.
+- adapt the README to the new build system
+- add cppcheck target
+---
+ CMakeLists.txt | 21 +++
+ Makefile | 47 ------
+ README | 7 +-
+ RTallpass1.c | 236 ------------------------------
+ RTallpass2.c | 255 ---------------------------------
+ RThighpass.c | 251 --------------------------------
+ RThighshelf.c | 269 -----------------------------------
+ RTlowpass.c | 251 --------------------------------
+ RTlowshelf.c | 269 -----------------------------------
+ RTlr4hipass.c | 239 -------------------------------
+ RTlr4lowpass.c | 239 -------------------------------
+ RTparaeq.c | 269 -----------------------------------
+ build/.keep | 0
+ cmake/compilerwarnings.cmake | 37 +++++
+ cmake/cppcheck.cmake | 12 ++
+ include/biquad.h | 331
+++++++++++++++++++++++++++++++++++++++++++
+ include/ladspa-util.h | 211 +++++++++++++++++++++++++++
+ src/CMakeLists.txt | 26 ++++
+ src/RTallpass1.c | 231 ++++++++++++++++++++++++++++++
+ src/RTallpass2.c | 250 ++++++++++++++++++++++++++++++++
+ src/RThighpass.c | 246 ++++++++++++++++++++++++++++++++
+ src/RThighshelf.c | 264 ++++++++++++++++++++++++++++++++++
+ src/RTlowpass.c | 246 ++++++++++++++++++++++++++++++++
+ src/RTlowshelf.c | 264 ++++++++++++++++++++++++++++++++++
+ src/RTlr4hipass.c | 234 ++++++++++++++++++++++++++++++
+ src/RTlr4lowpass.c | 234 ++++++++++++++++++++++++++++++
+ src/RTparaeq.c | 264 ++++++++++++++++++++++++++++++++++
+ util/biquad.h | 331
-------------------------------------------
+ util/config.h | 99 -------------
+ util/ladspa-util.h | 230 ------------------------------
+ 30 files changed, 2877 insertions(+), 2986 deletions(-)
+ create mode 100644 CMakeLists.txt
+ delete mode 100644 Makefile
+ delete mode 100644 RTallpass1.c
+ delete mode 100644 RTallpass2.c
+ delete mode 100644 RThighpass.c
+ delete mode 100644 RThighshelf.c
+ delete mode 100644 RTlowpass.c
+ delete mode 100644 RTlowshelf.c
+ delete mode 100644 RTlr4hipass.c
+ delete mode 100644 RTlr4lowpass.c
+ delete mode 100644 RTparaeq.c
+ create mode 100644 build/.keep
+ create mode 100644 cmake/compilerwarnings.cmake
+ create mode 100644 cmake/cppcheck.cmake
+ create mode 100644 include/biquad.h
+ create mode 100644 include/ladspa-util.h
+ create mode 100644 src/CMakeLists.txt
+ create mode 100644 src/RTallpass1.c
+ create mode 100644 src/RTallpass2.c
+ create mode 100644 src/RThighpass.c
+ create mode 100644 src/RThighshelf.c
+ create mode 100644 src/RTlowpass.c
+ create mode 100644 src/RTlowshelf.c
+ create mode 100644 src/RTlr4hipass.c
+ create mode 100644 src/RTlr4lowpass.c
+ create mode 100644 src/RTparaeq.c
+ delete mode 100644 util/biquad.h
+ delete mode 100644 util/config.h
+ delete mode 100644 util/ladspa-util.h
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..566ef09
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,21 @@
++cmake_minimum_required(VERSION 2.8)
++Project(rt-plugins)
++
++set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
++
++include(compilerwarnings)
++include(cppcheck)
++
++set(COMMONFLAGS "-pipe")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMONFLAGS}")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
++
++add_definitions("-D_BSD_SOURCE -D_XOPEN_SOURCE=600")
++
++set(CMAKE_SHARED_MODULE_PREFIX "")
++
++add_subdirectory(src)
++
++file(GLOB HEADERS "${PROJECT_SOURCE_DIR}/include/*.h")
+diff --git a/Makefile b/Makefile
+deleted file mode 100644
+index 4394311..0000000
+--- a/Makefile
++++ /dev/null
+@@ -1,47 +0,0 @@
+-INSTALL_PLUGINS_DIR ?= /usr/local/lib/ladspa/
+-
+-# rt 31.5.2013: got rid of sse2 stuff so we can build for ARM
+-CPPFLAGS += -D_BSD_SOURCE -DPIC -D_XOPEN_SOURCE=600 -I.
+-
+-CFLAGS += -Ofast -fomit-frame-pointer -fstrength-reduce -funroll-loops
-fPIC -std=c11
+-
+-CFLAGS += -Wall -Wextra -Werror -pedantic
+-CFLAGS += -Wcast-align -Wfloat-equal -Wformat-nonliteral -Wformat-security
+-CFLAGS += -Winit-self -Wmissing-include-dirs
+-CFLAGS += -Wno-suggest-attribute=noreturn -Wno-write-strings
-Wpointer-arith -Wundef -Wpacked
+-CFLAGS += -Wredundant-decls
+-CFLAGS += -Wunreachable-code -Wno-unused-parameter -Wconversion -Wshadow
+-CFLAGS += -Wstrict-prototypes -Wbad-function-cast -Wold-style-definition
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
+-
+-LDFLAGS += -shared
+-
+-PLUGINS = RTallpass1.so \
+- RTallpass2.so \
+- RTlowpass.so \
+- RThighpass.so \
+- RThighshelf.so \
+- RTlowshelf.so \
+- RTlr4hipass.so \
+- RTlr4lowpass.so \
+- RTparaeq.so \
+-
+-all: $(PLUGINS)
+-
+-%.o: %.c
+- @echo -e "(CC) $@"
+- @$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+-
+-%.so: %.o
+- @echo -e "(LD) $@"
+- @$(LD) $(LDFLAGS) -o $@ $<
+-
+-install: all
+- mkdir -p $(INSTALL_PLUGINS_DIR)
+- install -m644 $(PLUGINS) $(INSTALL_PLUGINS_DIR)
+-
+-clean:
+- -rm -f `find . -name "*.so"`
+- -rm -f `find . -name "*.o"`
+- -rm -f `find . -name "*~"`
+-
+-.PHONY: install all clean
+diff --git a/README b/README
+index 98c6892..24ce89a 100644
+--- a/README
++++ b/README
+@@ -2,11 +2,14 @@ Compiling
+ ~~~~~~~~~
+
+ Install with
++ cd build
++ cmake ..
+ make
+ sudo make install
+
+ By default this installs plugins in /usr/local/lib/ladspa. If
+-you want them to go somewhere else, edit the Makefile.
++you want them to go somewhere else, configure cmake accordingly
++by running 'ccmake .'
+
+ You should set the environment variable LADSPA_PATH to contain the
+ path to the plugins, so they can be found. Something like this:
+@@ -26,6 +29,8 @@ I know, these instruction sets are only implemented on
Intel and Athlon
+ processors. Compiling for other architectures will probably require some
+ changes to the source code.
+
++You can set USE_SSE2 to off using ccmake if you do not want to use SSE2.
++
+
+ Bug reports
+ ~~~~~~~~~~~
+diff --git a/RTallpass1.c b/RTallpass1.c
+deleted file mode 100644
+index 4ea528b..0000000
+--- a/RTallpass1.c
++++ /dev/null
+@@ -1,236 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define ALLPASS1_FC 0
+-#define ALLPASS1_INPUT 1
+-#define ALLPASS1_OUTPUT 2
+-
+-static LADSPA_Descriptor *allPassDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *fc;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- bilin * filter;
+- float fs;
+-} AllPass;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return allPassDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateAllPass(LADSPA_Handle instance) {
+- AllPass *plugin_data = (AllPass *)instance;
+- bilin *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- bilin_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupAllPass(LADSPA_Handle instance) {
+- AllPass *plugin_data = (AllPass *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortAllPass(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- AllPass *plugin;
+-
+- plugin = (AllPass *)instance;
+- switch (port) {
+- case ALLPASS1_FC:
+- plugin->fc = data;
+- break;
+- case ALLPASS1_INPUT:
+- plugin->input = data;
+- break;
+- case ALLPASS1_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateAllPass(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- AllPass *plugin_data = (AllPass *)malloc(sizeof(AllPass));
+- bilin *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(bilin));
+- bilin_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runAllPass(LADSPA_Handle instance, unsigned long sample_count) {
+- AllPass *plugin_data = (AllPass *)instance;
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+-
+- bilin * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- ap1_set_params(filter, fc, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- // RT 2.9.2013: replace biquad_run with ap1_run to cut
floating-
+- // point multiplications from 3 to 1:
+- buffer_write(output[pos], (LADSPA_Data) ap1_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- allPassDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (allPassDescriptor) {
+- allPassDescriptor->UniqueID = 9010;
+- allPassDescriptor->Label = "RTallpass1";
+- allPassDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- allPassDescriptor->Name =
+- D_("RT First Order Allpass");
+- allPassDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- allPassDescriptor->Copyright =
+- "GPL";
+- allPassDescriptor->PortCount = 3;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
+- sizeof(LADSPA_PortDescriptor));
+- allPassDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
+- sizeof(LADSPA_PortRangeHint));
+- allPassDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(3, sizeof(char*));
+- allPassDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[ALLPASS1_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[ALLPASS1_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[ALLPASS1_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[ALLPASS1_FC].LowerBound = 0.0;
+- port_range_hints[ALLPASS1_FC].UpperBound = (LADSPA_Data) 0.4;
+-
+- /* Parameters for Input */
+- port_descriptors[ALLPASS1_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[ALLPASS1_INPUT] =
+- D_("Input");
+- port_range_hints[ALLPASS1_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[ALLPASS1_INPUT].LowerBound = -1.0;
+- port_range_hints[ALLPASS1_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[ALLPASS1_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[ALLPASS1_OUTPUT] =
+- D_("Output");
+- port_range_hints[ALLPASS1_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[ALLPASS1_OUTPUT].LowerBound = -1.0;
+- port_range_hints[ALLPASS1_OUTPUT].UpperBound = +1.0;
+-
+- allPassDescriptor->activate = activateAllPass;
+- allPassDescriptor->cleanup = cleanupAllPass;
+- allPassDescriptor->connect_port = connectPortAllPass;
+- allPassDescriptor->deactivate = NULL;
+- allPassDescriptor->instantiate = instantiateAllPass;
+- allPassDescriptor->run = runAllPass;
+- allPassDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (allPassDescriptor) {
+- free((LADSPA_PortDescriptor
*)allPassDescriptor->PortDescriptors);
+- free((char **)allPassDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)allPassDescriptor->PortRangeHints);
+- free(allPassDescriptor);
+- }
+-
+-}
+-
+diff --git a/RTallpass2.c b/RTallpass2.c
+deleted file mode 100644
+index a0bac58..0000000
+--- a/RTallpass2.c
++++ /dev/null
+@@ -1,255 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define ALLPASS_FC 0
+-#define ALLPASS_Q 1
+-#define ALLPASS_INPUT 2
+-#define ALLPASS_OUTPUT 3
+-
+-static LADSPA_Descriptor *allPassDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *gain;
+- LADSPA_Data *fc;
+- LADSPA_Data *Q;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filter;
+- float fs;
+-} AllPass;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return allPassDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateAllPass(LADSPA_Handle instance) {
+- AllPass *plugin_data = (AllPass *)instance;
+- biquad *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- biquad_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupAllPass(LADSPA_Handle instance) {
+- AllPass *plugin_data = (AllPass *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortAllPass(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- AllPass *plugin;
+-
+- plugin = (AllPass *)instance;
+- switch (port) {
+- case ALLPASS_FC:
+- plugin->fc = data;
+- break;
+- case ALLPASS_Q:
+- plugin->Q = data;
+- break;
+- case ALLPASS_INPUT:
+- plugin->input = data;
+- break;
+- case ALLPASS_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateAllPass(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- AllPass *plugin_data = (AllPass *)malloc(sizeof(AllPass));
+- biquad *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(biquad));
+- biquad_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runAllPass(LADSPA_Handle instance, unsigned long sample_count) {
+- AllPass *plugin_data = (AllPass *)instance;
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Bandwidth (octaves) (float value) */
+- const LADSPA_Data Q = *(plugin_data->Q);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+-
+- biquad * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- ap_set_params(filter, fc, Q, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- // RT 2.9.2013: replace biquad_run with ap2_run to cut
floating-
+- // point multiplications from 5 to 2:
+- buffer_write(output[pos], (LADSPA_Data) ap2_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- allPassDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (allPassDescriptor) {
+- allPassDescriptor->UniqueID = 9005;
+- allPassDescriptor->Label = "RTallpass2";
+- allPassDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- allPassDescriptor->Name =
+- D_("RT Biquad Allpass");
+- allPassDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- allPassDescriptor->Copyright =
+- "GPL";
+- allPassDescriptor->PortCount = 4;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
+- sizeof(LADSPA_PortDescriptor));
+- allPassDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
+- sizeof(LADSPA_PortRangeHint));
+- allPassDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(4, sizeof(char*));
+- allPassDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[ALLPASS_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[ALLPASS_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[ALLPASS_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[ALLPASS_FC].LowerBound = 0;
+- port_range_hints[ALLPASS_FC].UpperBound = (LADSPA_Data) 0.4;
+-
+- /* Parameters for Bandwidth (octaves) */
+- port_descriptors[ALLPASS_Q] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[ALLPASS_Q] =
+- D_("Q");
+- port_range_hints[ALLPASS_Q].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[ALLPASS_Q].LowerBound = 0;
+- port_range_hints[ALLPASS_Q].UpperBound = 10;
+-
+- /* Parameters for Input */
+- port_descriptors[ALLPASS_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[ALLPASS_INPUT] =
+- D_("Input");
+- port_range_hints[ALLPASS_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[ALLPASS_INPUT].LowerBound = -1.0;
+- port_range_hints[ALLPASS_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[ALLPASS_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[ALLPASS_OUTPUT] =
+- D_("Output");
+- port_range_hints[ALLPASS_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[ALLPASS_OUTPUT].LowerBound = -1.0;
+- port_range_hints[ALLPASS_OUTPUT].UpperBound = +1.0;
+-
+- allPassDescriptor->activate = activateAllPass;
+- allPassDescriptor->cleanup = cleanupAllPass;
+- allPassDescriptor->connect_port = connectPortAllPass;
+- allPassDescriptor->deactivate = NULL;
+- allPassDescriptor->instantiate = instantiateAllPass;
+- allPassDescriptor->run = runAllPass;
+- allPassDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (allPassDescriptor) {
+- free((LADSPA_PortDescriptor
*)allPassDescriptor->PortDescriptors);
+- free((char **)allPassDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)allPassDescriptor->PortRangeHints);
+- free(allPassDescriptor);
+- }
+-
+-}
+-
+diff --git a/RThighpass.c b/RThighpass.c
+deleted file mode 100644
+index 3376ad9..0000000
+--- a/RThighpass.c
++++ /dev/null
+@@ -1,251 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define HIGHPASS_FC 0
+-#define HIGHPASS_Q 1
+-#define HIGHPASS_INPUT 2
+-#define HIGHPASS_OUTPUT 3
+-
+-static LADSPA_Descriptor *highPassDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *fc;
+- LADSPA_Data *Q;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filter;
+- float fs;
+-} HighPass;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return highPassDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateHighPass(LADSPA_Handle instance) {
+- HighPass *plugin_data = (HighPass *)instance;
+- biquad *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- biquad_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupHighPass(LADSPA_Handle instance) {
+- HighPass *plugin_data = (HighPass *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortHighPass(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- HighPass *plugin;
+-
+- plugin = (HighPass *)instance;
+- switch (port) {
+- case HIGHPASS_FC:
+- plugin->fc = data;
+- break;
+- case HIGHPASS_Q:
+- plugin->Q = data;
+- break;
+- case HIGHPASS_INPUT:
+- plugin->input = data;
+- break;
+- case HIGHPASS_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateHighPass(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- HighPass *plugin_data = (HighPass *)malloc(sizeof(HighPass));
+- biquad *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(biquad));
+- biquad_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runHighPass(LADSPA_Handle instance, unsigned long sample_count)
{
+- HighPass *plugin_data = (HighPass *)instance;
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Bandwidth (octaves) (float value) */
+- const LADSPA_Data Q = *(plugin_data->Q);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- hp_set_params(filter, fc, Q, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- highPassDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (highPassDescriptor) {
+- highPassDescriptor->UniqueID = 9007;
+- highPassDescriptor->Label = "RThighpass";
+- highPassDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- highPassDescriptor->Name =
+- D_("RT 2nd-order highpass");
+- highPassDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- highPassDescriptor->Copyright =
+- "GPL";
+- highPassDescriptor->PortCount = 4;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
+- sizeof(LADSPA_PortDescriptor));
+- highPassDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
+- sizeof(LADSPA_PortRangeHint));
+- highPassDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(4, sizeof(char*));
+- highPassDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[HIGHPASS_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[HIGHPASS_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[HIGHPASS_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[HIGHPASS_FC].LowerBound = 0;
+- port_range_hints[HIGHPASS_FC].UpperBound = (LADSPA_Data) 0.4;
+-
+- /* Parameters for Q */
+- port_descriptors[HIGHPASS_Q] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[HIGHPASS_Q] =
+- D_("Q");
+- port_range_hints[HIGHPASS_Q].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[HIGHPASS_Q].LowerBound = 0;
+- port_range_hints[HIGHPASS_Q].UpperBound = 5;
+-
+- /* Parameters for Input */
+- port_descriptors[HIGHPASS_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[HIGHPASS_INPUT] =
+- D_("Input");
+- port_range_hints[HIGHPASS_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[HIGHPASS_INPUT].LowerBound = -1.0;
+- port_range_hints[HIGHPASS_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[HIGHPASS_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[HIGHPASS_OUTPUT] =
+- D_("Output");
+- port_range_hints[HIGHPASS_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[HIGHPASS_OUTPUT].LowerBound = -1.0;
+- port_range_hints[HIGHPASS_OUTPUT].UpperBound = +1.0;
+-
+- highPassDescriptor->activate = activateHighPass;
+- highPassDescriptor->cleanup = cleanupHighPass;
+- highPassDescriptor->connect_port = connectPortHighPass;
+- highPassDescriptor->deactivate = NULL;
+- highPassDescriptor->instantiate = instantiateHighPass;
+- highPassDescriptor->run = runHighPass;
+- highPassDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (highPassDescriptor) {
+- free((LADSPA_PortDescriptor
*)highPassDescriptor->PortDescriptors);
+- free((char **)highPassDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)highPassDescriptor->PortRangeHints);
+- free(highPassDescriptor);
+- }
+-
+-}
+-
+diff --git a/RThighshelf.c b/RThighshelf.c
+deleted file mode 100644
+index 9d02d45..0000000
+--- a/RThighshelf.c
++++ /dev/null
+@@ -1,269 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define HIGHSHELF_GAIN 0
+-#define HIGHSHELF_FC 1
+-#define HIGHSHELF_Q 2
+-#define HIGHSHELF_INPUT 3
+-#define HIGHSHELF_OUTPUT 4
+-
+-static LADSPA_Descriptor *highShelfDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *gain;
+- LADSPA_Data *fc;
+- LADSPA_Data *Q;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filter;
+- float fs;
+-} HighShelf;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return highShelfDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateHighShelf(LADSPA_Handle instance) {
+- HighShelf *plugin_data = (HighShelf *)instance;
+- biquad *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- biquad_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupHighShelf(LADSPA_Handle instance) {
+- HighShelf *plugin_data = (HighShelf *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortHighShelf(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- HighShelf *plugin;
+-
+- plugin = (HighShelf *)instance;
+- switch (port) {
+- case HIGHSHELF_GAIN:
+- plugin->gain = data;
+- break;
+- case HIGHSHELF_FC:
+- plugin->fc = data;
+- break;
+- case HIGHSHELF_Q:
+- plugin->Q = data;
+- break;
+- case HIGHSHELF_INPUT:
+- plugin->input = data;
+- break;
+- case HIGHSHELF_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateHighShelf(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- HighShelf *plugin_data = (HighShelf *)malloc(sizeof(HighShelf));
+- biquad *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(biquad));
+- biquad_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runHighShelf(LADSPA_Handle instance, unsigned long
sample_count) {
+- HighShelf *plugin_data = (HighShelf *)instance;
+-
+- /* Gain (dB) (float value) */
+- const LADSPA_Data gain = *(plugin_data->gain);
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Bandwidth (octaves) (float value) */
+- const LADSPA_Data Q = *(plugin_data->Q);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- hs_set_params(filter, fc, gain, Q, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- highShelfDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (highShelfDescriptor) {
+- highShelfDescriptor->UniqueID = 9003;
+- highShelfDescriptor->Label = "RThighshelf";
+- highShelfDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- highShelfDescriptor->Name =
+- D_("RT High Shelf");
+- highShelfDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- highShelfDescriptor->Copyright =
+- "GPL";
+- highShelfDescriptor->PortCount = 5;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
+- sizeof(LADSPA_PortDescriptor));
+- highShelfDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
+- sizeof(LADSPA_PortRangeHint));
+- highShelfDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(5, sizeof(char*));
+- highShelfDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Gain (dB) */
+- port_descriptors[HIGHSHELF_GAIN] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[HIGHSHELF_GAIN] =
+- D_("Gain (dB)");
+- port_range_hints[HIGHSHELF_GAIN].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_0;
+- port_range_hints[HIGHSHELF_GAIN].LowerBound = -70;
+- port_range_hints[HIGHSHELF_GAIN].UpperBound = +30;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[HIGHSHELF_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[HIGHSHELF_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[HIGHSHELF_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[HIGHSHELF_FC].LowerBound = 0;
+- port_range_hints[HIGHSHELF_FC].UpperBound = (LADSPA_Data) 0.4;
+-
+- /* Parameters for Quality Factor */
+- port_descriptors[HIGHSHELF_Q] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[HIGHSHELF_Q] =
+- D_("Q");
+- port_range_hints[HIGHSHELF_Q].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[HIGHSHELF_Q].LowerBound = 0;
+- port_range_hints[HIGHSHELF_Q].UpperBound = 5;
+-
+- /* Parameters for Input */
+- port_descriptors[HIGHSHELF_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[HIGHSHELF_INPUT] =
+- D_("Input");
+- port_range_hints[HIGHSHELF_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[HIGHSHELF_INPUT].LowerBound = -1.0;
+- port_range_hints[HIGHSHELF_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[HIGHSHELF_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[HIGHSHELF_OUTPUT] =
+- D_("Output");
+- port_range_hints[HIGHSHELF_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[HIGHSHELF_OUTPUT].LowerBound = -1.0;
+- port_range_hints[HIGHSHELF_OUTPUT].UpperBound = +1.0;
+-
+- highShelfDescriptor->activate = activateHighShelf;
+- highShelfDescriptor->cleanup = cleanupHighShelf;
+- highShelfDescriptor->connect_port = connectPortHighShelf;
+- highShelfDescriptor->deactivate = NULL;
+- highShelfDescriptor->instantiate = instantiateHighShelf;
+- highShelfDescriptor->run = runHighShelf;
+- highShelfDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (highShelfDescriptor) {
+- free((LADSPA_PortDescriptor
*)highShelfDescriptor->PortDescriptors);
+- free((char **)highShelfDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)highShelfDescriptor->PortRangeHints);
+- free(highShelfDescriptor);
+- }
+-
+-}
+-
+diff --git a/RTlowpass.c b/RTlowpass.c
+deleted file mode 100644
+index 9ea377f..0000000
+--- a/RTlowpass.c
++++ /dev/null
+@@ -1,251 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define LOWPASS_FC 0
+-#define LOWPASS_Q 1
+-#define LOWPASS_INPUT 2
+-#define LOWPASS_OUTPUT 3
+-
+-static LADSPA_Descriptor *lowPassDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *fc;
+- LADSPA_Data *Q;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filter;
+- float fs;
+-} LowPass;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return lowPassDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateLowPass(LADSPA_Handle instance) {
+- LowPass *plugin_data = (LowPass *)instance;
+- biquad *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- biquad_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupLowPass(LADSPA_Handle instance) {
+- LowPass *plugin_data = (LowPass *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortLowPass(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- LowPass *plugin;
+-
+- plugin = (LowPass *)instance;
+- switch (port) {
+- case LOWPASS_FC:
+- plugin->fc = data;
+- break;
+- case LOWPASS_Q:
+- plugin->Q = data;
+- break;
+- case LOWPASS_INPUT:
+- plugin->input = data;
+- break;
+- case LOWPASS_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateLowPass(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- LowPass *plugin_data = (LowPass *)malloc(sizeof(LowPass));
+- biquad *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(biquad));
+- biquad_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runLowPass(LADSPA_Handle instance, unsigned long sample_count) {
+- LowPass *plugin_data = (LowPass *)instance;
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Bandwidth (octaves) (float value) */
+- const LADSPA_Data Q = *(plugin_data->Q);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- lp_set_params(filter, fc, Q, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- lowPassDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (lowPassDescriptor) {
+- lowPassDescriptor->UniqueID = 9006;
+- lowPassDescriptor->Label = "RTlowpass";
+- lowPassDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- lowPassDescriptor->Name =
+- D_("RT 2nd-order lowpass");
+- lowPassDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- lowPassDescriptor->Copyright =
+- "GPL";
+- lowPassDescriptor->PortCount = 4;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
+- sizeof(LADSPA_PortDescriptor));
+- lowPassDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
+- sizeof(LADSPA_PortRangeHint));
+- lowPassDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(4, sizeof(char*));
+- lowPassDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[LOWPASS_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LOWPASS_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[LOWPASS_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[LOWPASS_FC].LowerBound = 0;
+- port_range_hints[LOWPASS_FC].UpperBound = (LADSPA_Data) 0.4;
+-
+- /* Parameters for Q */
+- port_descriptors[LOWPASS_Q] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LOWPASS_Q] =
+- D_("Q");
+- port_range_hints[LOWPASS_Q].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[LOWPASS_Q].LowerBound = 0;
+- port_range_hints[LOWPASS_Q].UpperBound = 5;
+-
+- /* Parameters for Input */
+- port_descriptors[LOWPASS_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[LOWPASS_INPUT] =
+- D_("Input");
+- port_range_hints[LOWPASS_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LOWPASS_INPUT].LowerBound = -1.0;
+- port_range_hints[LOWPASS_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[LOWPASS_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[LOWPASS_OUTPUT] =
+- D_("Output");
+- port_range_hints[LOWPASS_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LOWPASS_OUTPUT].LowerBound = -1.0;
+- port_range_hints[LOWPASS_OUTPUT].UpperBound = +1.0;
+-
+- lowPassDescriptor->activate = activateLowPass;
+- lowPassDescriptor->cleanup = cleanupLowPass;
+- lowPassDescriptor->connect_port = connectPortLowPass;
+- lowPassDescriptor->deactivate = NULL;
+- lowPassDescriptor->instantiate = instantiateLowPass;
+- lowPassDescriptor->run = runLowPass;
+- lowPassDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (lowPassDescriptor) {
+- free((LADSPA_PortDescriptor
*)lowPassDescriptor->PortDescriptors);
+- free((char **)lowPassDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)lowPassDescriptor->PortRangeHints);
+- free(lowPassDescriptor);
+- }
+-
+-}
+-
+diff --git a/RTlowshelf.c b/RTlowshelf.c
+deleted file mode 100644
+index 12a2c7c..0000000
+--- a/RTlowshelf.c
++++ /dev/null
+@@ -1,269 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define LOWSHELF_GAIN 0
+-#define LOWSHELF_FC 1
+-#define LOWSHELF_Q 2
+-#define LOWSHELF_INPUT 3
+-#define LOWSHELF_OUTPUT 4
+-
+-static LADSPA_Descriptor *lowShelfDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *gain;
+- LADSPA_Data *fc;
+- LADSPA_Data *Q;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filter;
+- float fs;
+-} LowShelf;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return lowShelfDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateLowShelf(LADSPA_Handle instance) {
+- LowShelf *plugin_data = (LowShelf *)instance;
+- biquad *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- biquad_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupLowShelf(LADSPA_Handle instance) {
+- LowShelf *plugin_data = (LowShelf *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortLowShelf(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- LowShelf *plugin;
+-
+- plugin = (LowShelf *)instance;
+- switch (port) {
+- case LOWSHELF_GAIN:
+- plugin->gain = data;
+- break;
+- case LOWSHELF_FC:
+- plugin->fc = data;
+- break;
+- case LOWSHELF_Q:
+- plugin->Q = data;
+- break;
+- case LOWSHELF_INPUT:
+- plugin->input = data;
+- break;
+- case LOWSHELF_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateLowShelf(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- LowShelf *plugin_data = (LowShelf *)malloc(sizeof(LowShelf));
+- biquad *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(biquad));
+- biquad_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runLowShelf(LADSPA_Handle instance, unsigned long sample_count)
{
+- LowShelf *plugin_data = (LowShelf *)instance;
+-
+- /* Gain (dB) (float value) */
+- const LADSPA_Data gain = *(plugin_data->gain);
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Bandwidth (octaves) (float value) */
+- const LADSPA_Data Q = *(plugin_data->Q);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- ls_set_params(filter, fc, gain, Q, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- lowShelfDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (lowShelfDescriptor) {
+- lowShelfDescriptor->UniqueID = 9002;
+- lowShelfDescriptor->Label = "RTlowshelf";
+- lowShelfDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- lowShelfDescriptor->Name =
+- D_("RT Low Shelf");
+- lowShelfDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- lowShelfDescriptor->Copyright =
+- "GPL";
+- lowShelfDescriptor->PortCount = 5;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
+- sizeof(LADSPA_PortDescriptor));
+- lowShelfDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
+- sizeof(LADSPA_PortRangeHint));
+- lowShelfDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(5, sizeof(char*));
+- lowShelfDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Gain (dB) */
+- port_descriptors[LOWSHELF_GAIN] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LOWSHELF_GAIN] =
+- D_("Gain (dB)");
+- port_range_hints[LOWSHELF_GAIN].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_0;
+- port_range_hints[LOWSHELF_GAIN].LowerBound = -70;
+- port_range_hints[LOWSHELF_GAIN].UpperBound = +30;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[LOWSHELF_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LOWSHELF_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[LOWSHELF_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[LOWSHELF_FC].LowerBound = 0;
+- port_range_hints[LOWSHELF_FC].UpperBound = (LADSPA_Data) 0.4;
+-
+- /* Parameters for Quality Factor */
+- port_descriptors[LOWSHELF_Q] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LOWSHELF_Q] =
+- D_("Q");
+- port_range_hints[LOWSHELF_Q].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[LOWSHELF_Q].LowerBound = 0;
+- port_range_hints[LOWSHELF_Q].UpperBound = 5;
+-
+- /* Parameters for Input */
+- port_descriptors[LOWSHELF_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[LOWSHELF_INPUT] =
+- D_("Input");
+- port_range_hints[LOWSHELF_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LOWSHELF_INPUT].LowerBound = -1.0;
+- port_range_hints[LOWSHELF_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[LOWSHELF_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[LOWSHELF_OUTPUT] =
+- D_("Output");
+- port_range_hints[LOWSHELF_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LOWSHELF_OUTPUT].LowerBound = -1.0;
+- port_range_hints[LOWSHELF_OUTPUT].UpperBound = +1.0;
+-
+- lowShelfDescriptor->activate = activateLowShelf;
+- lowShelfDescriptor->cleanup = cleanupLowShelf;
+- lowShelfDescriptor->connect_port = connectPortLowShelf;
+- lowShelfDescriptor->deactivate = NULL;
+- lowShelfDescriptor->instantiate = instantiateLowShelf;
+- lowShelfDescriptor->run = runLowShelf;
+- lowShelfDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (lowShelfDescriptor) {
+- free((LADSPA_PortDescriptor
*)lowShelfDescriptor->PortDescriptors);
+- free((char **)lowShelfDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)lowShelfDescriptor->PortRangeHints);
+- free(lowShelfDescriptor);
+- }
+-
+-}
+-
+diff --git a/RTlr4hipass.c b/RTlr4hipass.c
+deleted file mode 100644
+index 15d6c49..0000000
+--- a/RTlr4hipass.c
++++ /dev/null
+@@ -1,239 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define LR4HIGHPASS_FC 0
+-#define LR4HIGHPASS_INPUT 1
+-#define LR4HIGHPASS_OUTPUT 2
+-
+-static LADSPA_Descriptor *lr4highPassDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *fc;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filters;
+- float fs;
+-} LR4HighPass;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return lr4highPassDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateLR4HighPass(LADSPA_Handle instance) {
+- LR4HighPass *plugin_data = (LR4HighPass *)instance;
+- biquad *filters = plugin_data->filters;
+- float fs = plugin_data->fs;
+- biquad_init(&filters[0]);
+- biquad_init(&filters[1]);
+- plugin_data->filters = filters;
+- plugin_data->fs = fs;
+-}
+-
+-static void cleanupLR4HighPass(LADSPA_Handle instance) {
+- LR4HighPass *plugin_data = (LR4HighPass *)instance;
+- free(plugin_data->filters);
+- free(instance);
+-}
+-
+-static void connectPortLR4HighPass(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- LR4HighPass *plugin;
+-
+- plugin = (LR4HighPass *)instance;
+- switch (port) {
+- case LR4HIGHPASS_FC:
+- plugin->fc = data;
+- break;
+- case LR4HIGHPASS_INPUT:
+- plugin->input = data;
+- break;
+- case LR4HIGHPASS_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateLR4HighPass(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- LR4HighPass *plugin_data = (LR4HighPass *)malloc(sizeof(LR4HighPass));
+- biquad *filters = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+-
+- filters = calloc(2, sizeof(biquad));
+- biquad_init(&filters[0]);
+- biquad_init(&filters[1]);
+-
+- plugin_data->filters = filters;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runLR4HighPass(LADSPA_Handle instance, unsigned long
sample_count) {
+- LR4HighPass *plugin_data = (LR4HighPass *)instance;
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filters = plugin_data->filters;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+- bq_t in;
+-
+- hp_set_params(&filters[0], fc, 0.7071068, fs);
+- hp_set_params(&filters[1], fc, 0.7071068, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- in = biquad_run(&filters[0], input[pos]);
+- in = biquad_run(&filters[1], in);
+- buffer_write(output[pos], (LADSPA_Data) in);
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- lr4highPassDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (lr4highPassDescriptor) {
+- lr4highPassDescriptor->UniqueID = 9021;
+- lr4highPassDescriptor->Label = "RTlr4hipass";
+- lr4highPassDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- lr4highPassDescriptor->Name =
+- D_("RT LR4 highpass");
+- lr4highPassDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- lr4highPassDescriptor->Copyright =
+- "GPL";
+- lr4highPassDescriptor->PortCount = 3;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
+- sizeof(LADSPA_PortDescriptor));
+- lr4highPassDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
+- sizeof(LADSPA_PortRangeHint));
+- lr4highPassDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(3, sizeof(char*));
+- lr4highPassDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[LR4HIGHPASS_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LR4HIGHPASS_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[LR4HIGHPASS_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[LR4HIGHPASS_FC].LowerBound = 0;
+- port_range_hints[LR4HIGHPASS_FC].UpperBound = (LADSPA_Data)
0.4;
+-
+- /* Parameters for Input */
+- port_descriptors[LR4HIGHPASS_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[LR4HIGHPASS_INPUT] =
+- D_("Input");
+- port_range_hints[LR4HIGHPASS_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LR4HIGHPASS_INPUT].LowerBound = -1.0;
+- port_range_hints[LR4HIGHPASS_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[LR4HIGHPASS_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[LR4HIGHPASS_OUTPUT] =
+- D_("Output");
+- port_range_hints[LR4HIGHPASS_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LR4HIGHPASS_OUTPUT].LowerBound = -1.0;
+- port_range_hints[LR4HIGHPASS_OUTPUT].UpperBound = +1.0;
+-
+- lr4highPassDescriptor->activate = activateLR4HighPass;
+- lr4highPassDescriptor->cleanup = cleanupLR4HighPass;
+- lr4highPassDescriptor->connect_port = connectPortLR4HighPass;
+- lr4highPassDescriptor->deactivate = NULL;
+- lr4highPassDescriptor->instantiate = instantiateLR4HighPass;
+- lr4highPassDescriptor->run = runLR4HighPass;
+- lr4highPassDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (lr4highPassDescriptor) {
+- free((LADSPA_PortDescriptor
*)lr4highPassDescriptor->PortDescriptors);
+- free((char **)lr4highPassDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)lr4highPassDescriptor->PortRangeHints);
+- free(lr4highPassDescriptor);
+- }
+-
+-}
+-
+diff --git a/RTlr4lowpass.c b/RTlr4lowpass.c
+deleted file mode 100644
+index 16ad5c9..0000000
+--- a/RTlr4lowpass.c
++++ /dev/null
+@@ -1,239 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define LR4LOWPASS_FC 0
+-#define LR4LOWPASS_INPUT 1
+-#define LR4LOWPASS_OUTPUT 2
+-
+-static LADSPA_Descriptor *lr4lowPassDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *fc;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filters;
+- float fs;
+-} LR4LowPass;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return lr4lowPassDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateLR4LowPass(LADSPA_Handle instance) {
+- LR4LowPass *plugin_data = (LR4LowPass *)instance;
+- biquad *filters = plugin_data->filters;
+- float fs = plugin_data->fs;
+- biquad_init(&filters[0]);
+- biquad_init(&filters[1]);
+- plugin_data->filters = filters;
+- plugin_data->fs = fs;
+-}
+-
+-static void cleanupLR4LowPass(LADSPA_Handle instance) {
+- LR4LowPass *plugin_data = (LR4LowPass *)instance;
+- free(plugin_data->filters);
+- free(instance);
+-}
+-
+-static void connectPortLR4LowPass(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- LR4LowPass *plugin;
+-
+- plugin = (LR4LowPass *)instance;
+- switch (port) {
+- case LR4LOWPASS_FC:
+- plugin->fc = data;
+- break;
+- case LR4LOWPASS_INPUT:
+- plugin->input = data;
+- break;
+- case LR4LOWPASS_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateLR4LowPass(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- LR4LowPass *plugin_data = (LR4LowPass *)malloc(sizeof(LR4LowPass));
+- biquad *filters = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+-
+- filters = calloc(2, sizeof(biquad));
+- biquad_init(&filters[0]);
+- biquad_init(&filters[1]);
+-
+- plugin_data->filters = filters;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runLR4LowPass(LADSPA_Handle instance, unsigned long
sample_count) {
+- LR4LowPass *plugin_data = (LR4LowPass *)instance;
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filters = plugin_data->filters;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+- bq_t in;
+-
+- lp_set_params(&filters[0], fc, 0.7071068, fs);
+- lp_set_params(&filters[1], fc, 0.7071068, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- in = biquad_run(&filters[0], input[pos]);
+- in = biquad_run(&filters[1], in);
+- buffer_write(output[pos], (LADSPA_Data) in);
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- lr4lowPassDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (lr4lowPassDescriptor) {
+- lr4lowPassDescriptor->UniqueID = 9020;
+- lr4lowPassDescriptor->Label = "RTlr4lowpass";
+- lr4lowPassDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- lr4lowPassDescriptor->Name =
+- D_("RT LR4 lowpass");
+- lr4lowPassDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- lr4lowPassDescriptor->Copyright =
+- "GPL";
+- lr4lowPassDescriptor->PortCount = 3;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
+- sizeof(LADSPA_PortDescriptor));
+- lr4lowPassDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
+- sizeof(LADSPA_PortRangeHint));
+- lr4lowPassDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(3, sizeof(char*));
+- lr4lowPassDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[LR4LOWPASS_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[LR4LOWPASS_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[LR4LOWPASS_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[LR4LOWPASS_FC].LowerBound = 0;
+- port_range_hints[LR4LOWPASS_FC].UpperBound = (LADSPA_Data)
0.4;
+-
+- /* Parameters for Input */
+- port_descriptors[LR4LOWPASS_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[LR4LOWPASS_INPUT] =
+- D_("Input");
+- port_range_hints[LR4LOWPASS_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LR4LOWPASS_INPUT].LowerBound = -1.0;
+- port_range_hints[LR4LOWPASS_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[LR4LOWPASS_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[LR4LOWPASS_OUTPUT] =
+- D_("Output");
+- port_range_hints[LR4LOWPASS_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[LR4LOWPASS_OUTPUT].LowerBound = -1.0;
+- port_range_hints[LR4LOWPASS_OUTPUT].UpperBound = +1.0;
+-
+- lr4lowPassDescriptor->activate = activateLR4LowPass;
+- lr4lowPassDescriptor->cleanup = cleanupLR4LowPass;
+- lr4lowPassDescriptor->connect_port = connectPortLR4LowPass;
+- lr4lowPassDescriptor->deactivate = NULL;
+- lr4lowPassDescriptor->instantiate = instantiateLR4LowPass;
+- lr4lowPassDescriptor->run = runLR4LowPass;
+- lr4lowPassDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (lr4lowPassDescriptor) {
+- free((LADSPA_PortDescriptor
*)lr4lowPassDescriptor->PortDescriptors);
+- free((char **)lr4lowPassDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)lr4lowPassDescriptor->PortRangeHints);
+- free(lr4lowPassDescriptor);
+- }
+-
+-}
+-
+diff --git a/RTparaeq.c b/RTparaeq.c
+deleted file mode 100644
+index 3e77a83..0000000
+--- a/RTparaeq.c
++++ /dev/null
+@@ -1,269 +0,0 @@
+-/* Copyright 2013 Richard Taylor
+-
+- This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation, either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+- CREDITS:
+-
+- Much of the code here was adapted from Steve Harris's swh-plugins
+- (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
+- making your code available.
+-
+- The guts of the code, in util/biquad.h, is an implementation
+- of the biquad filters described in Robert Bristow-Johnson's "Cookbook
+- formulae for audio EQ biquad filter coefficients" found here:
+- http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
+-*/
+-
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#define _ISOC9X_SOURCE 1
+-#define _ISOC99_SOURCE 1
+-#define __USE_ISOC99 1
+-#define __USE_ISOC9X 1
+-
+-#include <math.h>
+-
+-#include "ladspa.h"
+-
+-#include "util/biquad.h"
+-
+-#define SINGLEPARA_GAIN 0
+-#define SINGLEPARA_FC 1
+-#define SINGLEPARA_Q 2
+-#define SINGLEPARA_INPUT 3
+-#define SINGLEPARA_OUTPUT 4
+-
+-static LADSPA_Descriptor *singleParaDescriptor = NULL;
+-
+-typedef struct {
+- LADSPA_Data *gain;
+- LADSPA_Data *fc;
+- LADSPA_Data *Q;
+- LADSPA_Data *input;
+- LADSPA_Data *output;
+- biquad * filter;
+- float fs;
+-} SinglePara;
+-
+-const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
+- switch (index) {
+- case 0:
+- return singleParaDescriptor;
+- default:
+- return NULL;
+- }
+-}
+-
+-static void activateSinglePara(LADSPA_Handle instance) {
+- SinglePara *plugin_data = (SinglePara *)instance;
+- biquad *filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+- biquad_init(filter);
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+-}
+-
+-static void cleanupSinglePara(LADSPA_Handle instance) {
+- SinglePara *plugin_data = (SinglePara *)instance;
+- free(plugin_data->filter);
+- free(instance);
+-}
+-
+-static void connectPortSinglePara(
+- LADSPA_Handle instance,
+- unsigned long port,
+- LADSPA_Data *data) {
+- SinglePara *plugin;
+-
+- plugin = (SinglePara *)instance;
+- switch (port) {
+- case SINGLEPARA_GAIN:
+- plugin->gain = data;
+- break;
+- case SINGLEPARA_FC:
+- plugin->fc = data;
+- break;
+- case SINGLEPARA_Q:
+- plugin->Q = data;
+- break;
+- case SINGLEPARA_INPUT:
+- plugin->input = data;
+- break;
+- case SINGLEPARA_OUTPUT:
+- plugin->output = data;
+- break;
+- }
+-}
+-
+-static LADSPA_Handle instantiateSinglePara(
+- const LADSPA_Descriptor *descriptor,
+- unsigned long s_rate) {
+- SinglePara *plugin_data = (SinglePara *)malloc(sizeof(SinglePara));
+- biquad *filter = NULL;
+- float fs;
+-
+- fs = (float)s_rate;
+- filter = malloc(sizeof(biquad));
+- biquad_init(filter);
+-
+- plugin_data->filter = filter;
+- plugin_data->fs = fs;
+-
+- return (LADSPA_Handle)plugin_data;
+-}
+-
+-#undef buffer_write
+-#define buffer_write(b, v) (b = v)
+-
+-static void runSinglePara(LADSPA_Handle instance, unsigned long
sample_count) {
+- SinglePara *plugin_data = (SinglePara *)instance;
+-
+- /* Gain (dB) (float value) */
+- const LADSPA_Data gain = *(plugin_data->gain);
+-
+- /* Frequency (Hz) (float value) */
+- const LADSPA_Data fc = *(plugin_data->fc);
+-
+- /* Quality factor (float value) */
+- const LADSPA_Data Q = *(plugin_data->Q);
+-
+- /* Input (array of floats of length sample_count) */
+- const LADSPA_Data * const input = plugin_data->input;
+-
+- /* Output (array of floats of length sample_count) */
+- LADSPA_Data * const output = plugin_data->output;
+- biquad * filter = plugin_data->filter;
+- float fs = plugin_data->fs;
+-
+- unsigned long pos;
+-
+- eq_set_params(filter, fc, gain, Q, fs);
+-
+- for (pos = 0; pos < sample_count; pos++) {
+- buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
+- }
+-
+-}
+-
+-void _init(void);
+-void _init(void) {
+- char **port_names;
+- LADSPA_PortDescriptor *port_descriptors;
+- LADSPA_PortRangeHint *port_range_hints;
+-
+-#define D_(s) (s)
+-
+- singleParaDescriptor =
+- (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
+-
+- if (singleParaDescriptor) {
+- singleParaDescriptor->UniqueID = 9001;
+- singleParaDescriptor->Label = "RTparaeq";
+- singleParaDescriptor->Properties =
+- LADSPA_PROPERTY_HARD_RT_CAPABLE;
+- singleParaDescriptor->Name =
+- D_("RT parametric eq");
+- singleParaDescriptor->Maker =
+- "Richard Taylor <rtaylor AT tru.ca>";
+- singleParaDescriptor->Copyright =
+- "GPL";
+- singleParaDescriptor->PortCount = 5;
+-
+- port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
+- sizeof(LADSPA_PortDescriptor));
+- singleParaDescriptor->PortDescriptors =
+- (const LADSPA_PortDescriptor *)port_descriptors;
+-
+- port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
+- sizeof(LADSPA_PortRangeHint));
+- singleParaDescriptor->PortRangeHints =
+- (const LADSPA_PortRangeHint *)port_range_hints;
+-
+- port_names = (char **)calloc(5, sizeof(char*));
+- singleParaDescriptor->PortNames =
+- (const char **)port_names;
+-
+- /* Parameters for Gain (dB) */
+- port_descriptors[SINGLEPARA_GAIN] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[SINGLEPARA_GAIN] =
+- D_("Gain (dB)");
+- port_range_hints[SINGLEPARA_GAIN].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[SINGLEPARA_GAIN].LowerBound = -70;
+- port_range_hints[SINGLEPARA_GAIN].UpperBound = +30;
+-
+- /* Parameters for Frequency (Hz) */
+- port_descriptors[SINGLEPARA_FC] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[SINGLEPARA_FC] =
+- D_("Frequency (Hz)");
+- port_range_hints[SINGLEPARA_FC].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
+- port_range_hints[SINGLEPARA_FC].LowerBound = 0;
+- port_range_hints[SINGLEPARA_FC].UpperBound = (LADSPA_Data)
0.4;
+-
+- /* Parameters for Quality Factor */
+- port_descriptors[SINGLEPARA_Q] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
+- port_names[SINGLEPARA_Q] =
+- D_("Q");
+- port_range_hints[SINGLEPARA_Q].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
+- port_range_hints[SINGLEPARA_Q].LowerBound = 0;
+- port_range_hints[SINGLEPARA_Q].UpperBound = 100;
+-
+- /* Parameters for Input */
+- port_descriptors[SINGLEPARA_INPUT] =
+- LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
+- port_names[SINGLEPARA_INPUT] =
+- D_("Input");
+- port_range_hints[SINGLEPARA_INPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[SINGLEPARA_INPUT].LowerBound = -1.0;
+- port_range_hints[SINGLEPARA_INPUT].UpperBound = +1.0;
+-
+- /* Parameters for Output */
+- port_descriptors[SINGLEPARA_OUTPUT] =
+- LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
+- port_names[SINGLEPARA_OUTPUT] =
+- D_("Output");
+- port_range_hints[SINGLEPARA_OUTPUT].HintDescriptor =
+- LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
+- port_range_hints[SINGLEPARA_OUTPUT].LowerBound = -1.0;
+- port_range_hints[SINGLEPARA_OUTPUT].UpperBound = +1.0;
+-
+- singleParaDescriptor->activate = activateSinglePara;
+- singleParaDescriptor->cleanup = cleanupSinglePara;
+- singleParaDescriptor->connect_port = connectPortSinglePara;
+- singleParaDescriptor->deactivate = NULL;
+- singleParaDescriptor->instantiate = instantiateSinglePara;
+- singleParaDescriptor->run = runSinglePara;
+- singleParaDescriptor->run_adding = NULL;
+- }
+-}
+-
+-void _fini(void);
+-void _fini(void) {
+- if (singleParaDescriptor) {
+- free((LADSPA_PortDescriptor
*)singleParaDescriptor->PortDescriptors);
+- free((char **)singleParaDescriptor->PortNames);
+- free((LADSPA_PortRangeHint
*)singleParaDescriptor->PortRangeHints);
+- free(singleParaDescriptor);
+- }
+-
+-}
+-
+diff --git a/build/.keep b/build/.keep
+new file mode 100644
+index 0000000..e69de29
+diff --git a/cmake/compilerwarnings.cmake b/cmake/compilerwarnings.cmake
+new file mode 100644
+index 0000000..7f6f935
+--- /dev/null
++++ b/cmake/compilerwarnings.cmake
+@@ -0,0 +1,37 @@
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Werror" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wall" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wextra" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -pedantic" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wcast-align" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wconversion" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wformat-nonliteral" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wformat-security" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wfloat-equal" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Winit-self" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wlogical-op" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wmissing-include-dirs" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wno-write-strings" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wpointer-arith" )
++#set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wswitch-default" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wswitch-enum" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wundef" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wunused-macros" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wno-unused-parameter" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wshadow" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wpacked" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wredundant-decls" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Wunreachable-code" )
++set( WARNINGS_COMMONFLAGS "${WARNINGS_COMMONFLAGS} -Winline" )
++#
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS_COMMONFLAGS}")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-prototypes")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wbad-function-cast")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wold-style-definition")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wnested-externs")
++
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS_COMMONFLAGS}")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual" )
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weffc++" )
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast" )
+diff --git a/cmake/cppcheck.cmake b/cmake/cppcheck.cmake
+new file mode 100644
+index 0000000..86d49a2
+--- /dev/null
++++ b/cmake/cppcheck.cmake
+@@ -0,0 +1,12 @@
++find_program(CPPCHECK_EXE "cppcheck")
++
++if(CPPCHECK_EXE)
++ message(STATUS "[CPPCHECK] at ${CPPCHECK_EXE}")
++ add_custom_target(cppcheck)
++
++ add_custom_command(TARGET cppcheck POST_BUILD
++ COMMAND ${CPPCHECK_EXE} --template=gcc -f --std=posix --std=c99
--std=c++11 --enable=all -i ${PROJECT_BINARY_DIR} -I
${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}
++ )
++else()
++ message(STATUS "[CPPCHECK] Could not find cppcheck executable")
++endif()
+diff --git a/include/biquad.h b/include/biquad.h
+new file mode 100644
+index 0000000..49451d8
+--- /dev/null
++++ b/include/biquad.h
+@@ -0,0 +1,331 @@
++#ifndef BIQUAD_H
++#define BIQUAD_H
++
++#define LN_2_2 0.34657359f // ln(2)/2
++
++#include "ladspa-util.h"
++#include <math.h>
++
++#ifndef LIMIT
++#define LIMIT(v,l,u) (v<l?l:(v>u?u:v))
++#endif
++
++// rt 8.1.2013: store biquad coefficients and accumulators in double
++// precision, to limit effects of round-off error. Change this to
++// float if you need more speed: it probably won't make an audible
++// difference unless you need filters with really high Q or low
++// frequency.
++#ifndef BIQUAD_TYPE
++#define BIQUAD_TYPE double
++#endif
++
++// rt 25.6.2013: amplitude of square wave (at Nyquist freq)
++// added to kill denormals ... may need to experiment with
++// this value. NB: 1.e-18 = -360dB
++#define DENORMALKILLER 1.e-18;
++
++typedef BIQUAD_TYPE bq_t;
++
++/* Biquad filter (adapted from lisp code by Eli Brandt,
++ http://www.cs.cmu.edu/~eli/) */
++
++typedef struct {
++ bq_t a1;
++ bq_t a2;
++ bq_t b0;
++ bq_t b1;
++ bq_t b2;
++ bq_t x1;
++ bq_t x2;
++ bq_t y1;
++ bq_t y2;
++ bq_t dn; // denormal state (rt 25.6.2013)
++} biquad;
++
++typedef struct {
++ bq_t a1;
++ bq_t b0;
++ bq_t b1;
++ bq_t x1;
++ bq_t y1;
++ bq_t dn; // denormal state
++} bilin;
++
++
++static inline void biquad_init(biquad *f) {
++ f->x1 = 0.0f;
++ f->x2 = 0.0f;
++ f->y1 = 0.0f;
++ f->y2 = 0.0f;
++ f->dn = DENORMALKILLER;
++}
++
++static inline void bilin_init(bilin *f) {
++ f->x1 = 0.0f;
++ f->y1 = 0.0f;
++ f->dn = DENORMALKILLER;
++}
++
++//static inline void eq_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
++// bq_t fs);
++static inline void eq_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
bq_t fs)
++{
++ bq_t w = 2.0f * M_PI * LIMIT(fc, 1.0f, fs/2.0f) / fs;
++ bq_t J = pow(10.0f, gain * 0.025f);
++ bq_t cw = cos(w);
++ bq_t sw = sin(w);
++ Q = Q / J; // adjust so input Q is standard elec. eng. Q
++// bq_t g = sw * sinhf(LN_2_2 * LIMIT(bw, 0.0001f, 4.0f) * w / sw); //
case: bw
++ bq_t g = sw/(2.0*Q); // case: Q
++// bq_t g = sin(w0)/2.0 * sqrt( (J + 1.0/J)*(1.0/S - 1.0) + 2.0 ) //
case: S
++
++ bq_t a0 = 1.0f + g / J;
++ bq_t a0r = 1.0f / a0;
++
++ f->b0 = (1.0 + (g * J)) * a0r;
++ f->b1 = (-2.0 * cw) * a0r;
++ f->b2 = (1.0 - (g * J)) * a0r;
++ f->a1 = -(f->b1);
++ f->a2 = ((g / J) - 1.0) * a0r;
++}
++
++//static inline void ls_set_params(biquad *f, bq_t fc, bq_t gain, bq_t
slope,
++// bq_t fs);
++static inline void ls_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
++ bq_t fs)
++{
++ bq_t w = 2.0f * M_PI * LIMIT(fc, 1.0, fs/2.0) / fs;
++ bq_t cw = cos(w);
++ bq_t sw = sin(w);
++ bq_t A = powf(10.0f, (float) (gain * (bq_t) 0.025));
++
++// rt 8.1.2013: increased slope limit from 1.0f to 5.0f:
++// bq_t b = sqrt(((1.0f + A * A) / LIMIT(slope, 0.0001f, 5.0f)) - ((A -
++// 1.0f) * (A - 1.0)));
++
++// bq_t apc = cw * (A + 1.0f);
++// bq_t amc = cw * (A - 1.0f);
++// bq_t bs = b * sw;
++// bq_t a0r = 1.0f / (A + 1.0f + amc + bs);
++
++// f->b0 = a0r * A * (A + 1.0f - amc + bs);
++// f->b1 = a0r * 2.0f * A * (A - 1.0f - apc);
++// f->b2 = a0r * A * (A + 1.0f - amc - bs);
++// f->a1 = a0r * 2.0f * (A - 1.0f + apc);
++// f->a2 = a0r * (-A - 1.0f - amc + bs);
++
++ // rt 22.1.2013 changed this to use Q instead of slope
++ bq_t alpha = sw / (2.0 * Q);
++ bq_t b = 2.0*sqrt(A)*alpha;
++ bq_t ap = A + 1.0;
++ bq_t am = A - 1.0;
++ bq_t a0 = ap + am*cw + b;
++ bq_t a0r = 1.0 / a0;
++
++ f->b0 = a0r * A * (ap - am*cw + b);
++ f->b1 = a0r * 2.0 * A * (am - ap*cw);
++ f->b2 = a0r * A * (ap - am*cw - b);
++ f->a1 = 2.0 * a0r * (am + ap*cw);
++ f->a2 = -a0r * (ap + am*cw - b);
++}
++
++//static inline void hs_set_params(biquad *f, bq_t fc, bq_t gain, bq_t
slope,
++// bq_t fs);
++static inline void hs_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
bq_t fs)
++{
++ bq_t w = 2.0f * M_PI * LIMIT(fc, 1.0, fs/2.0) / fs;
++ bq_t cw = cos(w);
++ bq_t sw = sin(w);
++ bq_t A = powf(10.0f, (float) (gain * (bq_t) 0.025));
++// rt 8.1.2013: increased slope limit from 1.0f to 5.0f:
++// bq_t b = sqrt(((1.0f + A * A) / LIMIT(slope, 0.0001f, 5.0f)) - ((A -
++// 1.0f) * (A - 1.0f)));
++// bq_t apc = cw * (A + 1.0f);
++// bq_t amc = cw * (A - 1.0f);
++// bq_t bs = b * sw;
++// bq_t a0r = 1.0f / (A + 1.0f - amc + bs);
++
++// f->b0 = a0r * A * (A + 1.0f + amc + bs);
++// f->b1 = a0r * -2.0f * A * (A - 1.0f + apc);
++// f->b2 = a0r * A * (A + 1.0f + amc - bs);
++// f->a1 = a0r * -2.0f * (A - 1.0f - apc);
++// f->a2 = a0r * (-A - 1.0f + amc + bs);
++
++ // rt 22.1.2013 changed this to use Q instead of slope
++ bq_t alpha = sw / (2.0 * Q);
++ bq_t b = 2.0*sqrt(A)*alpha;
++ bq_t ap = A + 1.0;
++ bq_t am = A - 1.0;
++ bq_t a0 = ap - am*cw + b;
++ bq_t a0r = 1.0 / a0;
++
++ f->b0 = a0r * A * (ap + am*cw + b);
++ f->b1 = -a0r * 2.0 * A * (am + ap*cw);
++ f->b2 = a0r * A * (ap + am*cw - b);
++ f->a1 = -2.0 * a0r * (am - ap*cw);
++ f->a2 = -a0r * (ap - am*cw - b);
++}
++
++static inline void lp_set_params(biquad *f, bq_t fc, bq_t Q, bq_t fs)
++{
++ bq_t omega = 2.0 * M_PI * fc/fs;
++ bq_t sn = sin(omega);
++ bq_t cs = cos(omega);
++// bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
++ bq_t alpha = sn / (2.0 * Q);
++
++ const bq_t a0r = 1.0 / (1.0 + alpha);
++ f->b0 = a0r * (1.0 - cs) * 0.5;
++ f->b1 = a0r * (1.0 - cs);
++ f->b2 = a0r * (1.0 - cs) * 0.5;
++ f->a1 = a0r * (2.0 * cs);
++ f->a2 = a0r * (alpha - 1.0);
++}
++
++static inline void hp_set_params(biquad *f, bq_t fc, bq_t Q, bq_t fs)
++{
++ bq_t omega = 2.0 * M_PI * fc/fs;
++ bq_t sn = sin(omega);
++ bq_t cs = cos(omega);
++// bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
++ bq_t alpha = sn / (2.0 * Q);
++
++ const bq_t a0r = 1.0 / (1.0 + alpha);
++ f->b0 = a0r * (1.0 + cs) * 0.5;
++ f->b1 = a0r * -(1.0 + cs);
++ f->b2 = a0r * (1.0 + cs) * 0.5;
++ f->a1 = a0r * (2.0 * cs);
++ f->a2 = a0r * (alpha - 1.0);
++}
++
++static inline void bp_set_params(biquad *f, bq_t fc, bq_t bw, bq_t fs)
++{
++ bq_t omega = 2.0 * M_PI * fc/fs;
++ bq_t sn = sin(omega);
++ bq_t cs = cos(omega);
++ bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
++
++ const bq_t a0r = 1.0 / (1.0 + alpha);
++ f->b0 = a0r * alpha;
++ f->b1 = 0.0;
++ f->b2 = a0r * -alpha;
++ f->a1 = a0r * (2.0 * cs);
++ f->a2 = a0r * (alpha - 1.0);
++}
++
++// rt 8.1.2013: allpass from biquad cookbook
++static inline void ap_set_params(biquad *f, bq_t fc, bq_t Q, bq_t fs)
++{
++ bq_t omega = 2.0 * M_PI * fc/fs;
++ bq_t sn = sin(omega);
++ bq_t cs = cos(omega);
++// bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
++ bq_t alpha = sn / (2.0 * Q);
++
++ bq_t a0 = 1.0 + alpha;
++ bq_t a0r = 1.0 / a0;
++ f->b0 = a0r * (1.0 - alpha);
++ f->b1 = a0r * (-2.0 * cs);
++ f->b2 = 1.0;
++ f->a1 = -f->b1;
++ f->a2 = -f->b0;
++}
++
++static inline void ap1_set_params(bilin *f, bq_t fc, bq_t fs)
++{
++// rt 8.1.2013: implementation of first-order digital allpass found here:
++// https://ccrma.stanford.edu/realsimple/DelayVar/Phasing_First_Order_Allpass_Filters.html
++// see here for turning transfer function into difference equation:
++// http://en.wikipedia.org/wiki/Digital_filter
++ bq_t tphi = tan( M_PI * fc / fs);
++ bq_t p = (1.0f - tphi) / (1.0f + tphi);
++
++ // case 1: phase varies from 0 to 180 degrees
++ f->b0 = -p;
++ f->b1 = 1.0f;
++
++ // case 2: phase varies from 180 to 360 degrees
++// f->b0 = p;
++// f->b1 = -1.0f;
++
++ f->a1 = p;
++}
++
++// routine that runs a biquad (i.e. 2nd-order) digital filter
++static inline bq_t biquad_run(biquad *f, const bq_t x) {
++ bq_t y;
++
++// rt 15.5.2013: add a Nyquist-frequency square-wave to kill denormals:
++ y = f->b0 * x + f->b1 * f->x1 + f->b2 * f->x2
++ + f->a1 * f->y1 + f->a2 * f->y2 + f->dn;
++ f->dn = -f->dn;
++
++// see previous commment
++// y = flush_to_zero(y);
++
++ f->x2 = f->x1;
++ f->x1 = x;
++ f->y2 = f->y1;
++ f->y1 = y;
++
++ return y;
++}
++
++// rt 2.9.2013: special version of biquad_run for 2nd-order
++// allpass; takes advantage of factoring to reduce floating-point
++// multiplications from 5 to 2
++static inline bq_t ap2_run(biquad *f, const bq_t x) {
++ bq_t y;
++
++// rt 15.5.2013: add a Nyquist-frequency square-wave to kill denormals:
++ y = f->b0 * (x - f->y2) + f->b1 * (f->x1 - f->y1) + f->x2 + f->dn;
++ f->dn = -f->dn;
++
++// see previous commment
++// y = flush_to_zero(y);
++
++ f->x2 = f->x1;
++ f->x1 = x;
++ f->y2 = f->y1;
++ f->y1 = y;
++
++ return y;
++}
++
++// routine that runs a bilinear (i.e. 1st-order) digital filter
++static inline bq_t bilin_run(bilin *f, const bq_t x) {
++ bq_t y;
++
++// rt 15.5.2013: add a Nyquist-frequency square-wave to kill denormals:
++ y = f->b0 * x + f->b1 * f->x1 + f->a1 * f->y1 + f->dn;
++ f->dn = -f->dn;
++
++// see previous commment
++// y = flush_to_zero(y);
++
++ f->x1 = x;
++ f->y1 = y;
++
++ return y;
++}
++
++// rt 2.9.2013: special version of bilin_run for 2nd-order
++// allpass; takes advantage of factoring to reduce floating-point
++// multiplications from 5 to 2
++static inline bq_t ap1_run(bilin *f, const bq_t x) {
++ bq_t y;
++
++// rt 15.5.2013: adding a Nyquist-frequency square-wave to kill denormals:
++ y = f->b0 * (x - f->y1) + f->x1 + f->dn;
++ f->dn = -f->dn;
++
++// see previous commment
++// y = flush_to_zero(y);
++
++ f->x1 = x;
++ f->y1 = y;
++
++ return y;
++}
++
++#endif
+diff --git a/include/ladspa-util.h b/include/ladspa-util.h
+new file mode 100644
+index 0000000..2f3264e
+--- /dev/null
++++ b/include/ladspa-util.h
+@@ -0,0 +1,211 @@
++/* Some misc util functions for audio DSP work, written by Steve Harris,
++ * December 2000
++ *
++ * steve AT plugin.org.uk
++ */
++
++#ifndef LADSPA_UTIL_H
++#define LADSPA_UTIL_H
++
++#include <math.h>
++#include <stdint.h>
++
++// 16.16 fixpoint
++typedef union {
++ int32_t all;
++ struct {
++#ifdef WORDS_BIGENDIAN
++ int16_t in;
++ uint16_t fr;
++#else
++ uint16_t fr;
++ int16_t in;
++#endif
++ } part;
++} fixp16;
++
++// 32.32 fixpoint
++typedef union {
++ int64_t all;
++ struct {
++#ifdef WORDS_BIGENDIAN
++ int32_t in;
++ uint32_t fr;
++#else
++ uint32_t fr;
++ int32_t in;
++#endif
++ } part;
++} fixp32;
++
++/* 32 bit "pointer cast" union */
++typedef union {
++ float f;
++ int32_t i;
++} ls_pcast32;
++
++// 1.0 / ln(2)
++#define LN2R 1.442695041f
++
++/* detet floating point denormal numbers by comparing them to the smallest
++ * normal, crap, but reliable */
++#define DN_CHECK(x, l) if (fabs(x) < 1e-38) printf("DN: "l"\n")
++
++// Denormalise floats, only actually needed for PIII and recent PowerPC
++//#define FLUSH_TO_ZERO(fv) (((*(unsigned
int*)&(fv))&0x7f800000)==0)?0.0f:(fv)
++
++static inline float flush_to_zero(float f)
++{
++ ls_pcast32 v;
++
++ v.f = f;
++
++ // original: return (v.i & 0x7f800000) == 0 ? 0.0f : f;
++ // version from Tim Blechmann
++ return (v.i & 0x7f800000) < 0x08000000 ? 0.0f : f;
++}
++
++static inline void round_to_zero(volatile float *f)
++{
++ *f += 1e-18f;
++ *f -= 1e-18f;
++}
++
++/* A set of branchless clipping operations from Laurent de Soras */
++
++static inline float f_max(float x, float a)
++{
++ x -= a;
++ x += fabsf(x);
++ x *= 0.5f;
++ x += a;
++
++ return x;
++}
++
++static inline float f_min(float x, float b)
++{
++ x = b - x;
++ x += fabsf(x);
++ x *= 0.5f;
++ x = b - x;
++
++ return x;
++}
++
++static inline float f_clamp(float x, float a, float b)
++{
++ const float x1 = fabsf(x - a);
++ const float x2 = fabsf(x - b);
++
++ x = x1 + a + b;
++ x -= x2;
++ x *= 0.5f;
++
++ return x;
++}
++
++// Limit a value to be l<=v<=u
++#define LIMIT(v,l,u) ((v)<(l)?(l):((v)>(u)?(u):(v)))
++
++// Truncate-to-zero modulo (ANSI C doesn't specify) will only work
++// if -m < v < 2m
++#define MOD(v,m) (v<0?v+m:(v>=m?v-m:v))
++
++// Truncate-to-zero modulo (ANSI C doesn't specify) will only work
++// if v > -m and v < m
++#define NEG_MOD(v,m) ((v)<0?((v)+(m)):(v))
++
++// Convert a value in dB's to a coefficent
++#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f)
++#define CO_DB(v) (20.0f * log10f(v))
++
++// Linearly interpolate [ = a * (1 - f) + b * f]
++#define LIN_INTERP(f,a,b) ((a) + (f) * ((b) - (a)))
++
++// Cubic interpolation function
++static inline float cube_interp(const float fr, const float inm1, const
float
++ in, const float inp1, const float inp2)
++{
++ return in + 0.5f * fr * (inp1 - inm1 +
++ fr * (4.0f * inp1 + 2.0f * inm1 - 5.0f * in - inp2 +
++ fr * (3.0f * (in - inp1) - inm1 + inp2)));
++}
++
++/* fast sin^2 aproxiamtion, adapted from jan AT rpgfan's posting to the
++ * music-dsp list */
++static inline float f_sin_sq(float angle)
++{
++ const float asqr = angle * angle;
++ float result = -2.39e-08f;
++
++ result *= asqr;
++ result += 2.7526e-06f;
++ result *= asqr;
++ result -= 1.98409e-04f;
++ result *= asqr;
++ result += 8.3333315e-03f;
++ result *= asqr;
++ result -= 1.666666664e-01f;
++ result *= asqr;
++ result += 1.0f;
++ result *= angle;
++
++ return result * result;
++}
++
++#define f_round(f) lrintf(f)
++
++// Truncate float to int
++static inline long int f_trunc(float f)
++{
++ return f_round(floorf(f));
++}
++
++/* Andrew Simper's pow(2, x) aproximation from the music-dsp list */
++
++#if 0
++
++/* original */
++static inline float f_pow2(float x)
++{
++ long *px = (long*)(&x); // store address of float as long pointer
++ const float tx = (x-0.5f) + (3<<22); // temporary value for truncation
++ const long lx = *((long*)&tx) - 0x4b400000; // integer power of 2
++ const float dx = x-(float)(lx); // float remainder of power of 2
++
++ x = 1.0f + dx*(0.6960656421638072f + // cubic apporoximation of 2^x
++ dx*(0.224494337302845f + // for x in the range [0, 1]
++ dx*(0.07944023841053369f)));
++ *px += (lx<<23); // add integer power of 2 to exponent
++
++ return x;
++}
++
++#else
++
++/* union version */
++static inline float f_pow2(float x)
++{
++ ls_pcast32 *px, tx, lx;
++ float dx;
++
++ px = (ls_pcast32 *)&x; // store address of float as long pointer
++ tx.f = (x-0.5f) + (3<<22); // temporary value for truncation
++ lx.i = tx.i - 0x4b400000; // integer power of 2
++ dx = x - (float)lx.i; // float remainder of power of 2
++
++ x = 1.0f + dx * (0.6960656421638072f + // cubic apporoximation of 2^x
++ dx * (0.224494337302845f + // for x in the range [0, 1]
++ dx * (0.07944023841053369f)));
++ (*px).i += (lx.i << 23); // add integer power of 2 to exponent
++
++ return (*px).f;
++}
++
++#endif
++
++/* Fast exponentiation function, y = e^x */
++#define f_exp(x) f_pow2(x * LN2R)
++
++#endif
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+new file mode 100644
+index 0000000..aa896e7
+--- /dev/null
++++ b/src/CMakeLists.txt
+@@ -0,0 +1,26 @@
++include_directories(${PROJECT_SOURCE_DIR}/include)
++
++option(USE_SSE2 "use SSE2 instructions to avoid floating point
denormalization issues" on)
++
++add_library(RTallpass1 MODULE RTallpass1.c)
++add_library(RTallpass2 MODULE RTallpass2.c)
++
++add_library(RTlowpass MODULE RTlowpass.c)
++add_library(RThighpass MODULE RThighpass.c)
++
++add_library(RTlowshelf MODULE RTlowshelf.c)
++add_library(RThighshelf MODULE RThighshelf.c)
++
++add_library(RTlr4hipass MODULE RTlr4hipass.c)
++add_library(RTlr4lowpass MODULE RTlr4lowpass.c)
++
++add_library(RTparaeq MODULE RTparaeq.c)
++
++set_target_properties(RTallpass1 RTallpass2 RTlowpass RThighpass RTlowshelf
RThighshelf RTlr4hipass RTlr4lowpass RTparaeq
++ PROPERTIES LINK_FLAGS "-nostartfiles")
++if(USE_SSE2)
++ set_target_properties(RTallpass1 RTallpass2 RTlowpass RThighpass
RTlowshelf RThighshelf RTlr4hipass RTlr4lowpass RTparaeq
++ PROPERTIES COMPILE_FLAGS "-msse2 -mfpmath=sse")
++endif()
++install(TARGETS RTallpass1 RTallpass2 RTlowpass RThighpass RTlowshelf
RThighshelf RTlr4hipass RTlr4lowpass RTparaeq
++ LIBRARY DESTINATION lib/ladspa)
+diff --git a/src/RTallpass1.c b/src/RTallpass1.c
+new file mode 100644
+index 0000000..8bbae7f
+--- /dev/null
++++ b/src/RTallpass1.c
+@@ -0,0 +1,231 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define ALLPASS1_FC 0
++#define ALLPASS1_INPUT 1
++#define ALLPASS1_OUTPUT 2
++
++static LADSPA_Descriptor *allPassDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *fc;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ bilin * filter;
++ float fs;
++} AllPass;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return allPassDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateAllPass(LADSPA_Handle instance) {
++ AllPass *plugin_data = (AllPass *)instance;
++ bilin *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ bilin_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupAllPass(LADSPA_Handle instance) {
++ AllPass *plugin_data = (AllPass *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortAllPass(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ AllPass *plugin;
++
++ plugin = (AllPass *)instance;
++ switch (port) {
++ case ALLPASS1_FC:
++ plugin->fc = data;
++ break;
++ case ALLPASS1_INPUT:
++ plugin->input = data;
++ break;
++ case ALLPASS1_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateAllPass(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ AllPass *plugin_data = (AllPass *)malloc(sizeof(AllPass));
++ bilin *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(bilin));
++ bilin_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runAllPass(LADSPA_Handle instance, unsigned long sample_count) {
++ AllPass *plugin_data = (AllPass *)instance;
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++
++ bilin * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ ap1_set_params(filter, fc, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ // RT 2.9.2013: replace biquad_run with ap1_run to cut
floating-
++ // point multiplications from 3 to 1:
++ buffer_write(output[pos], (LADSPA_Data) ap1_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ allPassDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (allPassDescriptor) {
++ allPassDescriptor->UniqueID = 9010;
++ allPassDescriptor->Label = "RTallpass1";
++ allPassDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ allPassDescriptor->Name =
++ D_("RT First Order Allpass");
++ allPassDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ allPassDescriptor->Copyright =
++ "GPL";
++ allPassDescriptor->PortCount = 3;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
++ sizeof(LADSPA_PortDescriptor));
++ allPassDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
++ sizeof(LADSPA_PortRangeHint));
++ allPassDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(3, sizeof(char*));
++ allPassDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[ALLPASS1_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[ALLPASS1_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[ALLPASS1_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[ALLPASS1_FC].LowerBound = 0.0;
++ port_range_hints[ALLPASS1_FC].UpperBound = (LADSPA_Data) 0.4;
++
++ /* Parameters for Input */
++ port_descriptors[ALLPASS1_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[ALLPASS1_INPUT] =
++ D_("Input");
++ port_range_hints[ALLPASS1_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[ALLPASS1_INPUT].LowerBound = -1.0;
++ port_range_hints[ALLPASS1_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[ALLPASS1_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[ALLPASS1_OUTPUT] =
++ D_("Output");
++ port_range_hints[ALLPASS1_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[ALLPASS1_OUTPUT].LowerBound = -1.0;
++ port_range_hints[ALLPASS1_OUTPUT].UpperBound = +1.0;
++
++ allPassDescriptor->activate = activateAllPass;
++ allPassDescriptor->cleanup = cleanupAllPass;
++ allPassDescriptor->connect_port = connectPortAllPass;
++ allPassDescriptor->deactivate = NULL;
++ allPassDescriptor->instantiate = instantiateAllPass;
++ allPassDescriptor->run = runAllPass;
++ allPassDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (allPassDescriptor) {
++ free((LADSPA_PortDescriptor
*)allPassDescriptor->PortDescriptors);
++ free((char **)allPassDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)allPassDescriptor->PortRangeHints);
++ free(allPassDescriptor);
++ }
++
++}
++
+diff --git a/src/RTallpass2.c b/src/RTallpass2.c
+new file mode 100644
+index 0000000..d663b28
+--- /dev/null
++++ b/src/RTallpass2.c
+@@ -0,0 +1,250 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define ALLPASS_FC 0
++#define ALLPASS_Q 1
++#define ALLPASS_INPUT 2
++#define ALLPASS_OUTPUT 3
++
++static LADSPA_Descriptor *allPassDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *gain;
++ LADSPA_Data *fc;
++ LADSPA_Data *Q;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filter;
++ float fs;
++} AllPass;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return allPassDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateAllPass(LADSPA_Handle instance) {
++ AllPass *plugin_data = (AllPass *)instance;
++ biquad *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ biquad_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupAllPass(LADSPA_Handle instance) {
++ AllPass *plugin_data = (AllPass *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortAllPass(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ AllPass *plugin;
++
++ plugin = (AllPass *)instance;
++ switch (port) {
++ case ALLPASS_FC:
++ plugin->fc = data;
++ break;
++ case ALLPASS_Q:
++ plugin->Q = data;
++ break;
++ case ALLPASS_INPUT:
++ plugin->input = data;
++ break;
++ case ALLPASS_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateAllPass(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ AllPass *plugin_data = (AllPass *)malloc(sizeof(AllPass));
++ biquad *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(biquad));
++ biquad_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runAllPass(LADSPA_Handle instance, unsigned long sample_count) {
++ AllPass *plugin_data = (AllPass *)instance;
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Bandwidth (octaves) (float value) */
++ const LADSPA_Data Q = *(plugin_data->Q);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++
++ biquad * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ ap_set_params(filter, fc, Q, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ // RT 2.9.2013: replace biquad_run with ap2_run to cut
floating-
++ // point multiplications from 5 to 2:
++ buffer_write(output[pos], (LADSPA_Data) ap2_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ allPassDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (allPassDescriptor) {
++ allPassDescriptor->UniqueID = 9005;
++ allPassDescriptor->Label = "RTallpass2";
++ allPassDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ allPassDescriptor->Name =
++ D_("RT Biquad Allpass");
++ allPassDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ allPassDescriptor->Copyright =
++ "GPL";
++ allPassDescriptor->PortCount = 4;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
++ sizeof(LADSPA_PortDescriptor));
++ allPassDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
++ sizeof(LADSPA_PortRangeHint));
++ allPassDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(4, sizeof(char*));
++ allPassDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[ALLPASS_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[ALLPASS_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[ALLPASS_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[ALLPASS_FC].LowerBound = 0;
++ port_range_hints[ALLPASS_FC].UpperBound = (LADSPA_Data) 0.4;
++
++ /* Parameters for Bandwidth (octaves) */
++ port_descriptors[ALLPASS_Q] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[ALLPASS_Q] =
++ D_("Q");
++ port_range_hints[ALLPASS_Q].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[ALLPASS_Q].LowerBound = 0;
++ port_range_hints[ALLPASS_Q].UpperBound = 10;
++
++ /* Parameters for Input */
++ port_descriptors[ALLPASS_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[ALLPASS_INPUT] =
++ D_("Input");
++ port_range_hints[ALLPASS_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[ALLPASS_INPUT].LowerBound = -1.0;
++ port_range_hints[ALLPASS_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[ALLPASS_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[ALLPASS_OUTPUT] =
++ D_("Output");
++ port_range_hints[ALLPASS_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[ALLPASS_OUTPUT].LowerBound = -1.0;
++ port_range_hints[ALLPASS_OUTPUT].UpperBound = +1.0;
++
++ allPassDescriptor->activate = activateAllPass;
++ allPassDescriptor->cleanup = cleanupAllPass;
++ allPassDescriptor->connect_port = connectPortAllPass;
++ allPassDescriptor->deactivate = NULL;
++ allPassDescriptor->instantiate = instantiateAllPass;
++ allPassDescriptor->run = runAllPass;
++ allPassDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (allPassDescriptor) {
++ free((LADSPA_PortDescriptor
*)allPassDescriptor->PortDescriptors);
++ free((char **)allPassDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)allPassDescriptor->PortRangeHints);
++ free(allPassDescriptor);
++ }
++
++}
++
+diff --git a/src/RThighpass.c b/src/RThighpass.c
+new file mode 100644
+index 0000000..3cf29c5
+--- /dev/null
++++ b/src/RThighpass.c
+@@ -0,0 +1,246 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define HIGHPASS_FC 0
++#define HIGHPASS_Q 1
++#define HIGHPASS_INPUT 2
++#define HIGHPASS_OUTPUT 3
++
++static LADSPA_Descriptor *highPassDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *fc;
++ LADSPA_Data *Q;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filter;
++ float fs;
++} HighPass;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return highPassDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateHighPass(LADSPA_Handle instance) {
++ HighPass *plugin_data = (HighPass *)instance;
++ biquad *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ biquad_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupHighPass(LADSPA_Handle instance) {
++ HighPass *plugin_data = (HighPass *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortHighPass(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ HighPass *plugin;
++
++ plugin = (HighPass *)instance;
++ switch (port) {
++ case HIGHPASS_FC:
++ plugin->fc = data;
++ break;
++ case HIGHPASS_Q:
++ plugin->Q = data;
++ break;
++ case HIGHPASS_INPUT:
++ plugin->input = data;
++ break;
++ case HIGHPASS_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateHighPass(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ HighPass *plugin_data = (HighPass *)malloc(sizeof(HighPass));
++ biquad *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(biquad));
++ biquad_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runHighPass(LADSPA_Handle instance, unsigned long sample_count)
{
++ HighPass *plugin_data = (HighPass *)instance;
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Bandwidth (octaves) (float value) */
++ const LADSPA_Data Q = *(plugin_data->Q);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ hp_set_params(filter, fc, Q, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ highPassDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (highPassDescriptor) {
++ highPassDescriptor->UniqueID = 9007;
++ highPassDescriptor->Label = "RThighpass";
++ highPassDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ highPassDescriptor->Name =
++ D_("RT 2nd-order highpass");
++ highPassDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ highPassDescriptor->Copyright =
++ "GPL";
++ highPassDescriptor->PortCount = 4;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
++ sizeof(LADSPA_PortDescriptor));
++ highPassDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
++ sizeof(LADSPA_PortRangeHint));
++ highPassDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(4, sizeof(char*));
++ highPassDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[HIGHPASS_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[HIGHPASS_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[HIGHPASS_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[HIGHPASS_FC].LowerBound = 0;
++ port_range_hints[HIGHPASS_FC].UpperBound = (LADSPA_Data) 0.4;
++
++ /* Parameters for Q */
++ port_descriptors[HIGHPASS_Q] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[HIGHPASS_Q] =
++ D_("Q");
++ port_range_hints[HIGHPASS_Q].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[HIGHPASS_Q].LowerBound = 0;
++ port_range_hints[HIGHPASS_Q].UpperBound = 5;
++
++ /* Parameters for Input */
++ port_descriptors[HIGHPASS_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[HIGHPASS_INPUT] =
++ D_("Input");
++ port_range_hints[HIGHPASS_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[HIGHPASS_INPUT].LowerBound = -1.0;
++ port_range_hints[HIGHPASS_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[HIGHPASS_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[HIGHPASS_OUTPUT] =
++ D_("Output");
++ port_range_hints[HIGHPASS_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[HIGHPASS_OUTPUT].LowerBound = -1.0;
++ port_range_hints[HIGHPASS_OUTPUT].UpperBound = +1.0;
++
++ highPassDescriptor->activate = activateHighPass;
++ highPassDescriptor->cleanup = cleanupHighPass;
++ highPassDescriptor->connect_port = connectPortHighPass;
++ highPassDescriptor->deactivate = NULL;
++ highPassDescriptor->instantiate = instantiateHighPass;
++ highPassDescriptor->run = runHighPass;
++ highPassDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (highPassDescriptor) {
++ free((LADSPA_PortDescriptor
*)highPassDescriptor->PortDescriptors);
++ free((char **)highPassDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)highPassDescriptor->PortRangeHints);
++ free(highPassDescriptor);
++ }
++
++}
++
+diff --git a/src/RThighshelf.c b/src/RThighshelf.c
+new file mode 100644
+index 0000000..399aaf2
+--- /dev/null
++++ b/src/RThighshelf.c
+@@ -0,0 +1,264 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define HIGHSHELF_GAIN 0
++#define HIGHSHELF_FC 1
++#define HIGHSHELF_Q 2
++#define HIGHSHELF_INPUT 3
++#define HIGHSHELF_OUTPUT 4
++
++static LADSPA_Descriptor *highShelfDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *gain;
++ LADSPA_Data *fc;
++ LADSPA_Data *Q;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filter;
++ float fs;
++} HighShelf;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return highShelfDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateHighShelf(LADSPA_Handle instance) {
++ HighShelf *plugin_data = (HighShelf *)instance;
++ biquad *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ biquad_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupHighShelf(LADSPA_Handle instance) {
++ HighShelf *plugin_data = (HighShelf *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortHighShelf(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ HighShelf *plugin;
++
++ plugin = (HighShelf *)instance;
++ switch (port) {
++ case HIGHSHELF_GAIN:
++ plugin->gain = data;
++ break;
++ case HIGHSHELF_FC:
++ plugin->fc = data;
++ break;
++ case HIGHSHELF_Q:
++ plugin->Q = data;
++ break;
++ case HIGHSHELF_INPUT:
++ plugin->input = data;
++ break;
++ case HIGHSHELF_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateHighShelf(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ HighShelf *plugin_data = (HighShelf *)malloc(sizeof(HighShelf));
++ biquad *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(biquad));
++ biquad_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runHighShelf(LADSPA_Handle instance, unsigned long
sample_count) {
++ HighShelf *plugin_data = (HighShelf *)instance;
++
++ /* Gain (dB) (float value) */
++ const LADSPA_Data gain = *(plugin_data->gain);
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Bandwidth (octaves) (float value) */
++ const LADSPA_Data Q = *(plugin_data->Q);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ hs_set_params(filter, fc, gain, Q, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ highShelfDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (highShelfDescriptor) {
++ highShelfDescriptor->UniqueID = 9003;
++ highShelfDescriptor->Label = "RThighshelf";
++ highShelfDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ highShelfDescriptor->Name =
++ D_("RT High Shelf");
++ highShelfDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ highShelfDescriptor->Copyright =
++ "GPL";
++ highShelfDescriptor->PortCount = 5;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
++ sizeof(LADSPA_PortDescriptor));
++ highShelfDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
++ sizeof(LADSPA_PortRangeHint));
++ highShelfDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(5, sizeof(char*));
++ highShelfDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Gain (dB) */
++ port_descriptors[HIGHSHELF_GAIN] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[HIGHSHELF_GAIN] =
++ D_("Gain (dB)");
++ port_range_hints[HIGHSHELF_GAIN].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_0;
++ port_range_hints[HIGHSHELF_GAIN].LowerBound = -70;
++ port_range_hints[HIGHSHELF_GAIN].UpperBound = +30;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[HIGHSHELF_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[HIGHSHELF_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[HIGHSHELF_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[HIGHSHELF_FC].LowerBound = 0;
++ port_range_hints[HIGHSHELF_FC].UpperBound = (LADSPA_Data) 0.4;
++
++ /* Parameters for Quality Factor */
++ port_descriptors[HIGHSHELF_Q] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[HIGHSHELF_Q] =
++ D_("Q");
++ port_range_hints[HIGHSHELF_Q].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[HIGHSHELF_Q].LowerBound = 0;
++ port_range_hints[HIGHSHELF_Q].UpperBound = 5;
++
++ /* Parameters for Input */
++ port_descriptors[HIGHSHELF_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[HIGHSHELF_INPUT] =
++ D_("Input");
++ port_range_hints[HIGHSHELF_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[HIGHSHELF_INPUT].LowerBound = -1.0;
++ port_range_hints[HIGHSHELF_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[HIGHSHELF_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[HIGHSHELF_OUTPUT] =
++ D_("Output");
++ port_range_hints[HIGHSHELF_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[HIGHSHELF_OUTPUT].LowerBound = -1.0;
++ port_range_hints[HIGHSHELF_OUTPUT].UpperBound = +1.0;
++
++ highShelfDescriptor->activate = activateHighShelf;
++ highShelfDescriptor->cleanup = cleanupHighShelf;
++ highShelfDescriptor->connect_port = connectPortHighShelf;
++ highShelfDescriptor->deactivate = NULL;
++ highShelfDescriptor->instantiate = instantiateHighShelf;
++ highShelfDescriptor->run = runHighShelf;
++ highShelfDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (highShelfDescriptor) {
++ free((LADSPA_PortDescriptor
*)highShelfDescriptor->PortDescriptors);
++ free((char **)highShelfDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)highShelfDescriptor->PortRangeHints);
++ free(highShelfDescriptor);
++ }
++
++}
++
+diff --git a/src/RTlowpass.c b/src/RTlowpass.c
+new file mode 100644
+index 0000000..b98a8a6
+--- /dev/null
++++ b/src/RTlowpass.c
+@@ -0,0 +1,246 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define LOWPASS_FC 0
++#define LOWPASS_Q 1
++#define LOWPASS_INPUT 2
++#define LOWPASS_OUTPUT 3
++
++static LADSPA_Descriptor *lowPassDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *fc;
++ LADSPA_Data *Q;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filter;
++ float fs;
++} LowPass;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return lowPassDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateLowPass(LADSPA_Handle instance) {
++ LowPass *plugin_data = (LowPass *)instance;
++ biquad *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ biquad_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupLowPass(LADSPA_Handle instance) {
++ LowPass *plugin_data = (LowPass *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortLowPass(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ LowPass *plugin;
++
++ plugin = (LowPass *)instance;
++ switch (port) {
++ case LOWPASS_FC:
++ plugin->fc = data;
++ break;
++ case LOWPASS_Q:
++ plugin->Q = data;
++ break;
++ case LOWPASS_INPUT:
++ plugin->input = data;
++ break;
++ case LOWPASS_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateLowPass(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ LowPass *plugin_data = (LowPass *)malloc(sizeof(LowPass));
++ biquad *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(biquad));
++ biquad_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runLowPass(LADSPA_Handle instance, unsigned long sample_count) {
++ LowPass *plugin_data = (LowPass *)instance;
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Bandwidth (octaves) (float value) */
++ const LADSPA_Data Q = *(plugin_data->Q);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ lp_set_params(filter, fc, Q, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ lowPassDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (lowPassDescriptor) {
++ lowPassDescriptor->UniqueID = 9006;
++ lowPassDescriptor->Label = "RTlowpass";
++ lowPassDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ lowPassDescriptor->Name =
++ D_("RT 2nd-order lowpass");
++ lowPassDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ lowPassDescriptor->Copyright =
++ "GPL";
++ lowPassDescriptor->PortCount = 4;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
++ sizeof(LADSPA_PortDescriptor));
++ lowPassDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
++ sizeof(LADSPA_PortRangeHint));
++ lowPassDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(4, sizeof(char*));
++ lowPassDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[LOWPASS_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LOWPASS_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[LOWPASS_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[LOWPASS_FC].LowerBound = 0;
++ port_range_hints[LOWPASS_FC].UpperBound = (LADSPA_Data) 0.4;
++
++ /* Parameters for Q */
++ port_descriptors[LOWPASS_Q] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LOWPASS_Q] =
++ D_("Q");
++ port_range_hints[LOWPASS_Q].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[LOWPASS_Q].LowerBound = 0;
++ port_range_hints[LOWPASS_Q].UpperBound = 5;
++
++ /* Parameters for Input */
++ port_descriptors[LOWPASS_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[LOWPASS_INPUT] =
++ D_("Input");
++ port_range_hints[LOWPASS_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LOWPASS_INPUT].LowerBound = -1.0;
++ port_range_hints[LOWPASS_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[LOWPASS_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[LOWPASS_OUTPUT] =
++ D_("Output");
++ port_range_hints[LOWPASS_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LOWPASS_OUTPUT].LowerBound = -1.0;
++ port_range_hints[LOWPASS_OUTPUT].UpperBound = +1.0;
++
++ lowPassDescriptor->activate = activateLowPass;
++ lowPassDescriptor->cleanup = cleanupLowPass;
++ lowPassDescriptor->connect_port = connectPortLowPass;
++ lowPassDescriptor->deactivate = NULL;
++ lowPassDescriptor->instantiate = instantiateLowPass;
++ lowPassDescriptor->run = runLowPass;
++ lowPassDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (lowPassDescriptor) {
++ free((LADSPA_PortDescriptor
*)lowPassDescriptor->PortDescriptors);
++ free((char **)lowPassDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)lowPassDescriptor->PortRangeHints);
++ free(lowPassDescriptor);
++ }
++
++}
++
+diff --git a/src/RTlowshelf.c b/src/RTlowshelf.c
+new file mode 100644
+index 0000000..e6265b5
+--- /dev/null
++++ b/src/RTlowshelf.c
+@@ -0,0 +1,264 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define LOWSHELF_GAIN 0
++#define LOWSHELF_FC 1
++#define LOWSHELF_Q 2
++#define LOWSHELF_INPUT 3
++#define LOWSHELF_OUTPUT 4
++
++static LADSPA_Descriptor *lowShelfDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *gain;
++ LADSPA_Data *fc;
++ LADSPA_Data *Q;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filter;
++ float fs;
++} LowShelf;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return lowShelfDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateLowShelf(LADSPA_Handle instance) {
++ LowShelf *plugin_data = (LowShelf *)instance;
++ biquad *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ biquad_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupLowShelf(LADSPA_Handle instance) {
++ LowShelf *plugin_data = (LowShelf *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortLowShelf(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ LowShelf *plugin;
++
++ plugin = (LowShelf *)instance;
++ switch (port) {
++ case LOWSHELF_GAIN:
++ plugin->gain = data;
++ break;
++ case LOWSHELF_FC:
++ plugin->fc = data;
++ break;
++ case LOWSHELF_Q:
++ plugin->Q = data;
++ break;
++ case LOWSHELF_INPUT:
++ plugin->input = data;
++ break;
++ case LOWSHELF_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateLowShelf(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ LowShelf *plugin_data = (LowShelf *)malloc(sizeof(LowShelf));
++ biquad *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(biquad));
++ biquad_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runLowShelf(LADSPA_Handle instance, unsigned long sample_count)
{
++ LowShelf *plugin_data = (LowShelf *)instance;
++
++ /* Gain (dB) (float value) */
++ const LADSPA_Data gain = *(plugin_data->gain);
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Bandwidth (octaves) (float value) */
++ const LADSPA_Data Q = *(plugin_data->Q);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ ls_set_params(filter, fc, gain, Q, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ lowShelfDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (lowShelfDescriptor) {
++ lowShelfDescriptor->UniqueID = 9002;
++ lowShelfDescriptor->Label = "RTlowshelf";
++ lowShelfDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ lowShelfDescriptor->Name =
++ D_("RT Low Shelf");
++ lowShelfDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ lowShelfDescriptor->Copyright =
++ "GPL";
++ lowShelfDescriptor->PortCount = 5;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
++ sizeof(LADSPA_PortDescriptor));
++ lowShelfDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
++ sizeof(LADSPA_PortRangeHint));
++ lowShelfDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(5, sizeof(char*));
++ lowShelfDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Gain (dB) */
++ port_descriptors[LOWSHELF_GAIN] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LOWSHELF_GAIN] =
++ D_("Gain (dB)");
++ port_range_hints[LOWSHELF_GAIN].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_0;
++ port_range_hints[LOWSHELF_GAIN].LowerBound = -70;
++ port_range_hints[LOWSHELF_GAIN].UpperBound = +30;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[LOWSHELF_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LOWSHELF_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[LOWSHELF_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[LOWSHELF_FC].LowerBound = 0;
++ port_range_hints[LOWSHELF_FC].UpperBound = (LADSPA_Data) 0.4;
++
++ /* Parameters for Quality Factor */
++ port_descriptors[LOWSHELF_Q] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LOWSHELF_Q] =
++ D_("Q");
++ port_range_hints[LOWSHELF_Q].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[LOWSHELF_Q].LowerBound = 0;
++ port_range_hints[LOWSHELF_Q].UpperBound = 5;
++
++ /* Parameters for Input */
++ port_descriptors[LOWSHELF_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[LOWSHELF_INPUT] =
++ D_("Input");
++ port_range_hints[LOWSHELF_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LOWSHELF_INPUT].LowerBound = -1.0;
++ port_range_hints[LOWSHELF_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[LOWSHELF_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[LOWSHELF_OUTPUT] =
++ D_("Output");
++ port_range_hints[LOWSHELF_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LOWSHELF_OUTPUT].LowerBound = -1.0;
++ port_range_hints[LOWSHELF_OUTPUT].UpperBound = +1.0;
++
++ lowShelfDescriptor->activate = activateLowShelf;
++ lowShelfDescriptor->cleanup = cleanupLowShelf;
++ lowShelfDescriptor->connect_port = connectPortLowShelf;
++ lowShelfDescriptor->deactivate = NULL;
++ lowShelfDescriptor->instantiate = instantiateLowShelf;
++ lowShelfDescriptor->run = runLowShelf;
++ lowShelfDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (lowShelfDescriptor) {
++ free((LADSPA_PortDescriptor
*)lowShelfDescriptor->PortDescriptors);
++ free((char **)lowShelfDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)lowShelfDescriptor->PortRangeHints);
++ free(lowShelfDescriptor);
++ }
++
++}
++
+diff --git a/src/RTlr4hipass.c b/src/RTlr4hipass.c
+new file mode 100644
+index 0000000..80dd651
+--- /dev/null
++++ b/src/RTlr4hipass.c
+@@ -0,0 +1,234 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define LR4HIGHPASS_FC 0
++#define LR4HIGHPASS_INPUT 1
++#define LR4HIGHPASS_OUTPUT 2
++
++static LADSPA_Descriptor *lr4highPassDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *fc;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filters;
++ float fs;
++} LR4HighPass;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return lr4highPassDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateLR4HighPass(LADSPA_Handle instance) {
++ LR4HighPass *plugin_data = (LR4HighPass *)instance;
++ biquad *filters = plugin_data->filters;
++ float fs = plugin_data->fs;
++ biquad_init(&filters[0]);
++ biquad_init(&filters[1]);
++ plugin_data->filters = filters;
++ plugin_data->fs = fs;
++}
++
++static void cleanupLR4HighPass(LADSPA_Handle instance) {
++ LR4HighPass *plugin_data = (LR4HighPass *)instance;
++ free(plugin_data->filters);
++ free(instance);
++}
++
++static void connectPortLR4HighPass(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ LR4HighPass *plugin;
++
++ plugin = (LR4HighPass *)instance;
++ switch (port) {
++ case LR4HIGHPASS_FC:
++ plugin->fc = data;
++ break;
++ case LR4HIGHPASS_INPUT:
++ plugin->input = data;
++ break;
++ case LR4HIGHPASS_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateLR4HighPass(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ LR4HighPass *plugin_data = (LR4HighPass *)malloc(sizeof(LR4HighPass));
++ biquad *filters = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++
++ filters = calloc(2, sizeof(biquad));
++ biquad_init(&filters[0]);
++ biquad_init(&filters[1]);
++
++ plugin_data->filters = filters;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runLR4HighPass(LADSPA_Handle instance, unsigned long
sample_count) {
++ LR4HighPass *plugin_data = (LR4HighPass *)instance;
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filters = plugin_data->filters;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++ bq_t in;
++
++ hp_set_params(&filters[0], fc, 0.7071068, fs);
++ hp_set_params(&filters[1], fc, 0.7071068, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ in = biquad_run(&filters[0], input[pos]);
++ in = biquad_run(&filters[1], in);
++ buffer_write(output[pos], (LADSPA_Data) in);
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ lr4highPassDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (lr4highPassDescriptor) {
++ lr4highPassDescriptor->UniqueID = 9021;
++ lr4highPassDescriptor->Label = "RTlr4hipass";
++ lr4highPassDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ lr4highPassDescriptor->Name =
++ D_("RT LR4 highpass");
++ lr4highPassDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ lr4highPassDescriptor->Copyright =
++ "GPL";
++ lr4highPassDescriptor->PortCount = 3;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
++ sizeof(LADSPA_PortDescriptor));
++ lr4highPassDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
++ sizeof(LADSPA_PortRangeHint));
++ lr4highPassDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(3, sizeof(char*));
++ lr4highPassDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[LR4HIGHPASS_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LR4HIGHPASS_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[LR4HIGHPASS_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[LR4HIGHPASS_FC].LowerBound = 0;
++ port_range_hints[LR4HIGHPASS_FC].UpperBound = (LADSPA_Data)
0.4;
++
++ /* Parameters for Input */
++ port_descriptors[LR4HIGHPASS_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[LR4HIGHPASS_INPUT] =
++ D_("Input");
++ port_range_hints[LR4HIGHPASS_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LR4HIGHPASS_INPUT].LowerBound = -1.0;
++ port_range_hints[LR4HIGHPASS_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[LR4HIGHPASS_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[LR4HIGHPASS_OUTPUT] =
++ D_("Output");
++ port_range_hints[LR4HIGHPASS_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LR4HIGHPASS_OUTPUT].LowerBound = -1.0;
++ port_range_hints[LR4HIGHPASS_OUTPUT].UpperBound = +1.0;
++
++ lr4highPassDescriptor->activate = activateLR4HighPass;
++ lr4highPassDescriptor->cleanup = cleanupLR4HighPass;
++ lr4highPassDescriptor->connect_port = connectPortLR4HighPass;
++ lr4highPassDescriptor->deactivate = NULL;
++ lr4highPassDescriptor->instantiate = instantiateLR4HighPass;
++ lr4highPassDescriptor->run = runLR4HighPass;
++ lr4highPassDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (lr4highPassDescriptor) {
++ free((LADSPA_PortDescriptor
*)lr4highPassDescriptor->PortDescriptors);
++ free((char **)lr4highPassDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)lr4highPassDescriptor->PortRangeHints);
++ free(lr4highPassDescriptor);
++ }
++
++}
++
+diff --git a/src/RTlr4lowpass.c b/src/RTlr4lowpass.c
+new file mode 100644
+index 0000000..f1d269e
+--- /dev/null
++++ b/src/RTlr4lowpass.c
+@@ -0,0 +1,234 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define LR4LOWPASS_FC 0
++#define LR4LOWPASS_INPUT 1
++#define LR4LOWPASS_OUTPUT 2
++
++static LADSPA_Descriptor *lr4lowPassDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *fc;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filters;
++ float fs;
++} LR4LowPass;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return lr4lowPassDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateLR4LowPass(LADSPA_Handle instance) {
++ LR4LowPass *plugin_data = (LR4LowPass *)instance;
++ biquad *filters = plugin_data->filters;
++ float fs = plugin_data->fs;
++ biquad_init(&filters[0]);
++ biquad_init(&filters[1]);
++ plugin_data->filters = filters;
++ plugin_data->fs = fs;
++}
++
++static void cleanupLR4LowPass(LADSPA_Handle instance) {
++ LR4LowPass *plugin_data = (LR4LowPass *)instance;
++ free(plugin_data->filters);
++ free(instance);
++}
++
++static void connectPortLR4LowPass(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ LR4LowPass *plugin;
++
++ plugin = (LR4LowPass *)instance;
++ switch (port) {
++ case LR4LOWPASS_FC:
++ plugin->fc = data;
++ break;
++ case LR4LOWPASS_INPUT:
++ plugin->input = data;
++ break;
++ case LR4LOWPASS_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateLR4LowPass(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ LR4LowPass *plugin_data = (LR4LowPass *)malloc(sizeof(LR4LowPass));
++ biquad *filters = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++
++ filters = calloc(2, sizeof(biquad));
++ biquad_init(&filters[0]);
++ biquad_init(&filters[1]);
++
++ plugin_data->filters = filters;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runLR4LowPass(LADSPA_Handle instance, unsigned long
sample_count) {
++ LR4LowPass *plugin_data = (LR4LowPass *)instance;
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filters = plugin_data->filters;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++ bq_t in;
++
++ lp_set_params(&filters[0], fc, 0.7071068, fs);
++ lp_set_params(&filters[1], fc, 0.7071068, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ in = biquad_run(&filters[0], input[pos]);
++ in = biquad_run(&filters[1], in);
++ buffer_write(output[pos], (LADSPA_Data) in);
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ lr4lowPassDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (lr4lowPassDescriptor) {
++ lr4lowPassDescriptor->UniqueID = 9020;
++ lr4lowPassDescriptor->Label = "RTlr4lowpass";
++ lr4lowPassDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ lr4lowPassDescriptor->Name =
++ D_("RT LR4 lowpass");
++ lr4lowPassDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ lr4lowPassDescriptor->Copyright =
++ "GPL";
++ lr4lowPassDescriptor->PortCount = 3;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
++ sizeof(LADSPA_PortDescriptor));
++ lr4lowPassDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
++ sizeof(LADSPA_PortRangeHint));
++ lr4lowPassDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(3, sizeof(char*));
++ lr4lowPassDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[LR4LOWPASS_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[LR4LOWPASS_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[LR4LOWPASS_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[LR4LOWPASS_FC].LowerBound = 0;
++ port_range_hints[LR4LOWPASS_FC].UpperBound = (LADSPA_Data)
0.4;
++
++ /* Parameters for Input */
++ port_descriptors[LR4LOWPASS_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[LR4LOWPASS_INPUT] =
++ D_("Input");
++ port_range_hints[LR4LOWPASS_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LR4LOWPASS_INPUT].LowerBound = -1.0;
++ port_range_hints[LR4LOWPASS_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[LR4LOWPASS_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[LR4LOWPASS_OUTPUT] =
++ D_("Output");
++ port_range_hints[LR4LOWPASS_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[LR4LOWPASS_OUTPUT].LowerBound = -1.0;
++ port_range_hints[LR4LOWPASS_OUTPUT].UpperBound = +1.0;
++
++ lr4lowPassDescriptor->activate = activateLR4LowPass;
++ lr4lowPassDescriptor->cleanup = cleanupLR4LowPass;
++ lr4lowPassDescriptor->connect_port = connectPortLR4LowPass;
++ lr4lowPassDescriptor->deactivate = NULL;
++ lr4lowPassDescriptor->instantiate = instantiateLR4LowPass;
++ lr4lowPassDescriptor->run = runLR4LowPass;
++ lr4lowPassDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (lr4lowPassDescriptor) {
++ free((LADSPA_PortDescriptor
*)lr4lowPassDescriptor->PortDescriptors);
++ free((char **)lr4lowPassDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)lr4lowPassDescriptor->PortRangeHints);
++ free(lr4lowPassDescriptor);
++ }
++
++}
++
+diff --git a/src/RTparaeq.c b/src/RTparaeq.c
+new file mode 100644
+index 0000000..5376d64
+--- /dev/null
++++ b/src/RTparaeq.c
+@@ -0,0 +1,264 @@
++/* Copyright 2013 Richard Taylor
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ CREDITS:
++
++ Much of the code here was adapted from Steve Harris's swh-plugins
++ (version 0.4.15) found at http://plugin.org.uk/. Thanks Steve for
++ making your code available.
++
++ The guts of the code, in util/biquad.h, is an implementation
++ of the biquad filters described in Robert Bristow-Johnson's "Cookbook
++ formulae for audio EQ biquad filter coefficients" found here:
++ http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
++*/
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <math.h>
++
++#include <ladspa.h>
++
++#include "biquad.h"
++
++#define SINGLEPARA_GAIN 0
++#define SINGLEPARA_FC 1
++#define SINGLEPARA_Q 2
++#define SINGLEPARA_INPUT 3
++#define SINGLEPARA_OUTPUT 4
++
++static LADSPA_Descriptor *singleParaDescriptor = NULL;
++
++typedef struct {
++ LADSPA_Data *gain;
++ LADSPA_Data *fc;
++ LADSPA_Data *Q;
++ LADSPA_Data *input;
++ LADSPA_Data *output;
++ biquad * filter;
++ float fs;
++} SinglePara;
++
++const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
++ switch (index) {
++ case 0:
++ return singleParaDescriptor;
++ default:
++ return NULL;
++ }
++}
++
++static void activateSinglePara(LADSPA_Handle instance) {
++ SinglePara *plugin_data = (SinglePara *)instance;
++ biquad *filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++ biquad_init(filter);
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++}
++
++static void cleanupSinglePara(LADSPA_Handle instance) {
++ SinglePara *plugin_data = (SinglePara *)instance;
++ free(plugin_data->filter);
++ free(instance);
++}
++
++static void connectPortSinglePara(
++ LADSPA_Handle instance,
++ unsigned long port,
++ LADSPA_Data *data) {
++ SinglePara *plugin;
++
++ plugin = (SinglePara *)instance;
++ switch (port) {
++ case SINGLEPARA_GAIN:
++ plugin->gain = data;
++ break;
++ case SINGLEPARA_FC:
++ plugin->fc = data;
++ break;
++ case SINGLEPARA_Q:
++ plugin->Q = data;
++ break;
++ case SINGLEPARA_INPUT:
++ plugin->input = data;
++ break;
++ case SINGLEPARA_OUTPUT:
++ plugin->output = data;
++ break;
++ }
++}
++
++static LADSPA_Handle instantiateSinglePara(
++ const LADSPA_Descriptor *descriptor,
++ unsigned long s_rate) {
++ SinglePara *plugin_data = (SinglePara *)malloc(sizeof(SinglePara));
++ biquad *filter = NULL;
++ float fs;
++
++ fs = (float)s_rate;
++ filter = malloc(sizeof(biquad));
++ biquad_init(filter);
++
++ plugin_data->filter = filter;
++ plugin_data->fs = fs;
++
++ return (LADSPA_Handle)plugin_data;
++}
++
++#undef buffer_write
++#define buffer_write(b, v) (b = v)
++
++static void runSinglePara(LADSPA_Handle instance, unsigned long
sample_count) {
++ SinglePara *plugin_data = (SinglePara *)instance;
++
++ /* Gain (dB) (float value) */
++ const LADSPA_Data gain = *(plugin_data->gain);
++
++ /* Frequency (Hz) (float value) */
++ const LADSPA_Data fc = *(plugin_data->fc);
++
++ /* Quality factor (float value) */
++ const LADSPA_Data Q = *(plugin_data->Q);
++
++ /* Input (array of floats of length sample_count) */
++ const LADSPA_Data * const input = plugin_data->input;
++
++ /* Output (array of floats of length sample_count) */
++ LADSPA_Data * const output = plugin_data->output;
++ biquad * filter = plugin_data->filter;
++ float fs = plugin_data->fs;
++
++ unsigned long pos;
++
++ eq_set_params(filter, fc, gain, Q, fs);
++
++ for (pos = 0; pos < sample_count; pos++) {
++ buffer_write(output[pos], (LADSPA_Data) biquad_run(filter,
input[pos]));
++ }
++
++}
++
++void _init(void);
++void _init(void) {
++ char **port_names;
++ LADSPA_PortDescriptor *port_descriptors;
++ LADSPA_PortRangeHint *port_range_hints;
++
++#define D_(s) (s)
++
++ singleParaDescriptor =
++ (LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
++
++ if (singleParaDescriptor) {
++ singleParaDescriptor->UniqueID = 9001;
++ singleParaDescriptor->Label = "RTparaeq";
++ singleParaDescriptor->Properties =
++ LADSPA_PROPERTY_HARD_RT_CAPABLE;
++ singleParaDescriptor->Name =
++ D_("RT parametric eq");
++ singleParaDescriptor->Maker =
++ "Richard Taylor <rtaylor AT tru.ca>";
++ singleParaDescriptor->Copyright =
++ "GPL";
++ singleParaDescriptor->PortCount = 5;
++
++ port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
++ sizeof(LADSPA_PortDescriptor));
++ singleParaDescriptor->PortDescriptors =
++ (const LADSPA_PortDescriptor *)port_descriptors;
++
++ port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
++ sizeof(LADSPA_PortRangeHint));
++ singleParaDescriptor->PortRangeHints =
++ (const LADSPA_PortRangeHint *)port_range_hints;
++
++ port_names = (char **)calloc(5, sizeof(char*));
++ singleParaDescriptor->PortNames =
++ (const char **)port_names;
++
++ /* Parameters for Gain (dB) */
++ port_descriptors[SINGLEPARA_GAIN] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[SINGLEPARA_GAIN] =
++ D_("Gain (dB)");
++ port_range_hints[SINGLEPARA_GAIN].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[SINGLEPARA_GAIN].LowerBound = -70;
++ port_range_hints[SINGLEPARA_GAIN].UpperBound = +30;
++
++ /* Parameters for Frequency (Hz) */
++ port_descriptors[SINGLEPARA_FC] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[SINGLEPARA_FC] =
++ D_("Frequency (Hz)");
++ port_range_hints[SINGLEPARA_FC].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
++ port_range_hints[SINGLEPARA_FC].LowerBound = 0;
++ port_range_hints[SINGLEPARA_FC].UpperBound = (LADSPA_Data)
0.4;
++
++ /* Parameters for Quality Factor */
++ port_descriptors[SINGLEPARA_Q] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
++ port_names[SINGLEPARA_Q] =
++ D_("Q");
++ port_range_hints[SINGLEPARA_Q].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE |
LADSPA_HINT_DEFAULT_1;
++ port_range_hints[SINGLEPARA_Q].LowerBound = 0;
++ port_range_hints[SINGLEPARA_Q].UpperBound = 100;
++
++ /* Parameters for Input */
++ port_descriptors[SINGLEPARA_INPUT] =
++ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
++ port_names[SINGLEPARA_INPUT] =
++ D_("Input");
++ port_range_hints[SINGLEPARA_INPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[SINGLEPARA_INPUT].LowerBound = -1.0;
++ port_range_hints[SINGLEPARA_INPUT].UpperBound = +1.0;
++
++ /* Parameters for Output */
++ port_descriptors[SINGLEPARA_OUTPUT] =
++ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
++ port_names[SINGLEPARA_OUTPUT] =
++ D_("Output");
++ port_range_hints[SINGLEPARA_OUTPUT].HintDescriptor =
++ LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE;
++ port_range_hints[SINGLEPARA_OUTPUT].LowerBound = -1.0;
++ port_range_hints[SINGLEPARA_OUTPUT].UpperBound = +1.0;
++
++ singleParaDescriptor->activate = activateSinglePara;
++ singleParaDescriptor->cleanup = cleanupSinglePara;
++ singleParaDescriptor->connect_port = connectPortSinglePara;
++ singleParaDescriptor->deactivate = NULL;
++ singleParaDescriptor->instantiate = instantiateSinglePara;
++ singleParaDescriptor->run = runSinglePara;
++ singleParaDescriptor->run_adding = NULL;
++ }
++}
++
++void _fini(void);
++void _fini(void) {
++ if (singleParaDescriptor) {
++ free((LADSPA_PortDescriptor
*)singleParaDescriptor->PortDescriptors);
++ free((char **)singleParaDescriptor->PortNames);
++ free((LADSPA_PortRangeHint
*)singleParaDescriptor->PortRangeHints);
++ free(singleParaDescriptor);
++ }
++
++}
++
+diff --git a/util/biquad.h b/util/biquad.h
+deleted file mode 100644
+index 49451d8..0000000
+--- a/util/biquad.h
++++ /dev/null
+@@ -1,331 +0,0 @@
+-#ifndef BIQUAD_H
+-#define BIQUAD_H
+-
+-#define LN_2_2 0.34657359f // ln(2)/2
+-
+-#include "ladspa-util.h"
+-#include <math.h>
+-
+-#ifndef LIMIT
+-#define LIMIT(v,l,u) (v<l?l:(v>u?u:v))
+-#endif
+-
+-// rt 8.1.2013: store biquad coefficients and accumulators in double
+-// precision, to limit effects of round-off error. Change this to
+-// float if you need more speed: it probably won't make an audible
+-// difference unless you need filters with really high Q or low
+-// frequency.
+-#ifndef BIQUAD_TYPE
+-#define BIQUAD_TYPE double
+-#endif
+-
+-// rt 25.6.2013: amplitude of square wave (at Nyquist freq)
+-// added to kill denormals ... may need to experiment with
+-// this value. NB: 1.e-18 = -360dB
+-#define DENORMALKILLER 1.e-18;
+-
+-typedef BIQUAD_TYPE bq_t;
+-
+-/* Biquad filter (adapted from lisp code by Eli Brandt,
+- http://www.cs.cmu.edu/~eli/) */
+-
+-typedef struct {
+- bq_t a1;
+- bq_t a2;
+- bq_t b0;
+- bq_t b1;
+- bq_t b2;
+- bq_t x1;
+- bq_t x2;
+- bq_t y1;
+- bq_t y2;
+- bq_t dn; // denormal state (rt 25.6.2013)
+-} biquad;
+-
+-typedef struct {
+- bq_t a1;
+- bq_t b0;
+- bq_t b1;
+- bq_t x1;
+- bq_t y1;
+- bq_t dn; // denormal state
+-} bilin;
+-
+-
+-static inline void biquad_init(biquad *f) {
+- f->x1 = 0.0f;
+- f->x2 = 0.0f;
+- f->y1 = 0.0f;
+- f->y2 = 0.0f;
+- f->dn = DENORMALKILLER;
+-}
+-
+-static inline void bilin_init(bilin *f) {
+- f->x1 = 0.0f;
+- f->y1 = 0.0f;
+- f->dn = DENORMALKILLER;
+-}
+-
+-//static inline void eq_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
+-// bq_t fs);
+-static inline void eq_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
bq_t fs)
+-{
+- bq_t w = 2.0f * M_PI * LIMIT(fc, 1.0f, fs/2.0f) / fs;
+- bq_t J = pow(10.0f, gain * 0.025f);
+- bq_t cw = cos(w);
+- bq_t sw = sin(w);
+- Q = Q / J; // adjust so input Q is standard elec. eng. Q
+-// bq_t g = sw * sinhf(LN_2_2 * LIMIT(bw, 0.0001f, 4.0f) * w / sw); //
case: bw
+- bq_t g = sw/(2.0*Q); // case: Q
+-// bq_t g = sin(w0)/2.0 * sqrt( (J + 1.0/J)*(1.0/S - 1.0) + 2.0 ) //
case: S
+-
+- bq_t a0 = 1.0f + g / J;
+- bq_t a0r = 1.0f / a0;
+-
+- f->b0 = (1.0 + (g * J)) * a0r;
+- f->b1 = (-2.0 * cw) * a0r;
+- f->b2 = (1.0 - (g * J)) * a0r;
+- f->a1 = -(f->b1);
+- f->a2 = ((g / J) - 1.0) * a0r;
+-}
+-
+-//static inline void ls_set_params(biquad *f, bq_t fc, bq_t gain, bq_t
slope,
+-// bq_t fs);
+-static inline void ls_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
+- bq_t fs)
+-{
+- bq_t w = 2.0f * M_PI * LIMIT(fc, 1.0, fs/2.0) / fs;
+- bq_t cw = cos(w);
+- bq_t sw = sin(w);
+- bq_t A = powf(10.0f, (float) (gain * (bq_t) 0.025));
+-
+-// rt 8.1.2013: increased slope limit from 1.0f to 5.0f:
+-// bq_t b = sqrt(((1.0f + A * A) / LIMIT(slope, 0.0001f, 5.0f)) - ((A -
+-// 1.0f) * (A - 1.0)));
+-
+-// bq_t apc = cw * (A + 1.0f);
+-// bq_t amc = cw * (A - 1.0f);
+-// bq_t bs = b * sw;
+-// bq_t a0r = 1.0f / (A + 1.0f + amc + bs);
+-
+-// f->b0 = a0r * A * (A + 1.0f - amc + bs);
+-// f->b1 = a0r * 2.0f * A * (A - 1.0f - apc);
+-// f->b2 = a0r * A * (A + 1.0f - amc - bs);
+-// f->a1 = a0r * 2.0f * (A - 1.0f + apc);
+-// f->a2 = a0r * (-A - 1.0f - amc + bs);
+-
+- // rt 22.1.2013 changed this to use Q instead of slope
+- bq_t alpha = sw / (2.0 * Q);
+- bq_t b = 2.0*sqrt(A)*alpha;
+- bq_t ap = A + 1.0;
+- bq_t am = A - 1.0;
+- bq_t a0 = ap + am*cw + b;
+- bq_t a0r = 1.0 / a0;
+-
+- f->b0 = a0r * A * (ap - am*cw + b);
+- f->b1 = a0r * 2.0 * A * (am - ap*cw);
+- f->b2 = a0r * A * (ap - am*cw - b);
+- f->a1 = 2.0 * a0r * (am + ap*cw);
+- f->a2 = -a0r * (ap + am*cw - b);
+-}
+-
+-//static inline void hs_set_params(biquad *f, bq_t fc, bq_t gain, bq_t
slope,
+-// bq_t fs);
+-static inline void hs_set_params(biquad *f, bq_t fc, bq_t gain, bq_t Q,
bq_t fs)
+-{
+- bq_t w = 2.0f * M_PI * LIMIT(fc, 1.0, fs/2.0) / fs;
+- bq_t cw = cos(w);
+- bq_t sw = sin(w);
+- bq_t A = powf(10.0f, (float) (gain * (bq_t) 0.025));
+-// rt 8.1.2013: increased slope limit from 1.0f to 5.0f:
+-// bq_t b = sqrt(((1.0f + A * A) / LIMIT(slope, 0.0001f, 5.0f)) - ((A -
+-// 1.0f) * (A - 1.0f)));
+-// bq_t apc = cw * (A + 1.0f);
+-// bq_t amc = cw * (A - 1.0f);
+-// bq_t bs = b * sw;
+-// bq_t a0r = 1.0f / (A + 1.0f - amc + bs);
+-
+-// f->b0 = a0r * A * (A + 1.0f + amc + bs);
+-// f->b1 = a0r * -2.0f * A * (A - 1.0f + apc);
+-// f->b2 = a0r * A * (A + 1.0f + amc - bs);
+-// f->a1 = a0r * -2.0f * (A - 1.0f - apc);
+-// f->a2 = a0r * (-A - 1.0f + amc + bs);
+-
+- // rt 22.1.2013 changed this to use Q instead of slope
+- bq_t alpha = sw / (2.0 * Q);
+- bq_t b = 2.0*sqrt(A)*alpha;
+- bq_t ap = A + 1.0;
+- bq_t am = A - 1.0;
+- bq_t a0 = ap - am*cw + b;
+- bq_t a0r = 1.0 / a0;
+-
+- f->b0 = a0r * A * (ap + am*cw + b);
+- f->b1 = -a0r * 2.0 * A * (am + ap*cw);
+- f->b2 = a0r * A * (ap + am*cw - b);
+- f->a1 = -2.0 * a0r * (am - ap*cw);
+- f->a2 = -a0r * (ap - am*cw - b);
+-}
+-
+-static inline void lp_set_params(biquad *f, bq_t fc, bq_t Q, bq_t fs)
+-{
+- bq_t omega = 2.0 * M_PI * fc/fs;
+- bq_t sn = sin(omega);
+- bq_t cs = cos(omega);
+-// bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
+- bq_t alpha = sn / (2.0 * Q);
+-
+- const bq_t a0r = 1.0 / (1.0 + alpha);
+- f->b0 = a0r * (1.0 - cs) * 0.5;
+- f->b1 = a0r * (1.0 - cs);
+- f->b2 = a0r * (1.0 - cs) * 0.5;
+- f->a1 = a0r * (2.0 * cs);
+- f->a2 = a0r * (alpha - 1.0);
+-}
+-
+-static inline void hp_set_params(biquad *f, bq_t fc, bq_t Q, bq_t fs)
+-{
+- bq_t omega = 2.0 * M_PI * fc/fs;
+- bq_t sn = sin(omega);
+- bq_t cs = cos(omega);
+-// bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
+- bq_t alpha = sn / (2.0 * Q);
+-
+- const bq_t a0r = 1.0 / (1.0 + alpha);
+- f->b0 = a0r * (1.0 + cs) * 0.5;
+- f->b1 = a0r * -(1.0 + cs);
+- f->b2 = a0r * (1.0 + cs) * 0.5;
+- f->a1 = a0r * (2.0 * cs);
+- f->a2 = a0r * (alpha - 1.0);
+-}
+-
+-static inline void bp_set_params(biquad *f, bq_t fc, bq_t bw, bq_t fs)
+-{
+- bq_t omega = 2.0 * M_PI * fc/fs;
+- bq_t sn = sin(omega);
+- bq_t cs = cos(omega);
+- bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
+-
+- const bq_t a0r = 1.0 / (1.0 + alpha);
+- f->b0 = a0r * alpha;
+- f->b1 = 0.0;
+- f->b2 = a0r * -alpha;
+- f->a1 = a0r * (2.0 * cs);
+- f->a2 = a0r * (alpha - 1.0);
+-}
+-
+-// rt 8.1.2013: allpass from biquad cookbook
+-static inline void ap_set_params(biquad *f, bq_t fc, bq_t Q, bq_t fs)
+-{
+- bq_t omega = 2.0 * M_PI * fc/fs;
+- bq_t sn = sin(omega);
+- bq_t cs = cos(omega);
+-// bq_t alpha = sn * sinh(M_LN2 / 2.0 * bw * omega / sn);
+- bq_t alpha = sn / (2.0 * Q);
+-
+- bq_t a0 = 1.0 + alpha;
+- bq_t a0r = 1.0 / a0;
+- f->b0 = a0r * (1.0 - alpha);
+- f->b1 = a0r * (-2.0 * cs);
+- f->b2 = 1.0;
+- f->a1 = -f->b1;
+- f->a2 = -f->b0;
+-}
+-
+-static inline void ap1_set_params(bilin *f, bq_t fc, bq_t fs)
+-{
+-// rt 8.1.2013: implementation of first-order digital allpass found here:
+-// https://ccrma.stanford.edu/realsimple/DelayVar/Phasing_First_Order_Allpass_Filters.html
+-// see here for turning transfer function into difference equation:
+-// http://en.wikipedia.org/wiki/Digital_filter
+- bq_t tphi = tan( M_PI * fc / fs);
+- bq_t p = (1.0f - tphi) / (1.0f + tphi);
+-
+- // case 1: phase varies from 0 to 180 degrees
+- f->b0 = -p;
+- f->b1 = 1.0f;
+-
+- // case 2: phase varies from 180 to 360 degrees
+-// f->b0 = p;
+-// f->b1 = -1.0f;
+-
+- f->a1 = p;
+-}
+-
+-// routine that runs a biquad (i.e. 2nd-order) digital filter
+-static inline bq_t biquad_run(biquad *f, const bq_t x) {
+- bq_t y;
+-
+-// rt 15.5.2013: add a Nyquist-frequency square-wave to kill denormals:
+- y = f->b0 * x + f->b1 * f->x1 + f->b2 * f->x2
+- + f->a1 * f->y1 + f->a2 * f->y2 + f->dn;
+- f->dn = -f->dn;
+-
+-// see previous commment
+-// y = flush_to_zero(y);
+-
+- f->x2 = f->x1;
+- f->x1 = x;
+- f->y2 = f->y1;
+- f->y1 = y;
+-
+- return y;
+-}
+-
+-// rt 2.9.2013: special version of biquad_run for 2nd-order
+-// allpass; takes advantage of factoring to reduce floating-point
+-// multiplications from 5 to 2
+-static inline bq_t ap2_run(biquad *f, const bq_t x) {
+- bq_t y;
+-
+-// rt 15.5.2013: add a Nyquist-frequency square-wave to kill denormals:
+- y = f->b0 * (x - f->y2) + f->b1 * (f->x1 - f->y1) + f->x2 + f->dn;
+- f->dn = -f->dn;
+-
+-// see previous commment
+-// y = flush_to_zero(y);
+-
+- f->x2 = f->x1;
+- f->x1 = x;
+- f->y2 = f->y1;
+- f->y1 = y;
+-
+- return y;
+-}
+-
+-// routine that runs a bilinear (i.e. 1st-order) digital filter
+-static inline bq_t bilin_run(bilin *f, const bq_t x) {
+- bq_t y;
+-
+-// rt 15.5.2013: add a Nyquist-frequency square-wave to kill denormals:
+- y = f->b0 * x + f->b1 * f->x1 + f->a1 * f->y1 + f->dn;
+- f->dn = -f->dn;
+-
+-// see previous commment
+-// y = flush_to_zero(y);
+-
+- f->x1 = x;
+- f->y1 = y;
+-
+- return y;
+-}
+-
+-// rt 2.9.2013: special version of bilin_run for 2nd-order
+-// allpass; takes advantage of factoring to reduce floating-point
+-// multiplications from 5 to 2
+-static inline bq_t ap1_run(bilin *f, const bq_t x) {
+- bq_t y;
+-
+-// rt 15.5.2013: adding a Nyquist-frequency square-wave to kill denormals:
+- y = f->b0 * (x - f->y1) + f->x1 + f->dn;
+- f->dn = -f->dn;
+-
+-// see previous commment
+-// y = flush_to_zero(y);
+-
+- f->x1 = x;
+- f->y1 = y;
+-
+- return y;
+-}
+-
+-#endif
+diff --git a/util/config.h b/util/config.h
+deleted file mode 100644
+index 1dcbc37..0000000
+--- a/util/config.h
++++ /dev/null
+@@ -1,99 +0,0 @@
+-/* config.h. Generated by configure. */
+-/* config.h.in. Generated from configure.in by autoheader. */
+-#ifndef _CONFIG_H
+-#define _CONFIG_H
+-
+-/* #undef EXPLICIT_S */
+-/* #undef ACCEL_3DNOW */
+-#define HAVE_LRINTF 1
+-#define PACKAGE_LOCALE_DIR "/usr/local//locale"
+-#define PACKAGE_DATA_DIR "/usr/local/share/swh-plugins"
+-
+-#endif
+-
+-/* Define to 1 if translation of program messages to the user's native
+- language is requested. */
+-#define ENABLE_NLS 1
+-
+-/* Wether were using FFTW version 3 */
+-#define FFTW3
+-
+-/* Define if the GNU dcgettext() function is already present or
preinstalled.
+- */
+-#define HAVE_DCGETTEXT 1
+-
+-/* Define to 1 if you have the <dlfcn.h> header file. */
+-#define HAVE_DLFCN_H 1
+-
+-/* Define if the GNU gettext() function is already present or preinstalled.
*/
+-#define HAVE_GETTEXT 1
+-
+-/* Define if you have the iconv() function. */
+-/* #undef HAVE_ICONV */
+-
+-/* Define to 1 if you have the <inttypes.h> header file. */
+-#define HAVE_INTTYPES_H 1
+-
+-/* Define to 1 if you have the `m' library (-lm). */
+-#define HAVE_LIBM 1
+-
+-/* Define to 1 if you have the `mx' library (-lmx). */
+-/* #undef HAVE_LIBMX */
+-
+-/* Define to 1 if you have the `rt' library (-lrt). */
+-#define HAVE_LIBRT 1
+-
+-/* Define if you have C99's lrintf function. */
+-#define HAVE_LRINTF 1
+-
+-/* Define to 1 if you have the <memory.h> header file. */
+-#define HAVE_MEMORY_H 1
+-
+-/* Define to 1 if you have the <stdint.h> header file. */
+-#define HAVE_STDINT_H 1
+-
+-/* Define to 1 if you have the <stdlib.h> header file. */
+-#define HAVE_STDLIB_H 1
+-
+-/* Define to 1 if you have the <strings.h> header file. */
+-#define HAVE_STRINGS_H 1
+-
+-/* Define to 1 if you have the <string.h> header file. */
+-#define HAVE_STRING_H 1
+-
+-/* Define to 1 if you have the <sys/stat.h> header file. */
+-#define HAVE_SYS_STAT_H 1
+-
+-/* Define to 1 if you have the <sys/types.h> header file. */
+-#define HAVE_SYS_TYPES_H 1
+-
+-/* Define to 1 if you have the <unistd.h> header file. */
+-#define HAVE_UNISTD_H 1
+-
+-/* Name of package */
+-#define PACKAGE "swh-plugins"
+-
+-/* Define to the address where bug reports for this package should be sent.
*/
+-#define PACKAGE_BUGREPORT ""
+-
+-/* Define to the full name of this package. */
+-#define PACKAGE_NAME ""
+-
+-/* Define to the full name and version of this package. */
+-#define PACKAGE_STRING ""
+-
+-/* Define to the one symbol short name of this package. */
+-#define PACKAGE_TARNAME ""
+-
+-/* Define to the version of this package. */
+-#define PACKAGE_VERSION ""
+-
+-/* Define to 1 if you have the ANSI C header files. */
+-#define STDC_HEADERS 1
+-
+-/* Version number of package */
+-#define VERSION "0.4.15"
+-
+-/* Define to 1 if your processor stores words with the most significant byte
+- first (like Motorola and SPARC, unlike Intel and VAX). */
+-/* #undef WORDS_BIGENDIAN */
+diff --git a/util/ladspa-util.h b/util/ladspa-util.h
+deleted file mode 100644
+index 5d3dcc9..0000000
+--- a/util/ladspa-util.h
++++ /dev/null
+@@ -1,230 +0,0 @@
+-/* Some misc util functions for audio DSP work, written by Steve Harris,
+- * December 2000
+- *
+- * steve AT plugin.org.uk
+- */
+-
+-#ifndef LADSPA_UTIL_H
+-#define LADSPA_UTIL_H
+-
+-#include <math.h>
+-#include <stdint.h>
+-
+-#include "config.h"
+-
+-// 16.16 fixpoint
+-typedef union {
+- int32_t all;
+- struct {
+-#ifdef WORDS_BIGENDIAN
+- int16_t in;
+- uint16_t fr;
+-#else
+- uint16_t fr;
+- int16_t in;
+-#endif
+- } part;
+-} fixp16;
+-
+-// 32.32 fixpoint
+-typedef union {
+- int64_t all;
+- struct {
+-#ifdef WORDS_BIGENDIAN
+- int32_t in;
+- uint32_t fr;
+-#else
+- uint32_t fr;
+- int32_t in;
+-#endif
+- } part;
+-} fixp32;
+-
+-/* 32 bit "pointer cast" union */
+-typedef union {
+- float f;
+- int32_t i;
+-} ls_pcast32;
+-
+-// 1.0 / ln(2)
+-#define LN2R 1.442695041f
+-
+-/* detet floating point denormal numbers by comparing them to the smallest
+- * normal, crap, but reliable */
+-#define DN_CHECK(x, l) if (fabs(x) < 1e-38) printf("DN: "l"\n")
+-
+-// Denormalise floats, only actually needed for PIII and recent PowerPC
+-//#define FLUSH_TO_ZERO(fv) (((*(unsigned
int*)&(fv))&0x7f800000)==0)?0.0f:(fv)
+-
+-static inline float flush_to_zero(float f)
+-{
+- ls_pcast32 v;
+-
+- v.f = f;
+-
+- // original: return (v.i & 0x7f800000) == 0 ? 0.0f : f;
+- // version from Tim Blechmann
+- return (v.i & 0x7f800000) < 0x08000000 ? 0.0f : f;
+-}
+-
+-static inline void round_to_zero(volatile float *f)
+-{
+- *f += 1e-18f;
+- *f -= 1e-18f;
+-}
+-
+-/* A set of branchless clipping operations from Laurent de Soras */
+-
+-static inline float f_max(float x, float a)
+-{
+- x -= a;
+- x += fabsf(x);
+- x *= 0.5f;
+- x += a;
+-
+- return x;
+-}
+-
+-static inline float f_min(float x, float b)
+-{
+- x = b - x;
+- x += fabsf(x);
+- x *= 0.5f;
+- x = b - x;
+-
+- return x;
+-}
+-
+-static inline float f_clamp(float x, float a, float b)
+-{
+- const float x1 = fabsf(x - a);
+- const float x2 = fabsf(x - b);
+-
+- x = x1 + a + b;
+- x -= x2;
+- x *= 0.5f;
+-
+- return x;
+-}
+-
+-// Limit a value to be l<=v<=u
+-#define LIMIT(v,l,u) ((v)<(l)?(l):((v)>(u)?(u):(v)))
+-
+-// Truncate-to-zero modulo (ANSI C doesn't specify) will only work
+-// if -m < v < 2m
+-#define MOD(v,m) (v<0?v+m:(v>=m?v-m:v))
+-
+-// Truncate-to-zero modulo (ANSI C doesn't specify) will only work
+-// if v > -m and v < m
+-#define NEG_MOD(v,m) ((v)<0?((v)+(m)):(v))
+-
+-// Convert a value in dB's to a coefficent
+-#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f)
+-#define CO_DB(v) (20.0f * log10f(v))
+-
+-// Linearly interpolate [ = a * (1 - f) + b * f]
+-#define LIN_INTERP(f,a,b) ((a) + (f) * ((b) - (a)))
+-
+-// Cubic interpolation function
+-static inline float cube_interp(const float fr, const float inm1, const
float
+- in, const float inp1, const float inp2)
+-{
+- return in + 0.5f * fr * (inp1 - inm1 +
+- fr * (4.0f * inp1 + 2.0f * inm1 - 5.0f * in - inp2 +
+- fr * (3.0f * (in - inp1) - inm1 + inp2)));
+-}
+-
+-/* fast sin^2 aproxiamtion, adapted from jan AT rpgfan's posting to the
+- * music-dsp list */
+-static inline float f_sin_sq(float angle)
+-{
+- const float asqr = angle * angle;
+- float result = -2.39e-08f;
+-
+- result *= asqr;
+- result += 2.7526e-06f;
+- result *= asqr;
+- result -= 1.98409e-04f;
+- result *= asqr;
+- result += 8.3333315e-03f;
+- result *= asqr;
+- result -= 1.666666664e-01f;
+- result *= asqr;
+- result += 1.0f;
+- result *= angle;
+-
+- return result * result;
+-}
+-
+-#ifdef HAVE_LRINTF
+-
+-#define f_round(f) lrintf(f)
+-
+-#else
+-
+-// Round float to int using IEEE int* hack
+-static inline long int f_round(float f)
+-{
+- ls_pcast32 p;
+-
+- p.f = f;
+- p.f += (3<<22);
+-
+- return p.i - 0x4b400000;
+-}
+-
+-#endif
+-
+-// Truncate float to int
+-static inline long int f_trunc(float f)
+-{
+- return f_round(floorf(f));
+-}
+-
+-/* Andrew Simper's pow(2, x) aproximation from the music-dsp list */
+-
+-#if 0
+-
+-/* original */
+-static inline float f_pow2(float x)
+-{
+- long *px = (long*)(&x); // store address of float as long pointer
+- const float tx = (x-0.5f) + (3<<22); // temporary value for truncation
+- const long lx = *((long*)&tx) - 0x4b400000; // integer power of 2
+- const float dx = x-(float)(lx); // float remainder of power of 2
+-
+- x = 1.0f + dx*(0.6960656421638072f + // cubic apporoximation of 2^x
+- dx*(0.224494337302845f + // for x in the range [0, 1]
+- dx*(0.07944023841053369f)));
+- *px += (lx<<23); // add integer power of 2 to exponent
+-
+- return x;
+-}
+-
+-#else
+-
+-/* union version */
+-static inline float f_pow2(float x)
+-{
+- ls_pcast32 *px, tx, lx;
+- float dx;
+-
+- px = (ls_pcast32 *)&x; // store address of float as long pointer
+- tx.f = (x-0.5f) + (3<<22); // temporary value for truncation
+- lx.i = tx.i - 0x4b400000; // integer power of 2
+- dx = x - (float)lx.i; // float remainder of power of 2
+-
+- x = 1.0f + dx * (0.6960656421638072f + // cubic apporoximation of 2^x
+- dx * (0.224494337302845f + // for x in the range [0, 1]
+- dx * (0.07944023841053369f)));
+- (*px).i += (lx.i << 23); // add integer power of 2 to exponent
+-
+- return (*px).f;
+-}
+-
+-#endif
+-
+-/* Fast exponentiation function, y = e^x */
+-#define f_exp(x) f_pow2(x * LN2R)
+-
+-#endif
+--
+1.9.0
+
diff --git a/audio-plugins/rt-plugins/BUILD b/audio-plugins/rt-plugins/BUILD
index 6dfecc1..e013b8d 100755
--- a/audio-plugins/rt-plugins/BUILD
+++ b/audio-plugins/rt-plugins/BUILD
@@ -1 +1 @@
-default_build_make
+cmake_build
diff --git a/audio-plugins/rt-plugins/DEPENDS
b/audio-plugins/rt-plugins/DEPENDS
index a02b2c8..0146535 100755
--- a/audio-plugins/rt-plugins/DEPENDS
+++ b/audio-plugins/rt-plugins/DEPENDS
@@ -1 +1,2 @@
-depends ladspa
+depends ladspa &&
+depends cmake
diff --git a/audio-plugins/rt-plugins/HISTORY
b/audio-plugins/rt-plugins/HISTORY
index fffe977..a5b95b1 100644
--- a/audio-plugins/rt-plugins/HISTORY
+++ b/audio-plugins/rt-plugins/HISTORY
@@ -1,3 +1,11 @@
+2014-04-06 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * 0003-switch-build-system-to-cmake.patch, PRE_BUILD, DEPENDS:
+ use cmake as build system
+
2014-03-20 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
- * DEPENDS, DETAILS: spell created
+ * DEPENDS, DETAILS, PRE_BUILD, INSTALL,
+ 0001-clean-up-the-Makefile.patch,
+ 0002-make-the-code-compile-with-higher-warning-levels.patch: spell
created
+
+
diff --git a/audio-plugins/rt-plugins/INSTALL
b/audio-plugins/rt-plugins/INSTALL
deleted file mode 100755
index 131ca30..0000000
--- a/audio-plugins/rt-plugins/INSTALL
+++ /dev/null
@@ -1 +0,0 @@
-INSTALL_PLUGINS_DIR=${INSTALL_ROOT}/usr/lib/ladspa default_install
diff --git a/audio-plugins/rt-plugins/PRE_BUILD
b/audio-plugins/rt-plugins/PRE_BUILD
index 095c784..3629306 100755
--- a/audio-plugins/rt-plugins/PRE_BUILD
+++ b/audio-plugins/rt-plugins/PRE_BUILD
@@ -1,4 +1,5 @@
default_pre_build &&
cd ${SOURCE_DIRECTORY} &&
patch -p1 < $SPELL_DIRECTORY/0001-clean-up-the-Makefile.patch &&
-patch -p1 <
$SPELL_DIRECTORY/0002-make-the-code-compile-with-higher-warning-levels.patch
+patch -p1 <
$SPELL_DIRECTORY/0002-make-the-code-compile-with-higher-warning-levels.patch
&&
+patch -p1 < $SPELL_DIRECTORY/0003-switch-build-system-to-cmake.patch
diff --git a/audio-soft/meterbridge/DEPENDS b/audio-soft/meterbridge/DEPENDS
index 52ed4d0..05cd144 100755
--- a/audio-soft/meterbridge/DEPENDS
+++ b/audio-soft/meterbridge/DEPENDS
@@ -1,4 +1,6 @@
depends JACK-DRIVER &&
depends sdl &&
# TODO: meterbridge requires sdl_image with PNG support
-depends sdl_image
+depends sdl_image &&
+depends autoconf &&
+depends automake
diff --git a/audio-soft/meterbridge/HISTORY b/audio-soft/meterbridge/HISTORY
index 0be7602..8b04fb8 100644
--- a/audio-soft/meterbridge/HISTORY
+++ b/audio-soft/meterbridge/HISTORY
@@ -1,3 +1,10 @@
+2014-04-06 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DEPENDS, PRE_BUILD: run autoconf and friends to fix linker error
+ * binutils_gold.patch, PRE_BUILD: fix linker error
+ * main.h.patch, PRE_BUILD: move patch into separate file
+ * meterbridge_0.9.2_iec_fix.patch, PRE_BUILD: fix bug in the 50-60dB
range
+ of the scale
+
2011-10-14 Bor Kraljič <pyrobor AT ver.si>
* DETAILS: fixed long description wrap (scripted)
-default_build &&
+ if [[ $MARIADB_ENGINES == none ]] || [[ $MARIADB_ENGINES == all ]]; then
+ OPTS="-DWITH_${MARIADB_ENGINES^^} $OPTS"
+ else
+ for engine in $MARIADB_ENGINES; do
+ OPTS="-DWITH_${engine^^}_STORAGE_ENGINE=ON $OPTS"
+ done
+ fi &&
-config_query_option MADB_OPTS "Install client only?" n \
- "--without-server" \
- "--with-server" &&
+# backporting legacy options
+if [[ -n "$MADB_OPTS" ]]; then
+ persistent_add MARIADB_OPTS &&
+ MARIADB_OPTS="$MADB_OPTS" &&
+ persistent_remove MADB_OPTS
+fi &&
+
+if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ if list_find "$MARIADB_OPTS" "--with-embedded-server"; then
+ list_remove "MARIADB_OPTS" "--with-embedded-server" &&
+ list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=ON"
+ elif list_find "$MARIADB_OPTS" "--without-embedded-server"; then
+ list_remove "MARIADB_OPTS" "--without-embedded-server" &&
+ list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=OFF"
+ elif list_find "$MARIADB_OPTS" "--with-server"; then
+ list_remove "MARIADB_OPTS" "--with-server" &&
+ list_add "MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"
+ elif list_find "$MARIADB_OPTS" "--without-server"; then
+ list_remove "MARIADB_OPTS" "--without-server" &&
+ list_add "MARIADB_OPTS" "-DWITHOUT_SERVER=ON"
+ fi &&
+
+ config_query_option MARIADB_OPTS "Build the embedded server (libmysqld)?"
n \
+ "-DWITH_EMBEDDED_SERVER=ON" \
+ "-DWITH_EMBEDDED_SERVER=OFF" &&
+
+ config_query_option MARIADB_OPTS "Install client only?" n \
+ "-DWITHOUT_SERVER=ON" \
+ "-DWITHOUT_SERVER=OFF"
+else
+ config_query_option MARIADB_OPTS "Install client only?" n \
+ "--without-server" \
+ "--with-server" &&
+
+ config_query_option MARIADB_OPTS "Build the embedded server (libmysqld)?"
n \
+ "--with-embedded-server" \
+ "--without-embedded-server" &&
-config_query_option MADB_OPTS "Build the embedded server (libmysqld)?" n \
- "--with-embedded-server" \
- "--without-embedded-server" &&
+ if list_find "$MARIADB_OPTS" "--with-server"; then
+ config_query_option MARIADB_OPTS "Use libevent and have connection
pooling?" n \
+ "--with-libevent=yes" \
+ "--with-libevent=no"
+ fi
+fi &&
-if list_find "$MADB_OPTS" "--with-server"; then
- config_query_option MADB_OPTS "Use libevent and have connection pooling?"
n \
- "--with-libevent=yes" \
- "--with-libevent=no"
+# backporting legacy options
+if [[ -n "$MADB_CHARSET" ]]; then
+ persistent_add MARIADB_CHARSET &&
+ MARIADB_CHARSET="$MADB_CHARSET" &&
+ persistent_remove MADB_CHARSET
fi &&
-if list_find "$MADB_ENGINES" "all"; then
- MADB_ENGINES="all"
-elif list_find "$MADB_ENGINES" "none"; then
- MADB_ENGINES="none"
+if list_find "$MARIADB_ENGINES" "all"; then
+ MARIADB_ENGINES="all"
+elif list_find "$MARIADB_ENGINES" "none"; then
+ MARIADB_ENGINES="none"
fi
diff --git a/database/mariadb/DEPENDS b/database/mariadb/DEPENDS
index ed9f6ec..8f8e628 100755
--- a/database/mariadb/DEPENDS
+++ b/database/mariadb/DEPENDS
@@ -1,34 +1,72 @@
depends perl &&
depends procps &&
depends -sub CXX gcc &&
+depends bison &&
-optional_depends zlib \
- "--with-zlib-dir=$INSTALL_ROOT/" \
- "--with-zlib-dir=bundled" \
- "to use system zlib instead of bundled" &&
-
-# temporarily broken cause of mismatching API
-#optional_depends readline \
-# "--without-readline" "" \
-# "to use system readline instead of bundled" &&
-
-optional_depends libedit \
- "--without-libedit" "" \
- "to use system libedit instead of bundled" &&
-
-optional_depends openssl \
- "--with-ssl" \
- "--without-ssl" \
- "for OpenSSL support" &&
-
-optional_depends valgrind \
- "--with-valgrind" \
- "--without-valgrind" \
- "for Valgrind instrumentation" &&
-
-if list_find "$MADB_OPTS" "--with-libevent=yes"; then
- optional_depends libevent \
- "--with-libevent=$INSTALL_ROOT/usr" \
- "--with-libevent=bundled" \
- "to use system libevent instead of bundled"
+if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ depends cmake &&
+
+ optional_depends readline \
+ "-DWITH_READLINE=OFF" \
+ "-DWITH_READLINE=ON" \
+ "to use system readline instead of bundled" &&
+
+ optional_depends zlib \
+ "-DWITH_ZLIB=system" \
+ "-DWITH_ZLIB=bundled" \
+ "to use system zlib instead of bundled" &&
+
+ optional_depends openssl \
+ "-DWITH_SSL=system" \
+ "-DWITH_SSL=bundled" \
+ "to use system SSL instead of bundled" &&
+
+ optional_depends tcp_wrappers \
+ "-DWITH_LIBWRAP=ON" \
+ "-DWITH_LIBWRAP=OFF" \
+ "for tcp wrappers support" &&
+
+ optional_depends valgrind \
+ "-DWITH_VALGRIND=ON" \
+ "-DWITH_VALGRIND=OFF" \
+ "for Valgrind instrumentation" &&
+
+ if list_find "$MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"; then
+ optional_depends libevent "" "" "to use libevent and have connection
pooling"
+ fi &&
+
+ if list_find "$MARIADB_ENGINES" "xtradb"; then
+ depends libaio
+ fi &&
+
+ if list_find "$MARIADB_ENGINES" "oqgraph"; then
+ depends boost
+ fi
+else
+ optional_depends zlib \
+ "--with-zlib-dir=$INSTALL_ROOT/" \
+ "--with-zlib-dir=bundled" \
+ "to use system zlib instead of bundled" &&
+
+ optional_depends libedit \
+ "--without-libedit" \
+ "" \
+ "to use system libedit instead of bundled" &&
+
+ optional_depends openssl \
+ "--with-ssl" \
+ "--without-ssl" \
+ "for OpenSSL support" &&
+
+ optional_depends valgrind \
+ "--with-valgrind" \
+ "--without-valgrind" \
+ "for Valgrind instrumentation" &&
+
+ if list_find "$MARIADB_OPTS" "--with-libevent=yes"; then
+ optional_depends libevent \
+ "--with-libevent=$INSTALL_ROOT/usr" \
+ "--with-libevent=bundled" \
+ "to use system libevent instead of bundled"
+ fi
fi
diff --git a/database/mariadb/DETAILS b/database/mariadb/DETAILS
index 7111b30..51b0f2a 100755
--- a/database/mariadb/DETAILS
+++ b/database/mariadb/DETAILS
@@ -2,6 +2,9 @@
if [[ $MARIADB_BRANCH == 5.3 ]]; then
VERSION=5.3.12
SOURCE_HASH=sha512:d53ea48745dad5693fd6a1fd5cf502852f12f8236b8a1fb7f81ad647301d2fd08d4f2944c74de580d0a4136d6c8b49f257124fa1b234ba8f2338f2047435ef94
+elif [[ $MARIADB_BRANCH == 5.5 ]]; then
+ VERSION=5.5.36
+
SOURCE_HASH=sha512:b7de14f4d4a08f51aae339779c59798f3ed110aa3d65038c39514161ee73b6cc95f95fe1b15434daf33de689b0d7351cbf7a1c90ca980f0f020b085ef23aa016
else
VERSION=5.2.14
SECURITY_PATCH=3
diff --git a/database/mariadb/FINAL b/database/mariadb/FINAL
index daee887..9a9db7d 100755
--- a/database/mariadb/FINAL
+++ b/database/mariadb/FINAL
@@ -1,4 +1,5 @@
-if list_find "$MADB_OPTS" "--with-server" ]]; then
+if list_find "$MARIADB_OPTS" "--with-server" || \
+ list_find "$MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"; then
message "${MESSAGE_COLOR}After initial install of MariaDB run"
message "\"mysql_install_db --user=mariadb\" to create directory"
message "structure and initial tables. See MariaDB documentation"
diff --git a/database/mariadb/HISTORY b/database/mariadb/HISTORY
index 70c5fbd..07e78ce 100644
--- a/database/mariadb/HISTORY
+++ b/database/mariadb/HISTORY
@@ -1,3 +1,20 @@
+2014-04-08 Vlad Glagolev <stealth AT sourcemage.org>
+ * UP_TRIGGERS: update triggers for switching between branches
+
+2014-04-07 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS, PREPARE: added 5.5 branch
+ * CONFIGURE: renamed lists MADB_* -> MARIADB_*; added missing
charsets;
+ split engines list for different branches
+ * DEPENDS: added bison dependency; added cmake (optional) and libaio,
+ boost for 5.5 branch
+ * BUILD: cmake build for 5.5 branch; use MARIADB_OPTS
+ * INSTALL: added target for 5.5 branch
+ * PRE_BUILD: added check for 5.5 branch; renamed mysqld user mysql ->
+ mariadb
+ * FINAL: fixed syntax error; added check for 5.5 branch
+ * {PRE_,}SUB_DEPENDS: rewritten; echo -> message
+ * REPAIR^all^PRE_SUB_DEPENDS: added
+
2013-02-10 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: added 5.3 branch; PATCHLEVEL=1 for 5.2 branch to set
MARIADB_BRANCH in tablet for further usage; updated website
diff --git a/database/mariadb/INSTALL b/database/mariadb/INSTALL
index 9c90b69..1db0634 100755
--- a/database/mariadb/INSTALL
+++ b/database/mariadb/INSTALL
@@ -1,13 +1,17 @@
-make benchdir_root="${TRACK_ROOT}/usr/share/mysql" \
- testroot="${TRACK_ROOT}/usr/share/mysql" \
- install &&
+if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ default_install
+else
+ make benchdir_root="${TRACK_ROOT}/usr/share/mysql" \
+ testroot="${TRACK_ROOT}/usr/share/mysql" \
+ install &&
-if [[ $MARIA_TESTS == n ]]; then
+ if [[ $MARIA_TESTS == n ]]; then
rm -rf "${INSTALL_ROOT}/usr/share/mysql/mysql-test"
-fi &&
+ fi &&
-if [[ $MARIA_BENCH == n ]]; then
- rm -fr "${INSTALL_ROOT}/usr/share/mysql/sql-bench"
+ if [[ $MARIA_BENCH == n ]]; then
+ rm -rf "${INSTALL_ROOT}/usr/share/mysql/sql-bench"
+ fi
fi &&
if [[ $INIT_INSTALLED ]]; then
diff --git a/database/mariadb/PREPARE b/database/mariadb/PREPARE
index cb0d439..708765d 100755
--- a/database/mariadb/PREPARE
+++ b/database/mariadb/PREPARE
@@ -7,12 +7,12 @@
#
persistent_read $SPELL MARIADB_BRANCH MARIADB_BRANCH || true &&
-if [[ -z "$MARIADB_BRANCH" ]]; then
+if spell_ok $SPELL && [[ -z "$MARIADB_BRANCH" ]]; then
persistent_add MARIADB_BRANCH &&
local MARIADB_BRANCH="5.2"
fi &&
-# our zlib location isn't default
-if is_depends_enabled $SPELL zlib; then
- patch -p0 < "$SPELL_DIRECTORY/zlib-conf.patch"
+if [[ $MARIADB_BRANCH != 5.5 ]]; then
+ sedit 's:$(libdir)/@PACKAGE@:$(libdir):' libmysql/Makefile.in &&
+ sedit 's:$(libdir)/@PACKAGE@:$(libdir):' libmysql_r/Makefile.in &&
+
+ # our zlib location isn't default
+ if is_depends_enabled $SPELL zlib; then
+ patch -p0 < "$SPELL_DIRECTORY/zlib-conf.patch"
+ fi
+else
+ sedit "s:data/test:share/mysql/data/test:" sql/CMakeLists.txt &&
+ sedit "s:MYSQLD_USER \"mysql\":MYSQLD_USER \"mariadb\":"
scripts/CMakeLists.txt
fi
diff --git a/database/mariadb/PRE_SUB_DEPENDS
b/database/mariadb/PRE_SUB_DEPENDS
index ede9a09..e5dae45 100755
--- a/database/mariadb/PRE_SUB_DEPENDS
+++ b/database/mariadb/PRE_SUB_DEPENDS
@@ -1,6 +1,20 @@
case $THIS_SUB_DEPENDS in
- embedded|EMBEDDED) if list_find "$MADB_OPTS" "--with-embedded-server";
then return 0; fi;;
- innodb|INNODB) if [[ $MADB_ENGINES == *innodb_plugin* || "$MADB_ENGINES"
== "all" ]]; then return 0; fi;;
- NDB) if [[ $MADB_ENGINES == *ndbcluster* || "$MADB_ENGINES" == "all" ]];
then return 0; fi;;
+ embedded|EMBEDDED) if list_find "$MARIADB_OPTS" "--with-embedded-server"
|| \
+ list_find "$MARIADB_OPTS"
"-DWITH_EMBEDDED_SERVER=ON"; then
+ return 0
+ fi
+ ;;
+ innodb|INNODB) if list_find "$MARIADB_ENGINES" "innodb_plugin" || \
+ list_find "$MARIADB_ENGINES" "innobase" || \
+ list_find "$MARIADB_ENGINES" "all"; then
+ return 0
+ fi
+ ;;
+ NDB) if list_find "$MARIADB_ENGINES" "ndbcluster" || \
+ list_find "$MARIADB_ENGINES" "all"; then
+ return 0
+ fi
+ ;;
esac
+
return 1
diff --git a/database/mariadb/REPAIR^all^PRE_SUB_DEPENDS
b/database/mariadb/REPAIR^all^PRE_SUB_DEPENDS
new file mode 100755
index 0000000..e5dae45
--- /dev/null
+++ b/database/mariadb/REPAIR^all^PRE_SUB_DEPENDS
@@ -0,0 +1,20 @@
+case $THIS_SUB_DEPENDS in
+ embedded|EMBEDDED) if list_find "$MARIADB_OPTS" "--with-embedded-server"
|| \
+ list_find "$MARIADB_OPTS"
"-DWITH_EMBEDDED_SERVER=ON"; then
+ return 0
+ fi
+ ;;
+ innodb|INNODB) if list_find "$MARIADB_ENGINES" "innodb_plugin" || \
+ list_find "$MARIADB_ENGINES" "innobase" || \
+ list_find "$MARIADB_ENGINES" "all"; then
+ return 0
+ fi
+ ;;
+ NDB) if list_find "$MARIADB_ENGINES" "ndbcluster" || \
+ list_find "$MARIADB_ENGINES" "all"; then
+ return 0
+ fi
+ ;;
+esac
+
+return 1
diff --git a/database/mariadb/SUB_DEPENDS b/database/mariadb/SUB_DEPENDS
index fb44ab1..88bc25a 100755
--- a/database/mariadb/SUB_DEPENDS
+++ b/database/mariadb/SUB_DEPENDS
@@ -1,17 +1,32 @@
case $THIS_SUB_DEPENDS in
- embedded|EMBEDDED) echo "Embbeded mysql requested, forcing it." &&
- MADB_OPTS="--with-embedded-server $MADB_OPTS"
;;
- innodb|INNODB) echo "InnoDB storage engine support requested, forcing
it." &&
- if [ "$MADB_ENGINES" == "none" ]; then
- MADB_ENGINES="innodb_plugin"
- else
- MADB_ENGINES="innodb_plugin $MADB_ENGINES"
- fi ;;
- NDB) echo "ndbcluster storage engine support requested, forcing it." &&
- if [ "$MADB_ENGINES" == "none" ]; then
- MADB_ENGINES="ndbcluster"
- else
- MADB_ENGINES="ndbcluster $MADB_ENGINES"
- fi ;;
- *) echo "unknown sub-depends!"; return 1 ;;
+ embedded|EMBEDDED) message "${MESSAGE_COLOR}Embbeded server requested,
forcing it.${DEFAULT_COLOR}" &&
+ if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ list_remove "MARIADB_OPTS"
"-DWITH_EMBEDDED_SERVER=OFF" &&
+ list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=ON"
+ else
+ list_remove "MARIADB_OPTS"
"--without-embedded-server" &&
+ list_add "MARIADB_OPTS" "--with-embedded-server"
+ fi
+ ;;
+ innodb|INNODB) message "${MESSAGE_COLOR}InnoDB storage engine support
requested, forcing it.${DEFAULT_COLOR}" &&
+ if list_find "$MARIADB_ENGINES" "none"; then
+ list_remove "MARIADB_ENGINES" "none"
+ fi &&
+
+ if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ list_add "MARIADB_ENGINES" innobase
+ else
+ list_add "MARIADB_ENGINES" innodb_plugin
+ fi
+ ;;
+ NDB) message "${MESSAGE_COLOR}ndbcluster storage engine
support requested, forcing it.${DEFAULT_COLOR}" &&
+ if list_find "$MARIADB_ENGINES" "none"; then
+ list_remove "MARIADB_ENGINES" "none"
+ fi &&
+
+ list_add "MARIADB_ENGINES" "ndbcluster"
+ ;;
+ *) message "${PROBLEM_COLOR}Unknown
sub-depends!${DEFAULT_COLOR}" &&
+ return 1
+ ;;
esac
diff --git a/database/mariadb/UP_TRIGGERS b/database/mariadb/UP_TRIGGERS
index 000b21c..daf653e 100755
--- a/database/mariadb/UP_TRIGGERS
+++ b/database/mariadb/UP_TRIGGERS
@@ -1,14 +1,18 @@
-# up_trigger everything on update to 5.1.32 as most stuff links to
libmysqlclient.so.15 from version 5.0.77
+# up_trigger everything on branch updates
+local NEW_SPELL_BRANCH="" &&
+local OLD_SPELL_BRANCH="" &&
+
+if spell_ok $SPELL; then
+ NEW_SPELL_BRANCH="$(echo $VERSION | cut -d. -f1,2)" &&
+ OLD_SPELL_BRANCH="$(installed_version $SPELL | cut -d. -f1,2)" &&
+
+ if test "${NEW_SPELL_BRANCH}" != "${OLD_SPELL_BRANCH}"; then
+ message "${MESSAGE_COLOR}This is a possibly incompatible update of
$SPELL..." &&
+ message "Figuring out what spells need to be recast, this may take a
while.${DEFAULT_COLOR}" &&
-local OLD_SPELL_VERSION=""
-if spell_ok $SPELL; then
- OLD_SPELL_VERSION="$(installed_version $SPELL)"
- if test "${VERSION:0:3}" != "${OLD_SPELL_VERSION:0:3}"; then
- message "This is a possibly incompatible update of libmysql..."
- message "Figuring out what spells need to be recast, this may take a
while."
for each in $(show_up_depends $SPELL 1); do
- if gaze install $each | xargs readelf -d 2> /dev/null |
- grep -q "NEEDED.*libmysqlclient.so.15"; then
+ if gaze -q install $each | xargs readelf -d 2> /dev/null |
+ grep -Eq "NEEDED.*libmysqlclient(_r)?.so"; then
up_trigger $each cast_self
fi
done
diff --git a/database/mongodb/BUILD b/database/mongodb/BUILD
index 2b10b63..73c97d7 100755
--- a/database/mongodb/BUILD
+++ b/database/mongodb/BUILD
@@ -1,6 +1,18 @@
create_account mongodb &&
-# use bundled spidermonkey, 2.2 will switch to V8
-OPTS="--sharedclient --usesm $OPTS" &&
+if ! list_find "$LDFLAGS" "-s"; then
+ OPTS="--nostrip $OPTS"
+fi &&
diff --git a/libs/gmp/DETAILS b/libs/gmp/DETAILS
index ea3af1f..8f95d93 100755
--- a/libs/gmp/DETAILS
+++ b/libs/gmp/DETAILS
@@ -1,7 +1,8 @@
SPELL=gmp
if [[ $GMP_DEVEL == "y" ]]; then
- VERSION=5.1.3
- SOURCE=$SPELL-$VERSION.tar.xz
+ VERSION=6.0.0
+ XVERSION=a
+ SOURCE=$SPELL-$VERSION$XVERSION.tar.xz
else
VERSION=4.3.2
PATCHLEVEL=0
diff --git a/libs/gmp/HISTORY b/libs/gmp/HISTORY
index 0010fa4..b3c0764 100644
--- a/libs/gmp/HISTORY
+++ b/libs/gmp/HISTORY
@@ -1,3 +1,6 @@
+2014-03-30 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 6.0.0a
+
2013-10-15 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 5.1.3 (devel)
diff --git a/libs/google-perftools/DEPENDS b/libs/google-perftools/DEPENDS
index 968d179..3d40085 100755
--- a/libs/google-perftools/DEPENDS
+++ b/libs/google-perftools/DEPENDS
@@ -3,7 +3,7 @@ if [[ ${SMGL_COMPAT_ARCHS[1]} == x86_64 ]] ; then
else
optional_depends libunwind \
"" "" \
- "Use libunwind instead of relying on the frame pointer?"
+ "to use libunwind instead of relying on the frame
pointer"
fi &&
depends -sub CXX gcc &&
diff --git a/libs/google-perftools/DETAILS b/libs/google-perftools/DETAILS
index 469c33d..a630b84 100755
--- a/libs/google-perftools/DETAILS
+++ b/libs/google-perftools/DETAILS
@@ -1,11 +1,12 @@
SPELL=google-perftools
- VERSION=1.7
- SOURCE=$SPELL-$VERSION.tar.gz
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
- SOURCE_URL[0]=http://google-perftools.googlecode.com/files/$SOURCE
-
SOURCE_HASH=sha512:610b7c93d21266ffa62858a754d7f1dcd8a5612114f3cf1a32456d9c838f08d5bb984ccdb98e9cd5037f4a232879b96b0430dc7e372d7e47d165a990d0c13e82
+ SPELLX=gperftools
+ VERSION=2.1
+ SOURCE=$SPELLX-$VERSION.tar.gz
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELLX-$VERSION"
+ SOURCE_URL[0]=http://gperftools.googlecode.com/files/$SOURCE
+
SOURCE_HASH=sha512:b5e3387fa4865fc1dd91c60311335aec18c76519ee5016278a3b114e117ba8936772321f7a18c003e54a641a19c249e20916347e44a67ded76d7a9f04230fd03
LICENSE[0]=BSD
- WEB_SITE=http://code.google.com/p/google-perftools/
+ WEB_SITE=http://code.google.com/p/gperftools/
KEYWORDS="libs"
ENTERED=20070627
SHORT='Robust performance tools from Google'
diff --git a/libs/google-perftools/HISTORY b/libs/google-perftools/HISTORY
index a1e5468..e873018 100644
--- a/libs/google-perftools/HISTORY
+++ b/libs/google-perftools/HISTORY
@@ -1,9 +1,14 @@
+2014-04-06 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: updated spell to 2.1; renewed website, source url; quoting
+ paths
+ * DEPENDS: cleaned up
+
2011-07-30 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DEPENDS: changed dependency on g++ to dependency on gcc with
sub-depends on CXX (scripted)
2011-05-11 David Kowis <dkowis AT shlrm.org>
- * DETAILS: version to 1.7
+ * DETAILS: version to 1.7
2009-04-21 Ethan Grammatikidis <eekee57 AT fastmail.fm>
* DEPENDS: requires libunwind in x86_64, optionally depends on it on
diff --git a/libs/libtcod/0001-fix-installation-destination.patch
b/libs/libtcod/0001-fix-installation-destination.patch
new file mode 100644
index 0000000..9b125a0
--- /dev/null
+++ b/libs/libtcod/0001-fix-installation-destination.patch
@@ -0,0 +1,39 @@
+From 28f7c93390c97a7af648d643fc96d344eeb0252a Mon Sep 17 00:00:00 2001
+From: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+Date: Mon, 7 Apr 2014 19:19:39 +0200
+Subject: [PATCH] fix installation destination
+
+---
+ CMakeLists.txt | 2 +-
+ src/CMakeLists.txt | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a573528..5dea975 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@ include_directories(include)
+ find_package(OpenGL REQUIRED)
+
+ SET(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+-SET(INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR})
++SET(INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
+ SET(DEPENDENCY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dependencies)
+ SET(GUI_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/gui)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index c882ded..14bb952 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -85,6 +85,6 @@ ENDIF()
+
+ #${LIBTCOD_CPP_NAME} is empty on non-linux platforms
+ INSTALL(TARGETS ${LIBTCOD_NAME} ${LIBTCOD_GUI_NAME} ${LIBTCOD_CPP_NAME}
+- RUNTIME DESTINATION ${INSTALL_DIR}
+- LIBRARY DESTINATION ${INSTALL_DIR}
++ RUNTIME DESTINATION ${INSTALL_DIR}/bin
++ LIBRARY DESTINATION ${INSTALL_DIR}/lib
+ )
+--
+1.9.0
+
diff --git a/libs/libtcod/BUILD b/libs/libtcod/BUILD
new file mode 100755
index 0000000..2a137fa
--- /dev/null
+++ b/libs/libtcod/BUILD
@@ -0,0 +1,2 @@
+OPTS+=" -DLIBTCOD_SAMPLES=off" &&
+cmake_build
diff --git a/libs/libtcod/DEPENDS b/libs/libtcod/DEPENDS
new file mode 100755
index 0000000..7c6f202
--- /dev/null
+++ b/libs/libtcod/DEPENDS
@@ -0,0 +1,2 @@
+depends sdl &&
+depends upx
diff --git a/libs/libtcod/DETAILS b/libs/libtcod/DETAILS
new file mode 100755
index 0000000..bbfcb10
--- /dev/null
+++ b/libs/libtcod/DETAILS
@@ -0,0 +1,16 @@
+ SPELL=libtcod
+ VERSION=1.5.1
+ VERSION_HASH="d56ffc19afb9"
+ SOURCE="libtcod-${VERSION}.tar.bz2"
+ SOURCE_URL[0]=https://bitbucket.org/jice/${SPELL}/get/${VERSION}.tar.bz2
+
SOURCE_HASH=sha512:0db7196b01838b5301f46fff42b62aa42f4835e2647a5aca1b5ae55885f43d392bb7035c5af26be3d08ac439a7d55d18edb20b1ef5e7bd8eb1e0fd1428f88c69
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/jice-${SPELL}-${VERSION_HASH}"
+ WEB_SITE="http://doryen.eptalys.net/libtcod/"
+ LICENSE[0]=BSD
+ ENTERED=20140407
+ SHORT="a free, fast, portable and uncomplicated API for roguelike
games"
+cat << EOF
+libtcod, a.k.a. “The Doryen Library”, is a free, fast, portable and
+uncomplicated API for roguelike developpers providing an advanced true color
+console, input, and lots of other utilities frequently used in roguelikes.
+EOF
diff --git a/libs/libtcod/HISTORY b/libs/libtcod/HISTORY
new file mode 100644
index 0000000..4cc134f
--- /dev/null
+++ b/libs/libtcod/HISTORY
@@ -0,0 +1,4 @@
+2014-04-07 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * 0001-fix-installation-destination.patch, BUILD, DEPENDS,
+ DETAILS, PRE_BUILD, INSTALL: spell created
+
diff --git a/libs/libtcod/INSTALL b/libs/libtcod/INSTALL
new file mode 100755
index 0000000..fd9a1b9
--- /dev/null
+++ b/libs/libtcod/INSTALL
@@ -0,0 +1,7 @@
+default_install &&
+
+mkdir -p ${INSTALL_ROOT}/usr/include/tcod &&
+install -m644 $SOURCE_DIRECTORY/include/*.{h,hpp}
${INSTALL_ROOT}/usr/include/tcod &&
+
+mkdir -p ${INSTALL_ROOT}/usr/share/libtcod &&
+install -m644 $SOURCE_DIRECTORY/terminal.png $INSTALL_ROOT/usr/share/libtcod/
diff --git a/libs/libtcod/PRE_BUILD b/libs/libtcod/PRE_BUILD
new file mode 100755
index 0000000..e803469
--- /dev/null
+++ b/libs/libtcod/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+
+patch -p1 < $SPELL_DIRECTORY/0001-fix-installation-destination.patch
diff --git a/libs/libusb/DEPENDS b/libs/libusb/DEPENDS
index 864c31e..901a4da 100755
--- a/libs/libusb/DEPENDS
+++ b/libs/libusb/DEPENDS
@@ -10,7 +10,7 @@ optional_depends doxygen \
"" \
"Build C++ API documentation" &&
-optional_depends udev \
+optional_depends UDEV \
"--enable-udev" \
"--disable-udev" \
"udev support"
diff --git a/libs/libusb/HISTORY b/libs/libusb/HISTORY
index 854c8fe..ea3fbc4 100644
--- a/libs/libusb/HISTORY
+++ b/libs/libusb/HISTORY
@@ -1,3 +1,6 @@
+2014-04-05 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DEPENDS: depend on UDEV instead of udev
+
2014-02-27 Remko van der Vossen <wich AT sourcemage.org>
* DEPENDS: optional dependency on udev
if is_depends_enabled $SPELL v4l-utils; then
if is_depends_enabled $SPELL alsa-lib || is_depends_enabled $SPELL oss;
then
config_query_option MPV_OPTS "Enable radio capture (through
PCI/line-in)?" n \
- "--enable-radio-capture" \
+ "" \
"--disable-radio-capture"
else
list_add MPV_OPTS "--disable-radio-capture"
@@ -160,7 +162,7 @@ if is_depends_enabled $SPELL v4l-utils; then
fi &&