Improve mono compatibility with LADSPA plugins (#7674)
This commit is contained in:
@@ -65,7 +65,6 @@ public:
|
||||
virtual void unregisterPort( AudioPort * _port );
|
||||
virtual void renamePort( AudioPort * _port );
|
||||
|
||||
|
||||
inline bool supportsCapture() const
|
||||
{
|
||||
return m_supportsCapture;
|
||||
@@ -76,11 +75,6 @@ public:
|
||||
return m_sampleRate;
|
||||
}
|
||||
|
||||
ch_cnt_t channels() const
|
||||
{
|
||||
return m_channels;
|
||||
}
|
||||
|
||||
void processNextBuffer();
|
||||
|
||||
virtual void startProcessing()
|
||||
@@ -109,6 +103,11 @@ protected:
|
||||
void clearS16Buffer( int_sample_t * _outbuf,
|
||||
const fpp_t _frames );
|
||||
|
||||
ch_cnt_t channels() const
|
||||
{
|
||||
return m_channels;
|
||||
}
|
||||
|
||||
inline void setSampleRate( const sample_rate_t _new_sr )
|
||||
{
|
||||
m_sampleRate = _new_sr;
|
||||
|
||||
@@ -74,8 +74,7 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
QList<QString> pluginNames;
|
||||
for (const auto& plugin : plugins)
|
||||
{
|
||||
ch_cnt_t audioDeviceChannels = Engine::audioEngine()->audioDev()->channels();
|
||||
if (_type != LadspaPluginType::Valid || manager->getDescription(plugin.second)->inputChannels <= audioDeviceChannels)
|
||||
if (_type != LadspaPluginType::Valid || manager->getDescription(plugin.second)->inputChannels <= DEFAULT_CHANNELS)
|
||||
{
|
||||
pluginNames.push_back(plugin.first);
|
||||
m_pluginKeys.push_back(plugin.second);
|
||||
|
||||
@@ -279,9 +279,8 @@ void LadspaEffect::pluginInstantiation()
|
||||
Ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
// Calculate how many processing units are needed.
|
||||
const ch_cnt_t lmms_chnls = Engine::audioEngine()->audioDev()->channels();
|
||||
int effect_channels = manager->getDescription( m_key )->inputChannels;
|
||||
setProcessorCount( lmms_chnls / effect_channels );
|
||||
setProcessorCount(DEFAULT_CHANNELS / effect_channels);
|
||||
|
||||
// get inPlaceBroken property
|
||||
m_inPlaceBroken = manager->isInplaceBroken( m_key );
|
||||
|
||||
@@ -157,7 +157,7 @@ void LadspaSubPluginFeatures::listSubPluginKeys(
|
||||
for( l_sortable_plugin_t::const_iterator it = plugins.begin();
|
||||
it != plugins.end(); ++it )
|
||||
{
|
||||
if( lm->getDescription( ( *it ).second )->inputChannels <= Engine::audioEngine()->audioDev()->channels() )
|
||||
if (lm->getDescription((*it).second)->inputChannels <= DEFAULT_CHANNELS)
|
||||
{
|
||||
_kl.push_back( ladspaKeyToSubPluginKey( _desc, ( *it ).first, ( *it ).second ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user