summaryrefslogtreecommitdiffstats
path: root/arts/modules/synth
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /arts/modules/synth
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/modules/synth')
-rw-r--r--arts/modules/synth/Makefile.am4
-rw-r--r--arts/modules/synth/c_filter_stuff.h12
-rw-r--r--arts/modules/synth/synth_cdelay_impl.cc20
-rw-r--r--arts/modules/synth/synth_delay_impl.cc20
4 files changed, 28 insertions, 28 deletions
diff --git a/arts/modules/synth/Makefile.am b/arts/modules/synth/Makefile.am
index 3995f402..c9922aaa 100644
--- a/arts/modules/synth/Makefile.am
+++ b/arts/modules/synth/Makefile.am
@@ -31,10 +31,10 @@ libartsmodulessynth_la_COMPILE_FIRST = artsmodulessynth.h ../../midi/artsmidi.h
libartsmodulessynth_la_LIBADD = \
$(top_builddir)/arts/runtime/libartsbuilder.la \
$(top_builddir)/arts/midi/libartsmidi_idl.la \
- -lartsflow -lartsflow_idl -lmcop
+ -lartsflow -lgsl -lartsflow_idl -lmcop
#libartsmodulessynth_la_LIBADD = $(top_builddir)/arts/gui/common/libartsgui_idl.la $(top_builddir)/arts/midi/libartsmidi_idl.la -lartsflow -lartsflow_idl -lmcop $(LIBDL) $(LIB_KDEUI) $(LIB_KDECORE)
-libartsmodulessynth_la_LDFLAGS = $(all_libraries) -L$(arts_libraries) -no-undefined
+libartsmodulessynth_la_LDFLAGS = $(all_libraries) -L$(arts_libraries) -lartsflow -lgsl -no-undefined
artsmodulessynth.cc artsmodulessynth.h artsmodulessynth.mcoptype artsmodulessynth.mcopclass: $(srcdir)/artsmodulessynth.idl $(MCOPIDL)
$(MCOPIDL) -t $(MCOP_INCLUDES) $(srcdir)/artsmodulessynth.idl
diff --git a/arts/modules/synth/c_filter_stuff.h b/arts/modules/synth/c_filter_stuff.h
index edd7a4af..89e93de3 100644
--- a/arts/modules/synth/c_filter_stuff.h
+++ b/arts/modules/synth/c_filter_stuff.h
@@ -150,12 +150,12 @@ typedef struct {
int buflen;
} ty_afmethod;
-#define C_FLOWOUQT_METHOD 0
-#define C_RBQT_METHOD 1
-#define C_SWAPROQT_METHOD 2
-#define C_SWAPRWQT_METHOD 3
-#define C_AIMROQT_METHOD 4
-#define C_AIMRWQT_METHOD 5
+#define C_FLOWOUTQT_METHOD 0
+#define C_RBTQT_METHOD 1
+#define C_SWAPROTQT_METHOD 2
+#define C_SWAPRWTQT_METHOD 3
+#define C_AIMROTQT_METHOD 4
+#define C_AIMRWTQT_METHOD 5
typedef struct {
char *filename;
diff --git a/arts/modules/synth/synth_cdelay_impl.cc b/arts/modules/synth/synth_cdelay_impl.cc
index 28f4d12f..267daab8 100644
--- a/arts/modules/synth/synth_cdelay_impl.cc
+++ b/arts/modules/synth/synth_cdelay_impl.cc
@@ -43,14 +43,14 @@ class Synth_CDELAY_impl : virtual public Synth_CDELAY_skel,
{
protected:
unsigned long _buffersize;
- unsigned long _bitmask;
+ unsigned long _bittqmask;
float *_buffer; // holds the data to be delayed (variable size)
float _delaytime;
unsigned int _readpos;
unsigned int _writepos;
public:
- Synth_CDELAY_impl() : _buffersize( 0 ), _bitmask( 0 ), _buffer( 0 ), _delaytime( 0 ), _readpos( 0 ), _writepos( 0 )
+ Synth_CDELAY_impl() : _buffersize( 0 ), _bittqmask( 0 ), _buffer( 0 ), _delaytime( 0 ), _readpos( 0 ), _writepos( 0 )
{
}
@@ -66,7 +66,7 @@ public:
_delaytime = newTime;
double n = ceil( log( double(_delaytime * samplingRateFloat )) / log( 2. ) );
unsigned long newbuffersize = (unsigned long)( pow( 2, n ) );
- unsigned long newbitmask = newbuffersize - 1;
+ unsigned long newbittqmask = newbuffersize - 1;
if( newbuffersize != _buffersize )
{
float *newbuffer = new float[newbuffersize];
@@ -74,24 +74,24 @@ public:
for( unsigned long i = 0; i < _buffersize; i++ ) {
newbuffer[i] = _buffer[_writepos];
_writepos++;
- _writepos &= newbitmask;
+ _writepos &= newbittqmask;
}
for( unsigned long i = _buffersize; i < newbuffersize; i++ )
newbuffer[i] = 0;
} else {
_writepos -= newbuffersize;
- _writepos &= newbitmask;
+ _writepos &= newbittqmask;
for( unsigned long i = 0; i < newbuffersize; i++ ) {
newbuffer[i] = _buffer[_writepos];
_writepos++;
- _writepos &= newbitmask;
+ _writepos &= newbittqmask;
}
}
_buffer = newbuffer;
_buffersize = newbuffersize;
- _bitmask = newbitmask;
+ _bittqmask = newbittqmask;
}
- _readpos = (unsigned long)rint( _writepos - _delaytime * samplingRateFloat ) & _bitmask;
+ _readpos = (unsigned long)rint( _writepos - _delaytime * samplingRateFloat ) & _bittqmask;
time_changed( _delaytime );
}
@@ -113,9 +113,9 @@ public:
_buffer[_writepos] = invalue[i];
outvalue[i] = _buffer[_readpos];
_readpos++;
- _readpos &= _bitmask;
+ _readpos &= _bittqmask;
_writepos++;
- _writepos &= _bitmask;
+ _writepos &= _bittqmask;
}
}
};
diff --git a/arts/modules/synth/synth_delay_impl.cc b/arts/modules/synth/synth_delay_impl.cc
index 92c23fd1..57285118 100644
--- a/arts/modules/synth/synth_delay_impl.cc
+++ b/arts/modules/synth/synth_delay_impl.cc
@@ -56,13 +56,13 @@ class Synth_DELAY_impl : virtual public Synth_DELAY_skel,
{
protected:
unsigned long _buffersize;
- unsigned long _bitmask;
+ unsigned long _bittqmask;
float * _buffer;
float _maxdelay;
unsigned int _writepos;
public:
- Synth_DELAY_impl() : _buffersize( 0 ), _bitmask( 0 ), _buffer( 0 ), _maxdelay( 0 ), _writepos( 0 )
+ Synth_DELAY_impl() : _buffersize( 0 ), _bittqmask( 0 ), _buffer( 0 ), _maxdelay( 0 ), _writepos( 0 )
{
maxdelay( 1 ); // take a one second buffer if nothing else is specified
}
@@ -85,15 +85,15 @@ public:
{
double int_pos;
double error = modf( time[i] * samplingRateFloat, &int_pos );
- unsigned long readpos1 = ( _writepos - (unsigned long)(int_pos) ) & _bitmask;
- unsigned long readpos2 = ( readpos1 - 1 ) & _bitmask; // Shouldn't this be +1? (mkretz)
+ unsigned long readpos1 = ( _writepos - (unsigned long)(int_pos) ) & _bittqmask;
+ unsigned long readpos2 = ( readpos1 - 1 ) & _bittqmask; // Shouldn't this be +1? (mkretz)
// No, it's right this way:
// ( 1 - error ) needs to be multiplied with the second
// sample; error with the first
_buffer[_writepos] = invalue[i];
outvalue[i] = _buffer[readpos1] * ( 1 - error ) + _buffer[readpos2] * error;
_writepos++;
- _writepos &= _bitmask;
+ _writepos &= _bittqmask;
}
}
@@ -106,7 +106,7 @@ public:
_maxdelay = newmaxdelay;
double n = ceil( log( double(_maxdelay * samplingRateFloat) ) / log( 2. ) );
unsigned long newbuffersize = (unsigned long)( pow( 2, n ) );
- unsigned long newbitmask = newbuffersize - 1;
+ unsigned long newbittqmask = newbuffersize - 1;
if( newbuffersize != _buffersize )
{
float *newbuffer = new float[newbuffersize];
@@ -114,22 +114,22 @@ public:
for( unsigned long i = 0; i < _buffersize; i++ ) {
newbuffer[i] = _buffer[_writepos];
_writepos++;
- _writepos &= newbitmask;
+ _writepos &= newbittqmask;
}
for( unsigned long i = _buffersize; i < newbuffersize; i++ )
newbuffer[i] = 0;
} else {
_writepos -= newbuffersize;
- _writepos &= newbitmask;
+ _writepos &= newbittqmask;
for( unsigned long i = 0; i < newbuffersize; i++ ) {
newbuffer[i] = _buffer[_writepos];
_writepos++;
- _writepos &= newbitmask;
+ _writepos &= newbittqmask;
}
}
_buffer = newbuffer;
_buffersize = newbuffersize;
- _bitmask = newbitmask;
+ _bittqmask = newbittqmask;
}
maxdelay_changed( _maxdelay );
}