MCPcopy Create free account
hub / github.com/LMMS/lmms / createChannelSend

Method createChannelSend

src/core/FxMixer.cpp:404–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402
403
404FxRoute * FxMixer::createChannelSend( fx_ch_t fromChannel, fx_ch_t toChannel,
405 float amount )
406{
407// qDebug( "requested: %d to %d", fromChannel, toChannel );
408 // find the existing connection
409 FxChannel * from = m_fxChannels[fromChannel];
410 FxChannel * to = m_fxChannels[toChannel];
411
412 for( int i=0; i<from->m_sends.size(); ++i )
413 {
414 if( from->m_sends[i]->receiver() == to )
415 {
416 // simply adjust the amount
417 from->m_sends[i]->amount()->setValue( amount );
418 return from->m_sends[i];
419 }
420 }
421
422 // connection does not exist. create a new one
423 return createRoute( from, to, amount );
424}
425
426
427FxRoute * FxMixer::createRoute( FxChannel * from, FxChannel * to, float amount )

Callers 1

mousePressEventMethod · 0.80

Calls 4

receiverMethod · 0.80
amountMethod · 0.80
sizeMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected