mirror of
https://github.com/LMMS/lmms.git
synced 2025-12-24 07:08:28 -05:00
Remove redundant LV2Ports::Audio::m_optional
The same info is already stored in the `Lv2Ports::Meta` base class.
This commit is contained in:
@@ -162,7 +162,7 @@ struct Cv : public VisitablePort<Cv, ControlPortBase>
|
||||
|
||||
struct Audio : public VisitablePort<Audio, PortBase>
|
||||
{
|
||||
Audio(std::size_t bufferSize, bool isSidechain, bool isOptional);
|
||||
Audio(std::size_t bufferSize, bool isSidechain);
|
||||
|
||||
//! Copy buffer passed by LMMS into our ports
|
||||
//! @param channel channel index into each sample frame
|
||||
|
||||
@@ -201,8 +201,8 @@ QString PortBase::uri() const
|
||||
|
||||
|
||||
|
||||
Audio::Audio(std::size_t bufferSize, bool isSidechain, bool isOptional)
|
||||
: m_buffer(bufferSize), m_sidechain(isSidechain), m_optional(isOptional)
|
||||
Audio::Audio(std::size_t bufferSize, bool isSidechain)
|
||||
: m_buffer(bufferSize), m_sidechain(isSidechain)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,7 @@ Plugin::PluginTypes Lv2Proc::check(const LilvPlugin *plugin,
|
||||
bool portMustBeUsed =
|
||||
!portIsSideChain(plugin,
|
||||
lilv_plugin_get_port_by_index(plugin, portNum)) &&
|
||||
!portIsOptional(plugin,
|
||||
lilv_plugin_get_port_by_index(plugin, portNum));
|
||||
!meta.m_optional;
|
||||
if (meta.m_type == Lv2Ports::Type::Audio && portMustBeUsed)
|
||||
++audioChannels[meta.m_flow == Lv2Ports::Flow::Output
|
||||
? outCount : inCount];
|
||||
@@ -381,8 +380,7 @@ void Lv2Proc::createPort(std::size_t portNum)
|
||||
new Lv2Ports::Audio(
|
||||
static_cast<std::size_t>(
|
||||
Engine::mixer()->framesPerPeriod()),
|
||||
portIsSideChain(m_plugin, lilvPort),
|
||||
portIsOptional(m_plugin, lilvPort)
|
||||
portIsSideChain(m_plugin, lilvPort)
|
||||
);
|
||||
port = audio;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user