diff --git a/ChangeLog b/ChangeLog index 7b32ec2bf..34103d444 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2008-05-13 Tobias Doerffel + * plugins/ladspa_effect/ladspa_effect.cpp: + use new resampling-methods in case we're processing plugins which are + known not to work at higher samplerates + + * include/main_window.h: + made resetWindowTitle() a slot + + * src/gui/widgets/effect_view.cpp: + coding-style stuff + + * include/effect.h: + * src/core/effect.cpp: + added simple way for plugins to process at lower sample-rates + + * src/core/ladspa_manager.cpp: + added hard-coded path in case LMMS is installed into /usr/local + * include/export_project_dialog.h: * src/gui/export_project_dialog.cpp: update main-window title-bar while rendering diff --git a/plugins/ladspa_effect/ladspa_effect.cpp b/plugins/ladspa_effect/ladspa_effect.cpp index bd7ca5d5c..dc130b022 100644 --- a/plugins/ladspa_effect/ladspa_effect.cpp +++ b/plugins/ladspa_effect/ladspa_effect.cpp @@ -380,6 +380,18 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf, return( FALSE ); } + sampleFrame * o_buf = NULL; + int frames = _frames; + if( publicName().contains( "C* AmpVTS" ) && + engine::getMixer()->processingSampleRate() > 88200 ) + { + o_buf = _buf; + _buf = new sampleFrame[_frames]; + sampleDown( o_buf, _buf, 88200 ); + frames = _frames * 88200 / + engine::getMixer()->processingSampleRate(); + } + // Copy the LMMS audio buffer to the LADSPA input buffer and initialize // the control ports. Need to change this to handle non-in-place-broken // plugins--would speed things up to use the same buffer for both @@ -393,7 +405,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf, { case CHANNEL_IN: for( fpp_t frame = 0; - frame < _frames; frame++ ) + frame < frames; frame++ ) { m_ports[proc][port]->buffer[frame] = _buf[frame][channel]; @@ -409,7 +421,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf, // treated as though they were control rate by setting the // port buffer to all the same value. for( fpp_t frame = 0; - frame < _frames; frame++ ) + frame < frames; frame++ ) { m_ports[proc][port]->buffer[frame] = m_ports[proc][port]->value; @@ -441,7 +453,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf, // Process the buffers. for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ ) { - (m_descriptor->run)(m_handles[proc], _frames); + (m_descriptor->run)(m_handles[proc], frames); } // Copy the LADSPA output buffers to the LMMS buffer. @@ -461,7 +473,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf, break; case CHANNEL_OUT: for( fpp_t frame = 0; - frame < _frames; frame++ ) + frame < frames; frame++ ) { _buf[frame][channel] = d * @@ -483,9 +495,15 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf, } } + if( o_buf != NULL ) + { + sampleBack( _buf, o_buf, 88200 ); + delete[] _buf; + } + // Check whether we need to continue processing input. Restart the // counter if the threshold has been exceeded. - if( out_sum / _frames <= getGate()+0.000001 ) + if( out_sum / frames <= getGate()+0.000001 ) { incrementBufferCount(); if( getBufferCount() > getTimeout() )