Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make more connections direct for automation #4942

Merged
merged 1 commit into from
Apr 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions plugins/LadspaEffect/LadspaControls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ LadspaControls::LadspaControls( LadspaEffect * _eff ) :
{

connect( &m_stereoLinkModel, SIGNAL( dataChanged() ),
this, SLOT( updateLinkStatesFromGlobal() ) );
this, SLOT( updateLinkStatesFromGlobal() ),
Qt::DirectConnection );

multi_proc_t controls = m_effect->getPortControls();
m_controlCount = controls.count();
Expand All @@ -59,7 +60,8 @@ LadspaControls::LadspaControls( LadspaEffect * _eff ) :
if( linked_control )
{
connect( (*it)->control, SIGNAL( linkChanged( int, bool ) ),
this, SLOT( linkPort( int, bool ) ) );
this, SLOT( linkPort( int, bool ) ),
Qt::DirectConnection );
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions plugins/VstEffect/VstEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ void VstEffect::openPlugin( const QString & _plugin )
return;
}

VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin.data(), SLOT( setTempo( bpm_t ) ) );
m_plugin->setTempo( Engine::getSong()->getTempo() );

delete tf;

m_key.attributes["file"] = _plugin;
Expand Down
3 changes: 2 additions & 1 deletion plugins/vst_base/RemoteVstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,8 @@ DWORD WINAPI RemoteVstPlugin::processingThread( LPVOID _param )
{
if( m.id == IdStartProcessing
|| m.id == IdMidiEvent
|| m.id == IdVstSetParameter )
|| m.id == IdVstSetParameter
|| m.id == IdVstSetTempo )
{
_this->processMessage( m );
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/vst_base/VstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ VstPlugin::VstPlugin( const QString & _plugin ) :
setTempo( Engine::getSong()->getTempo() );

connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
this, SLOT( setTempo( bpm_t ) ) );
this, SLOT( setTempo( bpm_t ) ), Qt::DirectConnection );
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
this, SLOT( updateSampleRate() ) );

Expand Down
26 changes: 13 additions & 13 deletions src/core/EnvelopeAndLfoParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,32 +129,32 @@ EnvelopeAndLfoParameters::EnvelopeAndLfoParameters(
instances()->add( this );

connect( &m_predelayModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_attackModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_holdModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_decayModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_sustainModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_releaseModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_amountModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );

connect( &m_lfoPredelayModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_lfoAttackModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_lfoSpeedModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_lfoAmountModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_lfoWaveModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );
connect( &m_x100Model, SIGNAL( dataChanged() ),
this, SLOT( updateSampleVars() ) );
this, SLOT( updateSampleVars() ), Qt::DirectConnection );

connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
this, SLOT( updateSampleVars() ) );
Expand Down
3 changes: 2 additions & 1 deletion src/core/LadspaControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port,
if( m_link )
{
connect( &m_linkEnabledModel, SIGNAL( dataChanged() ),
this, SLOT( linkStateChanged() ) );
this, SLOT( linkStateChanged() ),
Qt::DirectConnection );
}

switch( m_port->data_type )
Expand Down
6 changes: 3 additions & 3 deletions src/core/LfoController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ LfoController::LfoController( Model * _parent ) :
{
setSampleExact( true );
connect( &m_waveModel, SIGNAL( dataChanged() ),
this, SLOT( updateSampleFunction() ) );
this, SLOT( updateSampleFunction() ), Qt::DirectConnection );

connect( &m_speedModel, SIGNAL( dataChanged() ),
this, SLOT( updateDuration() ) );
this, SLOT( updateDuration() ), Qt::DirectConnection );
connect( &m_multiplierModel, SIGNAL( dataChanged() ),
this, SLOT( updateDuration() ) );
this, SLOT( updateDuration() ), Qt::DirectConnection );
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
this, SLOT( updateDuration() ) );

Expand Down
4 changes: 2 additions & 2 deletions src/core/MeterModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ MeterModel::MeterModel( ::Model * _parent ) :
m_denominatorModel( 4, 1, 32, this, tr( "Denominator" ) )
{
connect( &m_numeratorModel, SIGNAL( dataChanged() ),
this, SIGNAL( dataChanged() ) );
this, SIGNAL( dataChanged() ), Qt::DirectConnection );
connect( &m_denominatorModel, SIGNAL( dataChanged() ),
this, SIGNAL( dataChanged() ) );
this, SIGNAL( dataChanged() ), Qt::DirectConnection );
}


