| 402 | |
| 403 | |
| 404 | FxRoute * 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 | |
| 427 | FxRoute * FxMixer::createRoute( FxChannel * from, FxChannel * to, float amount ) |
no test coverage detected