Merge remote-tracking branch 'upstream/master' into dynamic-effect-dialog-merge_upstream_20230923

This commit is contained in:
Michael Gregorius
2023-09-23 10:18:57 +02:00
57 changed files with 506 additions and 241 deletions

View File

@@ -171,9 +171,6 @@ void AudioFileProcessor::playNote( NotePlayHandle * _n,
static_cast<SampleBuffer::LoopMode>( m_loopModel.value() ) ) )
{
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer,
frames + offset, _n );
emit isPlaying( ((handleState *)_n->m_pluginData)->frameIndex() );
}
else

View File

@@ -307,8 +307,6 @@ void BitInvader::playNote( NotePlayHandle * _n,
}
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -508,7 +508,6 @@ void CarlaInstrument::play(sampleFrame* workingBuffer)
if (fHandle == nullptr)
{
instrumentTrack()->processAudioBuffer(workingBuffer, bufsize, nullptr);
return;
}
@@ -556,8 +555,6 @@ void CarlaInstrument::play(sampleFrame* workingBuffer)
workingBuffer[i][0] = buf1[i];
workingBuffer[i][1] = buf2[i];
}
instrumentTrack()->processAudioBuffer(workingBuffer, bufsize, nullptr);
}
bool CarlaInstrument::handleMidiEvent(const MidiEvent& event, const TimePos&, f_cnt_t offset)

View File

@@ -320,8 +320,8 @@ bool CompressorEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
float inputValue = feedback ? m_prevOut[i] : s[i];
// Calculate the crest factor of the audio by diving the peak by the RMS
m_crestPeakVal[i] = qMax(inputValue * inputValue, m_crestTimeConst * m_crestPeakVal[i] + (1 - m_crestTimeConst) * (inputValue * inputValue));
m_crestRmsVal[i] = m_crestTimeConst * m_crestRmsVal[i] + ((1 - m_crestTimeConst) * (inputValue * inputValue));
m_crestPeakVal[i] = qMax(qMax(COMP_NOISE_FLOOR, inputValue * inputValue), m_crestTimeConst * m_crestPeakVal[i] + (1 - m_crestTimeConst) * (inputValue * inputValue));
m_crestRmsVal[i] = qMax(COMP_NOISE_FLOOR, m_crestTimeConst * m_crestRmsVal[i] + ((1 - m_crestTimeConst) * (inputValue * inputValue)));
m_crestFactorVal[i] = m_crestPeakVal[i] / m_crestRmsVal[i];
m_rmsVal[i] = m_rmsTimeConst * m_rmsVal[i] + ((1 - m_rmsTimeConst) * (inputValue * inputValue));

View File

@@ -419,7 +419,6 @@ void FreeBoyInstrument::playNote(NotePlayHandle* nph, sampleFrame* workingBuffer
}
framesLeft -= count;
}
instrumentTrack()->processAudioBuffer(workingBuffer, frames + offset, nph);
}

View File

@@ -494,8 +494,6 @@ void GigInstrument::play( sampleFrame * _working_buffer )
_working_buffer[i][0] *= m_gain.value();
_working_buffer[i][1] *= m_gain.value();
}
instrumentTrack()->processAudioBuffer( _working_buffer, frames, nullptr );
}

View File

