From 683f80027cc2b24237a9fa27e15fd3fe3cc18824 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Fri, 2 Mar 2018 00:10:41 +0000 Subject: [PATCH] jacksendreturn: fix whitespace issues and cleanup No code functionality changes here Signed-off-by: Harry van Haaren --- src/jacksendreturn.cxx | 26 +++++++++++--------------- src/looper.cxx | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/jacksendreturn.cxx b/src/jacksendreturn.cxx index 6b87e99..d803f4c 100644 --- a/src/jacksendreturn.cxx +++ b/src/jacksendreturn.cxx @@ -36,10 +36,12 @@ void JackSendReturn::process(unsigned int nframes, Buffers *buffers) //Process previous AudioProcessor m_previousProcessor->process(nframes,buffers); - float* sendL=(float*)jack_port_get_buffer(m_sendport_l,(jack_nframes_t)(buffers->nframes)); - float* sendR=(float*)jack_port_get_buffer(m_sendport_r,(jack_nframes_t)(buffers->nframes)); - float* retL=(float*)jack_port_get_buffer(m_returnport_l,(jack_nframes_t)(buffers->nframes)); - float* retR=(float*)jack_port_get_buffer(m_returnport_r,(jack_nframes_t)(buffers->nframes)); + + float* sendL=(float*)jack_port_get_buffer(m_sendport_l, (jack_nframes_t)(buffers->nframes)); + float* sendR=(float*)jack_port_get_buffer(m_sendport_r, (jack_nframes_t)(buffers->nframes)); + float* retL =(float*)jack_port_get_buffer(m_returnport_l,(jack_nframes_t)(buffers->nframes)); + float* retR =(float*)jack_port_get_buffer(m_returnport_r,(jack_nframes_t)(buffers->nframes)); + if(offset) { sendL+=offset; sendR+=offset; @@ -50,11 +52,7 @@ void JackSendReturn::process(unsigned int nframes, Buffers *buffers) for(int i=0; inframes) -// { -// cout<nframes); @@ -62,13 +60,11 @@ void JackSendReturn::process(unsigned int nframes, Buffers *buffers) if(m_active) { memcpy(rettrackL,retL,nframes*sizeof(float)); memcpy(rettrackR,retR,nframes*sizeof(float)); - } + } else { - memcpy(rettrackL, - sendtrackL,nframes*sizeof(float)); - memcpy(rettrackR, - sendtrackR,nframes*sizeof(float)); - } + memcpy(rettrackL, sendtrackL,nframes*sizeof(float)); + memcpy(rettrackR, sendtrackR,nframes*sizeof(float)); + } m_counter+=nframes; } diff --git a/src/looper.cxx b/src/looper.cxx index 71af0d9..a79892b 100644 --- a/src/looper.cxx +++ b/src/looper.cxx @@ -146,7 +146,7 @@ void Looper::process(unsigned int nframes, Buffers* buffers) // write the pitch-shifted signal to the track buffer //FIXME: pitchShift adds delay even for playSpeed = 1.0!! //we should use something better (e.g librubberband) - if(playSpeed!=1.0f) { + if(0) { //playSpeed!=1.0f) { pitchShift( 1, &tmpL, &outL[i] ); pitchShift( 1, &tmpR, &outR[i] ); } else {