Expand Down
6 changes: 4 additions & 2 deletions src/core/PeakController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ PeakController::PeakController( Model * _parent,
this, SLOT( handleDestroyedEffect( ) ) );
}
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) );
connect( m_peakEffect->attackModel(), SIGNAL( dataChanged() ), this, SLOT( updateCoeffs() ) );
connect( m_peakEffect->decayModel(), SIGNAL( dataChanged() ), this, SLOT( updateCoeffs() ) );
connect( m_peakEffect->attackModel(), SIGNAL( dataChanged() ),
this, SLOT( updateCoeffs() ), Qt::DirectConnection );
connect( m_peakEffect->decayModel(), SIGNAL( dataChanged() ),
this, SLOT( updateCoeffs() ), Qt::DirectConnection );
m_coeffNeedsUpdate = true;
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ Song::Song() :
m_elapsedTacts( 0 )
{
connect( &m_tempoModel, SIGNAL( dataChanged() ),
this, SLOT( setTempo() ) );
this, SLOT( setTempo() ), Qt::DirectConnection );
connect( &m_tempoModel, SIGNAL( dataUnchanged() ),
this, SLOT( setTempo() ) );
this, SLOT( setTempo() ), Qt::DirectConnection );
connect( &m_timeSigModel, SIGNAL( dataChanged() ),
this, SLOT( setTimeSignature() ) );
this, SLOT( setTimeSignature() ), Qt::DirectConnection );


connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this,
SLOT( updateFramesPerTick() ) );

connect( &m_masterVolumeModel, SIGNAL( dataChanged() ),
this, SLOT( masterVolumeChanged() ) );
this, SLOT( masterVolumeChanged() ), Qt::DirectConnection );
/* connect( &m_masterPitchModel, SIGNAL( dataChanged() ),
this, SLOT( masterPitchChanged() ) );*/

Expand Down
6 changes: 4 additions & 2 deletions src/core/TempoSyncKnobModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min,
m_custom( _parent )
{
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
this, SLOT( calculateTempoSyncTime( bpm_t ) ) );
this, SLOT( calculateTempoSyncTime( bpm_t ) ),
Qt::DirectConnection );
}


Expand Down Expand Up @@ -154,7 +155,8 @@ void TempoSyncKnobModel::setSyncMode( TempoSyncMode _new_mode )
if( _new_mode == SyncCustom )
{
connect( &m_custom, SIGNAL( dataChanged() ),
this, SLOT( updateCustom() ) );
this, SLOT( updateCustom() ),
Qt::DirectConnection );
}
}
calculateTempoSyncTime( Engine::getSong()->getTempo() );
Expand Down
2 changes: 1 addition & 1 deletion src/core/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,7 @@ TrackView::TrackView( Track * track, TrackContainerView * tcv ) :
&m_trackContentWidget, SLOT( update() ) );

connect( &m_track->m_soloModel, SIGNAL( dataChanged() ),
m_track, SLOT( toggleSolo() ) );
m_track, SLOT( toggleSolo() ), Qt::DirectConnection );
// create views for already existing TCOs
for( Track::tcoVector::iterator it =
m_track->m_trackContentObjects.begin();
Expand Down
2 changes: 1 addition & 1 deletion src/core/midi/MidiAlsaSeq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ MidiAlsaSeq::MidiAlsaSeq() :
snd_seq_start_queue( m_seqHandle, m_queueID, NULL );
changeQueueTempo( Engine::getSong()->getTempo() );
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
this, SLOT( changeQueueTempo( bpm_t ) ) );
this, SLOT( changeQueueTempo( bpm_t ) ), Qt::DirectConnection );

// initial list-update
updatePortList();
Expand Down
9 changes: 6 additions & 3 deletions src/core/midi/MidiPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ MidiPort::MidiPort( const QString& name,
m_readableModel.setValue( m_mode == Input || m_mode == Duplex );
m_writableModel.setValue( m_mode == Output || m_mode == Duplex );

connect( &m_readableModel, SIGNAL( dataChanged() ), this, SLOT( updateMidiPortMode() ) );
connect( &m_writableModel, SIGNAL( dataChanged() ), this, SLOT( updateMidiPortMode() ) );
connect( &m_outputProgramModel, SIGNAL( dataChanged() ), this, SLOT( updateOutputProgram() ) );
connect( &m_readableModel, SIGNAL( dataChanged() ),
this, SLOT( updateMidiPortMode() ), Qt::DirectConnection );
connect( &m_writableModel, SIGNAL( dataChanged() ),
this, SLOT( updateMidiPortMode() ), Qt::DirectConnection );
connect( &m_outputProgramModel, SIGNAL( dataChanged() ),
this, SLOT( updateOutputProgram() ), Qt::DirectConnection );


// when using with non-raw-clients we can provide buttons showing
Expand Down
2 changes: 1 addition & 1 deletion src/gui/FxMixerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv,
m_soloBtn->setCheckable( true );
m_soloBtn->move( 9, m_fader->y()-21);
connect(&fxChannel->m_soloModel, SIGNAL( dataChanged() ),
_mv, SLOT ( toggledSolo() ) );
_mv, SLOT ( toggledSolo() ), Qt::DirectConnection );
ToolTip::add( m_soloBtn, tr( "Solo FX channel" ) );

// Create EffectRack for the channel
Expand Down
2 changes: 1 addition & 1 deletion src/tracks/SampleTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SampleTCO::SampleTCO( Track * _track ) :
// we need to receive bpm-change-events, because then we have to
// change length of this TCO
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
this, SLOT( updateLength() ) );
this, SLOT( updateLength() ), Qt::DirectConnection );
connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int,int ) ),
this, SLOT( updateLength() ) );

Expand Down