From 27edf28be2772229a7974a007313ea30d92c3ffd Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 22:19:39 +0000 Subject: rename the following methods: tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- arts/modules/README.environments | 2 +- arts/modules/common/artsmodulescommon.idl | 4 ++-- arts/modules/common/effectrackslot_impl.cc | 16 ++++++++-------- arts/modules/common/env_effectrackitem_impl.cc | 6 +++--- arts/modules/common/env_instrumentitem_impl.cc | 2 +- arts/modules/common/env_item_impl.cc | 2 +- arts/modules/common/env_item_impl.h | 2 +- arts/modules/common/env_mixeritem_impl.cc | 22 +++++++++++----------- arts/modules/effects/fivebandmonocomplexeq_impl.cc | 20 ++++++++++---------- arts/modules/effects/freeverbguifactory_impl.cc | 10 +++++----- .../modules/effects/kstereovolumecontrolgui_impl.h | 2 +- .../effects/synth_stereo_fir_equalizer_impl.cc | 4 ++-- .../modules/effects/voiceremovalguifactory_impl.cc | 4 ++-- arts/modules/synth/synth_cdelay_impl.cc | 20 ++++++++++---------- arts/modules/synth/synth_delay_impl.cc | 20 ++++++++++---------- 15 files changed, 68 insertions(+), 68 deletions(-) (limited to 'arts/modules') diff --git a/arts/modules/README.environments b/arts/modules/README.environments index 5dc6c66e..0ac64df5 100644 --- a/arts/modules/README.environments +++ b/arts/modules/README.environments @@ -155,7 +155,7 @@ to tell the Item in which environment it lives. It also uses setContainer( Container::null()) once the Item gets removed. Which container the Item is in can be seen in the - readonly attribute Container tqparent; + readonly attribute Container parent; Upon serialization, the container uses diff --git a/arts/modules/common/artsmodulescommon.idl b/arts/modules/common/artsmodulescommon.idl index 7f657568..10ccd218 100644 --- a/arts/modules/common/artsmodulescommon.idl +++ b/arts/modules/common/artsmodulescommon.idl @@ -72,7 +72,7 @@ module Environment { /** * the container the item lives in */ - readonly attribute Container tqparent; + readonly attribute Container parent; /** * called by the container to insert/remove item from/to the @@ -150,7 +150,7 @@ interface EffectRackItemGui { }; interface EffectRackSlot { - void constructor( Widget tqparent, Widget effect, EffectRackItemGui effectrackgui ); + void constructor( Widget parent, Widget effect, EffectRackItemGui effectrackgui ); /*writeonly*/ attribute boolean removeslot; /*writeonly*/ attribute boolean tomaster; }; diff --git a/arts/modules/common/effectrackslot_impl.cc b/arts/modules/common/effectrackslot_impl.cc index 359c40a3..8e7e48e8 100644 --- a/arts/modules/common/effectrackslot_impl.cc +++ b/arts/modules/common/effectrackslot_impl.cc @@ -42,23 +42,23 @@ class EffectRackSlot_impl : virtual public EffectRackSlot_skel { } - void constructor( Widget tqparent, Widget effect, EffectRackItemGui effectrackgui ) + void constructor( Widget parent, Widget effect, EffectRackItemGui effectrackgui ) { _effectrackgui = effectrackgui; - _hbox.tqparent( tqparent ); + _hbox.parent( parent ); _hbox.margin( 0 ); _hbox.spacing( 0 ); _hbox.framestyle( Sunken | Panel ); _hbox.linewidth( 1 ); _hbox.show(); - _buttonbox.tqparent( _hbox ); + _buttonbox.parent( _hbox ); _buttonbox.margin( 0 ); _buttonbox.spacing( 0 ); _buttonbox.show(); - _removeButton.tqparent( _buttonbox ); + _removeButton.parent( _buttonbox ); _removeButton.text( "x" ); _removeButton.hSizePolicy( spFixed ); _removeButton.width( 20 ); @@ -66,7 +66,7 @@ class EffectRackSlot_impl : virtual public EffectRackSlot_skel connect( _removeButton, "clicked_changed", self(), "removeslot" ); _removeButton.show(); - _masterButton.tqparent( _buttonbox ); + _masterButton.parent( _buttonbox ); _masterButton.text( "MM" ); _masterButton.toggle( true ); _masterButton.hSizePolicy( spFixed ); @@ -75,7 +75,7 @@ class EffectRackSlot_impl : virtual public EffectRackSlot_skel connect( _masterButton, "pressed_changed", self(), "tomaster" ); _masterButton.show(); - _frame.tqparent( _hbox ); + _frame.parent( _hbox ); _frame.margin( 5 ); _frame.spacing( 0 ); _frame.framestyle( Raised | Panel ); @@ -85,10 +85,10 @@ class EffectRackSlot_impl : virtual public EffectRackSlot_skel _frame.show(); _effect = effect; - _effect.tqparent( _frame ); + _effect.parent( _frame ); _effect.show(); - _spacer.tqparent( _frame ); + _spacer.parent( _frame ); _spacer.hSizePolicy( spExpanding ); _spacer.show(); } diff --git a/arts/modules/common/env_effectrackitem_impl.cc b/arts/modules/common/env_effectrackitem_impl.cc index ac76db70..50fb116e 100644 --- a/arts/modules/common/env_effectrackitem_impl.cc +++ b/arts/modules/common/env_effectrackitem_impl.cc @@ -226,7 +226,7 @@ public: name = LineEdit(); name.caption("name"); name.text(_effectRack.name()); - name.tqparent(hbox); + name.parent(hbox); connect(name,"text_changed", _effectRack, "name"); #endif @@ -248,7 +248,7 @@ public: typebox = ComboBox(); typebox.choices(choices); typebox.value(_type); - typebox.tqparent(hbox); + typebox.parent(hbox); connect(typebox,"value_changed", self(), "type"); addbutton = Button( "add", hbox ); @@ -260,7 +260,7 @@ public: effect_vbox.show(); Frame spacer; - spacer.tqparent( effect_vbox ); + spacer.parent( effect_vbox ); spacer.vSizePolicy( spExpanding ); spacer.show(); effect_vbox._addChild( spacer, "spacer" ); diff --git a/arts/modules/common/env_instrumentitem_impl.cc b/arts/modules/common/env_instrumentitem_impl.cc index 0b979b6c..17959ca0 100644 --- a/arts/modules/common/env_instrumentitem_impl.cc +++ b/arts/modules/common/env_instrumentitem_impl.cc @@ -98,7 +98,7 @@ public: LineEdit edit; edit.x(20); edit.y(10); edit.width(120); edit.height(40); edit.text(instrument.filename()); - edit.tqparent(panel); + edit.parent(panel); edit.show(); connect(edit,"text_changed", instrument, "filename"); panel._addChild(edit,"editWidget"); diff --git a/arts/modules/common/env_item_impl.cc b/arts/modules/common/env_item_impl.cc index da3a6941..6bc960d8 100644 --- a/arts/modules/common/env_item_impl.cc +++ b/arts/modules/common/env_item_impl.cc @@ -16,7 +16,7 @@ Environment::Item_impl::~Item_impl() arts_assert(_active == false); } -Environment::Container Environment::Item_impl::tqparent() +Environment::Container Environment::Item_impl::parent() { Container p = _parent; return p; diff --git a/arts/modules/common/env_item_impl.h b/arts/modules/common/env_item_impl.h index 4fcd1fc8..dbdca1f9 100644 --- a/arts/modules/common/env_item_impl.h +++ b/arts/modules/common/env_item_impl.h @@ -18,7 +18,7 @@ public: ~Item_impl(); bool active(); - Container tqparent(); + Container parent(); void setContainer(Container container); }; } diff --git a/arts/modules/common/env_mixeritem_impl.cc b/arts/modules/common/env_mixeritem_impl.cc index db4bc18c..3e80e603 100644 --- a/arts/modules/common/env_mixeritem_impl.cc +++ b/arts/modules/common/env_mixeritem_impl.cc @@ -165,7 +165,7 @@ public: Widget w = guiFactory.createGui((*channels)[i]); if(!w.isNull()) { - w.tqparent(channel_hbox); + w.parent(channel_hbox); w.show(); channelWidgets.push_back(w); } @@ -183,21 +183,21 @@ public: if(!_item.isNull() && !vbox.isNull()) { hbox = HBox(); - hbox.tqparent(vbox); + hbox.parent(vbox); hbox.show(); spinbox = SpinBox(); spinbox.caption(i18n("channels").utf8().data()); spinbox.min(0); spinbox.max(32); spinbox.value(_item.channelCount()); - spinbox.tqparent(hbox); + spinbox.parent(hbox); spinbox.show(); connect(spinbox,"value_changed", _item, "channelCount"); name = LineEdit(); name.caption(i18n("name").utf8().data()); name.text(_item.name()); - name.tqparent(hbox); + name.parent(hbox); name.show(); connect(name,"text_changed", _item, "name"); @@ -212,12 +212,12 @@ public: delete queryResults; typebox.choices(choices); typebox.value(_type); - typebox.tqparent(hbox); + typebox.parent(hbox); typebox.show(); connect(typebox,"value_changed", _item, "type"); channel_hbox = HBox(); - channel_hbox.tqparent(vbox); + channel_hbox.parent(vbox); channel_hbox.show(); channelWidgets.clear(); @@ -320,14 +320,14 @@ public: HBox hbox; hbox.show(); hbox.width(330); hbox.height(50); - hbox.tqparent(vbox); + hbox.parent(vbox); vbox._addChild(hbox,"hbox"); SpinBox spinbox; spinbox.caption(i18n("channels").utf8().data()); spinbox.min(0); spinbox.max(32); spinbox.value(mixerItem.channelCount()); - spinbox.tqparent(hbox); + spinbox.parent(hbox); spinbox.show(); connect(spinbox,"value_changed", mixerItem, "channelCount"); hbox._addChild(spinbox,"channelsWidget"); @@ -335,7 +335,7 @@ public: LineEdit name; name.caption(i18n("name").utf8().data()); name.caption(mixerItem.name()); - name.tqparent(hbox); + name.parent(hbox); name.show(); connect(name,"caption_changed", mixerItem, "name"); hbox._addChild(name,"nameWidget"); @@ -343,7 +343,7 @@ public: HBox channel_hbox; channel_hbox.show(); channel_hbox.width(330); hbox.height(450); - channel_hbox.tqparent(vbox); + channel_hbox.parent(vbox); vbox._addChild(channel_hbox,"channel_hbox"); GenericGuiFactory gf; @@ -353,7 +353,7 @@ public: for(i = channels->begin(); i != channels->end(); i++) { Widget w = gf.createGui(*i); - w.tqparent(channel_hbox); + w.parent(channel_hbox); channel_hbox._addChild(w,"channel"); } #endif diff --git a/arts/modules/effects/fivebandmonocomplexeq_impl.cc b/arts/modules/effects/fivebandmonocomplexeq_impl.cc index 827687e2..56ca6037 100644 --- a/arts/modules/effects/fivebandmonocomplexeq_impl.cc +++ b/arts/modules/effects/fivebandmonocomplexeq_impl.cc @@ -123,11 +123,11 @@ public: Arts::Poti lowfreq; lowfreq.color( "grey" ); lowfreq.caption( i18n( "Low Freq" ).utf8().data() ); lowfreq.min( 20 ); lowfreq.max( 1000 ); lowfreq.value( ch.lowfreq() ); connect( lowfreq, "value_changed", ch, "lowfreq" ); - lowfreq.tqparent( lowbox ); lowbox._addChild( lowfreq , "" ); + lowfreq.parent( lowbox ); lowbox._addChild( lowfreq , "" ); Arts::Poti lowq; lowq.color( "grey" ); lowq.caption( i18n( "Low Q" ).utf8().data() ); lowq.min( 0.01 ); lowq.max( 10 ); lowq.value( ch.lowq() ); connect( lowq, "value_changed", ch, "lowq" ); - lowq.tqparent( lowbox ); lowbox._addChild( lowq , "" ); + lowq.parent( lowbox ); lowbox._addChild( lowq , "" ); Arts::Poti mid1gain; mid1gain.caption( i18n( "Mid1 Gain" ).utf8().data() ); mid1gain.min( -24 ); mid1gain.max( 24 ); @@ -140,11 +140,11 @@ public: Arts::Poti mid1freq; mid1freq.color( "grey" ); mid1freq.caption( i18n( "Mid1 Freq" ).utf8().data() ); mid1freq.min( 20 ); mid1freq.max( 5000 ); mid1freq.value( ch.mid1freq() ); connect( mid1freq, "value_changed", ch, "mid1freq" ); - mid1freq.tqparent( mid1box ); mid1box._addChild( mid1freq , "" ); + mid1freq.parent( mid1box ); mid1box._addChild( mid1freq , "" ); Arts::Poti mid1q; mid1q.color( "grey" ); mid1q.caption( i18n( "Mid1 Q" ).utf8().data() ); mid1q.min( 0.01 ); mid1q.max( 10 ); mid1q.value( ch.mid1q() ); connect( mid1q, "value_changed", ch, "mid1q" ); - mid1q.tqparent( mid1box ); mid1box._addChild( mid1q , "" ); + mid1q.parent( mid1box ); mid1box._addChild( mid1q , "" ); Arts::Poti mid2gain; mid2gain.caption( i18n( "Mid2 Gain" ).utf8().data() ); mid2gain.min( -24 ); mid2gain.max( 24 ); @@ -157,11 +157,11 @@ public: Arts::Poti mid2freq; mid2freq.color( "grey" ); mid2freq.caption( i18n( "Mid2 Freq" ).utf8().data() ); mid2freq.min( 20 ); mid2freq.max( 10000 ); mid2freq.value( ch.mid2freq() ); connect( mid2freq, "value_changed", ch, "mid2freq" ); - mid2freq.tqparent( mid2box ); mid2box._addChild( mid2freq , "" ); + mid2freq.parent( mid2box ); mid2box._addChild( mid2freq , "" ); Arts::Poti mid2q; mid2q.color( "grey" ); mid2q.caption( i18n( "Mid2 Q" ).utf8().data() ); mid2q.min( 0.01 ); mid2q.max( 10 ); mid2q.value( ch.mid2q() ); connect( mid2q, "value_changed", ch, "mid2q" ); - mid2q.tqparent( mid2box ); mid2box._addChild( mid2q , "" ); + mid2q.parent( mid2box ); mid2box._addChild( mid2q , "" ); Arts::Poti mid3gain; mid3gain.caption( i18n( "Mid3 Gain" ).utf8().data() ); mid3gain.min( -24 ); mid3gain.max( 24 ); @@ -174,11 +174,11 @@ public: Arts::Poti mid3freq; mid3freq.color( "grey" ); mid3freq.caption( i18n( "Mid3 Freq" ).utf8().data() ); mid3freq.min( 1000 ); mid3freq.max( 10000 ); mid3freq.value( ch.mid3freq() ); connect( mid3freq, "value_changed", ch, "mid3freq" ); - mid3freq.tqparent( mid3box ); mid3box._addChild( mid3freq , "" ); + mid3freq.parent( mid3box ); mid3box._addChild( mid3freq , "" ); Arts::Poti mid3q; mid3q.color( "grey" ); mid3q.caption( i18n( "Mid3 Q" ).utf8().data() ); mid3q.min( 0.01 ); mid3q.max( 10 ); mid3q.value( ch.mid3q() ); connect( mid3q, "value_changed", ch, "mid3q" ); - mid3q.tqparent( mid3box ); mid3box._addChild( mid3q , "" ); + mid3q.parent( mid3box ); mid3box._addChild( mid3q , "" ); Arts::Poti highgain; highgain.caption( i18n( "High Gain" ).utf8().data() ); highgain.min( -24 ); highgain.max( 24 ); @@ -191,11 +191,11 @@ public: Arts::Poti highfreq; highfreq.color( "grey" ); highfreq.caption( i18n( "High Freq" ).utf8().data() ); highfreq.min( 5000 ); highfreq.max( 16000 ); highfreq.value( ch.highfreq() ); connect( highfreq, "value_changed", ch, "highfreq" ); - highfreq.tqparent( highbox ); highbox._addChild( highfreq , "" ); + highfreq.parent( highbox ); highbox._addChild( highfreq , "" ); Arts::Poti highq; highq.color( "grey" ); highq.caption( i18n( "High Q" ).utf8().data() ); highq.min( 0.01 ); highq.max( 10 ); highq.value( ch.highq() ); connect( highq, "value_changed", ch, "highq" ); - highq.tqparent( highbox ); highbox._addChild( highq , "" ); + highq.parent( highbox ); highbox._addChild( highq , "" ); hbox.addStretch( 100 ); diff --git a/arts/modules/effects/freeverbguifactory_impl.cc b/arts/modules/effects/freeverbguifactory_impl.cc index 17878daa..7af1f471 100644 --- a/arts/modules/effects/freeverbguifactory_impl.cc +++ b/arts/modules/effects/freeverbguifactory_impl.cc @@ -58,7 +58,7 @@ Widget FreeverbGuiFactory_impl::createGui(Object object) roomsize.color("red"); roomsize.min(0); roomsize.max(1); roomsize.value(freeverb.roomsize()); roomsize.range(100); - roomsize.tqparent(hbox); + roomsize.parent(hbox); roomsize.show(); connect(roomsize,"value_changed", freeverb, "roomsize"); hbox._addChild(roomsize,"roomsizeWidget"); @@ -68,7 +68,7 @@ Widget FreeverbGuiFactory_impl::createGui(Object object) damp.color("red"); damp.min(0); damp.max(1); damp.value(freeverb.damp()); damp.range(100); - damp.tqparent(hbox); + damp.parent(hbox); damp.show(); connect(damp,"value_changed", freeverb, "damp"); hbox._addChild(damp,"dampWidget"); @@ -78,7 +78,7 @@ Widget FreeverbGuiFactory_impl::createGui(Object object) wet.color("red"); wet.min(0); wet.max(1); wet.value(freeverb.wet()); wet.range(100); - wet.tqparent(hbox); + wet.parent(hbox); wet.show(); connect(wet,"value_changed", freeverb, "wet"); hbox._addChild(wet,"wetWidget"); @@ -88,7 +88,7 @@ Widget FreeverbGuiFactory_impl::createGui(Object object) dry.color("red"); dry.min(0); dry.max(1); dry.value(freeverb.dry()); dry.range(100); - dry.tqparent(hbox); + dry.parent(hbox); dry.show(); connect(dry,"value_changed", freeverb, "dry"); hbox._addChild(dry,"dryWidget"); @@ -98,7 +98,7 @@ Widget FreeverbGuiFactory_impl::createGui(Object object) width.color("red"); width.min(0); width.max(1); width.value(freeverb.width()); width.range(100); - width.tqparent(hbox); + width.parent(hbox); width.show(); connect(width,"value_changed", freeverb, "width"); hbox._addChild(width,"widthWidget"); diff --git a/arts/modules/effects/kstereovolumecontrolgui_impl.h b/arts/modules/effects/kstereovolumecontrolgui_impl.h index 855c979c..28400f1e 100644 --- a/arts/modules/effects/kstereovolumecontrolgui_impl.h +++ b/arts/modules/effects/kstereovolumecontrolgui_impl.h @@ -86,7 +86,7 @@ public: TQTimer* _timer; Arts::KStereoVolumeControlGui_impl* _impl; public: - KStereoVolumeControlGui_EventMapper( Arts::KStereoVolumeControlGui_impl* impl, TQObject* tqparent, const char* name=0 ) : TQObject( tqparent,name ), _impl( impl ) { + KStereoVolumeControlGui_EventMapper( Arts::KStereoVolumeControlGui_impl* impl, TQObject* parent, const char* name=0 ) : TQObject( parent,name ), _impl( impl ) { _timer = new TQTimer( this ); connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimerSignal() ) ); } diff --git a/arts/modules/effects/synth_stereo_fir_equalizer_impl.cc b/arts/modules/effects/synth_stereo_fir_equalizer_impl.cc index 86f7c1bb..ece106c2 100644 --- a/arts/modules/effects/synth_stereo_fir_equalizer_impl.cc +++ b/arts/modules/effects/synth_stereo_fir_equalizer_impl.cc @@ -186,7 +186,7 @@ Widget StereoFirEqualizerGuiFactory_impl::createGui(Object object) vbox.show(); Graph g; - g.tqparent(vbox); + g.parent(vbox); g.width(400); g.height(230); g.caption(i18n("a graph").utf8().data()); @@ -211,7 +211,7 @@ Widget StereoFirEqualizerGuiFactory_impl::createGui(Object object) spinbox.caption(i18n("channels").utf8().data()); spinbox.min(3); spinbox.max(255); spinbox.value(equalizer.taps()); - spinbox.tqparent(vbox); + spinbox.parent(vbox); spinbox.show(); connect(spinbox,"value_changed", equalizer, "taps"); vbox._addChild(spinbox,"spinbox"); diff --git a/arts/modules/effects/voiceremovalguifactory_impl.cc b/arts/modules/effects/voiceremovalguifactory_impl.cc index 4a4011be..d4879b87 100644 --- a/arts/modules/effects/voiceremovalguifactory_impl.cc +++ b/arts/modules/effects/voiceremovalguifactory_impl.cc @@ -53,7 +53,7 @@ Widget VoiceRemovalGuiFactory_impl::createGui( Object object ) position.color( "grey" ); position.min( -1 ); position.max( 1 ); position.value( voiceremoval.position() ); position.range( 100 ); - position.tqparent( hbox ); + position.parent( hbox ); position.show(); connect( position, "value_changed", voiceremoval, "position" ); hbox._addChild( position, "positionWidget" ); @@ -64,7 +64,7 @@ Widget VoiceRemovalGuiFactory_impl::createGui( Object object ) freq.value( voiceremoval.frequency() ); freq.range( 400 ); freq.logarithmic( 2.0 ); - freq.tqparent( hbox ); + freq.parent( hbox ); freq.show(); connect( freq, "value_changed", voiceremoval, "frequency" ); hbox._addChild( freq, "freqWidget" ); diff --git a/arts/modules/synth/synth_cdelay_impl.cc b/arts/modules/synth/synth_cdelay_impl.cc index 267daab8..28f4d12f 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 _bittqmask; + unsigned long _bitmask; float *_buffer; // holds the data to be delayed (variable size) float _delaytime; unsigned int _readpos; unsigned int _writepos; public: - Synth_CDELAY_impl() : _buffersize( 0 ), _bittqmask( 0 ), _buffer( 0 ), _delaytime( 0 ), _readpos( 0 ), _writepos( 0 ) + Synth_CDELAY_impl() : _buffersize( 0 ), _bitmask( 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 newbittqmask = newbuffersize - 1; + unsigned long newbitmask = 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 &= newbittqmask; + _writepos &= newbitmask; } for( unsigned long i = _buffersize; i < newbuffersize; i++ ) newbuffer[i] = 0; } else { _writepos -= newbuffersize; - _writepos &= newbittqmask; + _writepos &= newbitmask; for( unsigned long i = 0; i < newbuffersize; i++ ) { newbuffer[i] = _buffer[_writepos]; _writepos++; - _writepos &= newbittqmask; + _writepos &= newbitmask; } } _buffer = newbuffer; _buffersize = newbuffersize; - _bittqmask = newbittqmask; + _bitmask = newbitmask; } - _readpos = (unsigned long)rint( _writepos - _delaytime * samplingRateFloat ) & _bittqmask; + _readpos = (unsigned long)rint( _writepos - _delaytime * samplingRateFloat ) & _bitmask; time_changed( _delaytime ); } @@ -113,9 +113,9 @@ public: _buffer[_writepos] = invalue[i]; outvalue[i] = _buffer[_readpos]; _readpos++; - _readpos &= _bittqmask; + _readpos &= _bitmask; _writepos++; - _writepos &= _bittqmask; + _writepos &= _bitmask; } } }; diff --git a/arts/modules/synth/synth_delay_impl.cc b/arts/modules/synth/synth_delay_impl.cc index 57285118..92c23fd1 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 _bittqmask; + unsigned long _bitmask; float * _buffer; float _maxdelay; unsigned int _writepos; public: - Synth_DELAY_impl() : _buffersize( 0 ), _bittqmask( 0 ), _buffer( 0 ), _maxdelay( 0 ), _writepos( 0 ) + Synth_DELAY_impl() : _buffersize( 0 ), _bitmask( 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) ) & _bittqmask; - unsigned long readpos2 = ( readpos1 - 1 ) & _bittqmask; // Shouldn't this be +1? (mkretz) + unsigned long readpos1 = ( _writepos - (unsigned long)(int_pos) ) & _bitmask; + unsigned long readpos2 = ( readpos1 - 1 ) & _bitmask; // 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 &= _bittqmask; + _writepos &= _bitmask; } } @@ -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 newbittqmask = newbuffersize - 1; + unsigned long newbitmask = 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 &= newbittqmask; + _writepos &= newbitmask; } for( unsigned long i = _buffersize; i < newbuffersize; i++ ) newbuffer[i] = 0; } else { _writepos -= newbuffersize; - _writepos &= newbittqmask; + _writepos &= newbitmask; for( unsigned long i = 0; i < newbuffersize; i++ ) { newbuffer[i] = _buffer[_writepos]; _writepos++; - _writepos &= newbittqmask; + _writepos &= newbitmask; } } _buffer = newbuffer; _buffersize = newbuffersize; - _bittqmask = newbittqmask; + _bitmask = newbitmask; } maxdelay_changed( _maxdelay ); } -- cgit v1.2.1