@@ -197,8 +197,6 @@ void KickerInstrument::playNote( NotePlayHandle * _n,
_working_buffer[f+offset][1] *= fac;
}
}
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -36,9 +36,9 @@ TARGET_COMPILE_DEFINITIONS(veal PRIVATE DISABLE_OSC=1)
SET(INLINE_FLAGS "")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
SET(INLINE_FLAGS -finline-functions-called-once -finline-limit=80)
ENDIF()
SET_TARGET_PROPERTIES(veal PROPERTIES COMPILE_FLAGS "-fexceptions -O2 -finline-functions ${INLINE_FLAGS}")
target_compile_options(veal PRIVATE -fexceptions -O2 -finline-functions ${INLINE_FLAGS})
if(LMMS_BUILD_WIN32)
add_custom_command(
@@ -50,5 +50,5 @@ if(LMMS_BUILD_WIN32)
)
endif()
IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(veal PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
target_link_libraries(veal PRIVATE -shared)
ENDIF()

View File

@@ -5,7 +5,7 @@ ADD_LIBRARY(cmt MODULE ${SOURCES})
INSTALL(TARGETS cmt LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
SET_TARGET_PROPERTIES(cmt PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(cmt PROPERTIES COMPILE_FLAGS "-Wall -O3 -fno-strict-aliasing")
target_compile_options(cmt PRIVATE -Wall -O3 -fno-strict-aliasing)
if(LMMS_BUILD_WIN32)
add_custom_command(
@@ -18,10 +18,10 @@ if(LMMS_BUILD_WIN32)
endif()
if(NOT LMMS_BUILD_WIN32)
set_target_properties(cmt PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC")
target_compile_options(cmt PRIVATE -fPIC)
endif()
IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(cmt PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
target_link_libraries(cmt PRIVATE -shared)
ENDIF()

View File

@@ -16,6 +16,7 @@ SET(COMPILE_FLAGS "${COMPILE_FLAGS} ${PIC_FLAGS}")
# Loop over every XML file
FILE(GLOB XML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ladspa/*.xml")
LIST(SORT XML_SOURCES)
FOREACH(_item ${XML_SOURCES})
# Get library name and (soon to be) C file
GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE)
@@ -24,7 +25,7 @@ FOREACH(_item ${XML_SOURCES})
# Coerce XML source file to C
ADD_CUSTOM_COMMAND(
OUTPUT "${_out_file}"
COMMAND ./makestub.pl "${_item}" > "${_out_file}"
COMMAND "${PERL_EXECUTABLE}" ./makestub.pl "${_item}" > "${_out_file}"
DEPENDS "${_item}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ladspa"
VERBATIM

View File

@@ -790,7 +790,6 @@ void Lb302Synth::play( sampleFrame * _working_buffer )
const fpp_t frames = Engine::audioEngine()->framesPerPeriod();
process( _working_buffer, frames );
instrumentTrack()->processAudioBuffer( _working_buffer, frames, nullptr );
// release_frame = 0; //removed for issue # 1432
}

View File

@@ -197,8 +197,6 @@ void Lv2Instrument::play(sampleFrame *buf)
copyModelsToLmms();
copyBuffersToLmms(buf, fpp);
instrumentTrack()->processAudioBuffer(buf, fpp, nullptr);
}

View File

@@ -1040,8 +1040,6 @@ void MonstroInstrument::playNote( NotePlayHandle * _n,
ms->renderOutput( frames, _working_buffer + offset );
//applyRelease( _working_buffer, _n ); // we have our own release
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}
void MonstroInstrument::deleteNotePluginData( NotePlayHandle * _n )

View File

@@ -561,8 +561,6 @@ void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer )
nes->renderOutput( workingBuffer + offset, frames );
applyRelease( workingBuffer, n );
instrumentTrack()->processAudioBuffer( workingBuffer, frames + offset, n );
}

View File

@@ -412,10 +412,6 @@ void OpulenzInstrument::play( sampleFrame * _working_buffer )
}
}
emulatorMutex.unlock();
// Throw the data to the track...
instrumentTrack()->processAudioBuffer( _working_buffer, frameCount, nullptr );
}

View File

@@ -312,8 +312,6 @@ void OrganicInstrument::playNote( NotePlayHandle * _n,
}
// -- --
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -157,8 +157,6 @@ void PatmanInstrument::playNote( NotePlayHandle * _n,
play_freq, m_loopedModel.value() ? SampleBuffer::LoopMode::On : SampleBuffer::LoopMode::Off ) )
{
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer,
frames + offset, _n );
}
else
{
@@ -446,7 +444,7 @@ namespace gui
PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
InstrumentViewFixedSize( _instrument, _parent ),
m_pi( nullptr )
m_pi(castModel<PatmanInstrument>())
{
setAutoFillBackground( true );
QPalette pal;
@@ -487,7 +485,15 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
"tune_off" ) );
m_tuneButton->setToolTip(tr("Tune mode"));
m_displayFilename = tr( "No file selected" );
if (m_pi->m_patchFile.isEmpty())
{
m_displayFilename = tr("No file selected");
}
else
{
updateFilename();
}
setAcceptDrops( true );
}

View File

@@ -848,7 +848,6 @@ void Sf2Instrument::play( sampleFrame * _working_buffer )
if( m_playingNotes.isEmpty() )
{
renderFrames( frames, _working_buffer );
instrumentTrack()->processAudioBuffer( _working_buffer, frames, nullptr );
return;
}
@@ -906,7 +905,6 @@ void Sf2Instrument::play( sampleFrame * _working_buffer )
{
renderFrames( frames - currentFrame, _working_buffer + currentFrame );
}
instrumentTrack()->processAudioBuffer( _working_buffer, frames, nullptr );
}

View File

@@ -480,9 +480,6 @@ void SfxrInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffe
delete[] pitchedBuffer;
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer, frameNum + offset, _n );
}

View File

@@ -429,8 +429,6 @@ void SidInstrument::playNote( NotePlayHandle * _n,
_working_buffer[frame+offset][ch] = s;
}
}
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -359,8 +359,6 @@ void MalletsInstrument::playNote( NotePlayHandle * _n,
_working_buffer[frame][1] = ps->nextSampleRight() *
( m_scalers[p] + add_scale );
}
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -380,8 +380,6 @@ void TripleOscillator::playNote( NotePlayHandle * _n,
applyFadeIn(_working_buffer, _n);
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -399,8 +399,6 @@ void VestigeInstrument::play( sampleFrame * _buf )
{
if (!m_pluginMutex.tryLock(Engine::getSong()->isExporting() ? -1 : 0)) {return;}
const fpp_t frames = Engine::audioEngine()->framesPerPeriod();
if( m_plugin == nullptr )
{
m_pluginMutex.unlock();
@@ -409,8 +407,6 @@ void VestigeInstrument::play( sampleFrame * _buf )
m_plugin->process( nullptr, _buf );
instrumentTrack()->processAudioBuffer( _buf, frames, nullptr );
m_pluginMutex.unlock();
}

View File

@@ -251,8 +251,6 @@ void Vibed::playNote(NotePlayHandle* n, sampleFrame* workingBuffer)
}
}
}
instrumentTrack()->processAudioBuffer(workingBuffer, frames + offset, n);
}
void Vibed::deleteNotePluginData(NotePlayHandle* n)

View File

@@ -82,7 +82,11 @@ void VstSubPluginFeatures::addPluginsFromDir( QStringList* filenames, QString pa
}
}
QStringList dlls = QDir( ConfigManager::inst()->vstDir() + path ).
entryList( QStringList() << "*.dll",
entryList( QStringList() << "*.dll"
#ifdef LMMS_BUILD_LINUX
<< "*.so"
#endif
,
QDir::Files, QDir::Name );
for( int i = 0; i < dlls.size(); i++ )
{

View File

@@ -445,8 +445,6 @@ void WatsynInstrument::playNote( NotePlayHandle * _n,
}
applyRelease( _working_buffer, _n );
instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
}

View File

@@ -233,8 +233,6 @@ void Xpressive::playNote(NotePlayHandle* nph, sampleFrame* working_buffer) {
const f_cnt_t offset = nph->noteOffset();
ps->renderOutput(frames, working_buffer + offset);
instrumentTrack()->processAudioBuffer(working_buffer, frames + offset, nph);
}
void Xpressive::deleteNotePluginData(NotePlayHandle* nph) {

View File

@@ -341,7 +341,6 @@ void ZynAddSubFxInstrument::play( sampleFrame * _buf )
m_plugin->processAudio( _buf );
}
m_pluginMutex.unlock();
instrumentTrack()->processAudioBuffer( _buf, Engine::audioEngine()->framesPerPeriod(), nullptr );
}