From owner-svn-ports-head@FreeBSD.ORG Thu Dec 19 19:27:22 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DEF0C86; Thu, 19 Dec 2013 19:27:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 000D510E4; Thu, 19 Dec 2013 19:27:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBJJRL7K069653; Thu, 19 Dec 2013 19:27:21 GMT (envelope-from pawel@svn.freebsd.org) Received: (from pawel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBJJRLC4069651; Thu, 19 Dec 2013 19:27:21 GMT (envelope-from pawel@svn.freebsd.org) Message-Id: <201312191927.rBJJRLC4069651@svn.freebsd.org> From: Pawel Pekala Date: Thu, 19 Dec 2013 19:27:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336949 - in head/audio/alienwah: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2013 19:27:22 -0000 Author: pawel Date: Thu Dec 19 19:27:21 2013 New Revision: 336949 URL: http://svnweb.freebsd.org/changeset/ports/336949 Log: - Fix build on -current - Add LICENSE PR: ports/184829 Submitted by: KATO Tsuguru Modified: head/audio/alienwah/Makefile (contents, props changed) head/audio/alienwah/files/patch-aw.cpp (contents, props changed) Modified: head/audio/alienwah/Makefile ============================================================================== --- head/audio/alienwah/Makefile Thu Dec 19 19:16:55 2013 (r336948) +++ head/audio/alienwah/Makefile Thu Dec 19 19:27:21 2013 (r336949) @@ -8,15 +8,17 @@ CATEGORIES= audio MASTER_SITES= http://plugin.org.uk/releases/alienwah/ MAINTAINER= ports@FreeBSD.org -COMMENT= Paul Nasca's AlienWah LADSPA Plugin +COMMENT= Paul Nasca's AlienWah LADSPA plugin + +LICENSE= GPLv2 BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:${PORTSDIR}/audio/ladspa USES= gmake MAKE_ARGS= CPP="${CXX}" CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include -fPIC" -PLIST_DIRSTRY= lib/ladspa PLIST_FILES= lib/ladspa/aw.so +PLIST_DIRSTRY= lib/ladspa do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/ladspa Modified: head/audio/alienwah/files/patch-aw.cpp ============================================================================== --- head/audio/alienwah/files/patch-aw.cpp Thu Dec 19 19:16:55 2013 (r336948) +++ head/audio/alienwah/files/patch-aw.cpp Thu Dec 19 19:27:21 2013 (r336949) @@ -1,5 +1,22 @@ ---- aw.cpp.orig Sat Jan 26 02:51:03 2002 -+++ aw.cpp Sat May 26 22:33:51 2007 +--- aw.cpp.orig 2002-01-26 02:51:03.000000000 +0900 ++++ aw.cpp 2013-12-04 04:50:18.000000000 +0900 +@@ -62,11 +62,11 @@ + + /*****************************************************************************/ + +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include + + /*****************************************************************************/ + @@ -85,6 +85,8 @@ #define AW_INPUT2 6 #define AW_OUTPUT2 7 @@ -9,8 +26,29 @@ /*****************************************************************************/ /* Make number of samples represented by 'delay' proportional to * the sample rate, such that delay=1 is 1 sample buffer at -@@ -139,21 +141,57 @@ - c2(float_complex(0,0)) { +@@ -118,10 +120,10 @@ + unsigned long t2; //?? + unsigned long k; // index for delaybuf + unsigned long k2; // index for delaybuf2 +-float_complex * delaybuf; +-float_complex * delaybuf2; +-float_complex c; //?? +-float_complex c2; //?? ++std::complex * delaybuf; ++std::complex * delaybuf2; ++std::complex c; //?? ++std::complex c2; //?? + float freq; + float startphase; + float feedback; +@@ -135,25 +137,61 @@ + samplerate(lSampleRate), + t(0), t2(0), + k(0), k2(0), +- c(float_complex(0,0)), +- c2(float_complex(0,0)) { ++ c(std::complex(0,0)), ++ c2(std::complex(0,0)) { } +friend LADSPA_Handle instantiateAW(const LADSPA_Descriptor *, @@ -40,12 +78,12 @@ +printf("delay %d\n", delay); + if (delay < 1) delay = 1; + if (delay > MAX_DELAY) delay = MAX_DELAY; -+ delaybuf = new float_complex[delay]; ++ delaybuf = new std::complex[delay]; + if (chans == 2) { -+ delaybuf2 = new float_complex[MAX_DELAY+1]; ++ delaybuf2 = new std::complex[MAX_DELAY+1]; + } + for (unsigned int i =0; i(0,0); + } +} @@ -73,7 +111,7 @@ switch (port) { case AW_FREQ: ((AW *)instance)->lfreq = *datalocation; -@@ -182,38 +220,16 @@ +@@ -182,41 +220,19 @@ * connect_port may be called before of after here, so we * cannot rely upon port data for initialization */ @@ -115,8 +153,21 @@ +{ AW * me = (AW *)instance; float lfo; - float_complex outc; -@@ -238,7 +254,8 @@ +- float_complex outc; ++ std::complex outc; + float lfoskip = me->freq * 2 * PI / me->samplerate; + + if (! me->inited) me->initState(1); +@@ -224,7 +240,7 @@ + for(unsigned int i=0; it++ % LFO_SKIPSAMPLES) == 0) { + lfo = 1 + cos(me->t * lfoskip + me->startphase); +- me->c = float_complex(cos(lfo) * me->feedback, ++ me->c = std::complex(cos(lfo) * me->feedback, + sin(lfo) * me->feedback); + } + outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) * +@@ -238,10 +254,11 @@ /* * Stereo effect? */ @@ -125,7 +176,29 @@ +{ AW * me = (AW *)instance; float lfo; - float_complex outc; +- float_complex outc; ++ std::complex outc; + float lfoskip = me->freq * 2 * PI / me->samplerate; + + if (! me->inited) me->initState(2); +@@ -249,7 +266,7 @@ + for(unsigned int i=0; it++ % LFO_SKIPSAMPLES) == 0) { + lfo = 1 + cos(me->t * lfoskip + me->startphase); +- me->c = float_complex(cos(lfo) * me->feedback, ++ me->c = std::complex(cos(lfo) * me->feedback, + sin(lfo) * me->feedback); + } + outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) * +@@ -262,7 +279,7 @@ + for(unsigned int i=0; it2++ % LFO_SKIPSAMPLES) == 0) { + lfo = 1 + cos(me->t2 * lfoskip); +- me->c2 = float_complex(cos(lfo) * me->feedback, ++ me->c2 = std::complex(cos(lfo) * me->feedback, + sin(lfo) * me->feedback); + } + outc = me->c2 * me->delaybuf2[me->k2] + (1 - me->feedback) * @@ -273,13 +290,11 @@ } }