Improved: Updated to Visual Studio 2019 and Qt 5.15.2. Running Equalizer APO requires Universal CRT now, which means that Windows versions before 10 may need additional Windows updates or the Visual C++ Redistributable for Visual Studio 2015 - 2019 needs to be installed (installer provides assistance).

This commit is contained in:
jthedering committed 2021-06-08 19:04:18 +00:00
1 parent 3d51af7364
commit c692f0639b
94 files changed
+362 -184

No files matched your search

+3 -1
View File
@@ -48,7 +48,9 @@ IFilterGUI* BiQuadFilterGUIFactory::createFilterGUI(QString& command, QString& p
if (command.startsWith("Filter"))
{
BiQuadFilterFactory factory;
std::vector<IFilter*> filters = factory.createFilter(L"", command.toStdWString(), parameters.toStdWString());
std::wstring commandWStr = command.toStdWString();
std::wstring paramWStr = parameters.toStdWString();
std::vector<IFilter*> filters = factory.createFilter(L"", commandWStr, paramWStr);
if (!filters.empty())
{
BiQuadFilter* filter = (BiQuadFilter*)filters[0];
+1 -1
View File
@@ -37,7 +37,7 @@ ChannelFilterGUI::ChannelFilterGUI(const QString& parameters, int selectedChanne
selectedChannels.clear();
QStringList words = parameters.trimmed().split(' ', QString::SkipEmptyParts);
QStringList words = parameters.trimmed().split(' ', Qt::SkipEmptyParts);
for (QString word : words)
if (word.length() > 0)
selectedChannels.append(word.toUpper());
+1 -1
View File
@@ -92,7 +92,7 @@ ChannelFilterGUIDialog::ChannelFilterGUIDialog(QWidget* parent, QStringList sele
else if (channelName == "LFE" && remainingSelectedChannels.removeOne("SUB"))
checked = true;
if (remainingSelectedChannels.removeOne(QString(channelIndex)))
if (remainingSelectedChannels.removeOne(QString("%1").arg(channelIndex)))
checked = true;
checkBox->setChecked(checked);
}
+2 -2
View File
@@ -67,7 +67,7 @@ QPainterPath CopyFilterGUIConnectionItem::shape() const
double length = line().length();
if (length > 0)
{
double offset = min(length, DPIHelper::scale(maxArrowSize));
double offset = fmin(length, DPIHelper::scale(maxArrowSize));
QLineF unit = l.unitVector();
QLineF normal = l.normalVector().unitVector();
QPointF v(unit.dx(), unit.dy());
@@ -131,7 +131,7 @@ void CopyFilterGUIConnectionItem::paint(QPainter* painter, const QStyleOptionGra
painter->drawLine(line());
double length = line().length();
double offset = min(length, DPIHelper::scale(maxArrowSize));
double offset = fmin(length, DPIHelper::scale(maxArrowSize));
QLineF unit = l.unitVector();
QLineF normal = l.normalVector().unitVector();
QPointF v(unit.dx(), unit.dy());
+3 -1
View File
@@ -45,7 +45,9 @@ IFilterGUI* CopyFilterGUIFactory::createFilterGUI(QString& command, QString& par
if (command == "Copy")
{
CopyFilterFactory factory;
std::vector<IFilter*> filters = factory.createFilter(L"", command.toStdWString(), parameters.toStdWString());
std::wstring commandWStr = command.toStdWString();
std::wstring paramWStr = parameters.toStdWString();
std::vector<IFilter*> filters = factory.createFilter(L"", commandWStr, paramWStr);
if (!filters.empty())
{
CopyFilter* filter = (CopyFilter*)filters[0];
+3 -1
View File
@@ -40,7 +40,9 @@ IFilterGUI* DelayFilterGUIFactory::createFilterGUI(QString& command, QString& pa
if (command == "Delay")
{
DelayFilterFactory factory;
std::vector<IFilter*> filters = factory.createFilter(L"", command.toStdWString(), parameters.toStdWString());
std::wstring commandWStr = command.toStdWString();
std::wstring paramWStr = parameters.toStdWString();
std::vector<IFilter*> filters = factory.createFilter(L"", commandWStr, paramWStr);
if (!filters.empty())
{
DelayFilter* filter = (DelayFilter*)filters[0];
+1 -1
View File
@@ -64,7 +64,7 @@ void DeviceFilterGUI::load(const QString& parameters)
}
else
{
const QList<shared_ptr<AbstractAPOInfo> >& devices = factory->getDevices();
const QList<shared_ptr<AbstractAPOInfo>>& devices = factory->getDevices();
bool anyInstalled = false;
for (const shared_ptr<AbstractAPOInfo>& apoInfo : devices)
{
+3 -3
View File
@@ -45,7 +45,7 @@ DeviceFilterGUIDialog::DeviceFilterGUIDialog(DeviceFilterGUI* gui, DeviceFilterG
outputNode->setExpanded(true);
QTreeWidgetItem* inputNode = new QTreeWidgetItem(ui->treeWidget, QStringList(tr("Capture devices")));
inputNode->setExpanded(true);
const QList<shared_ptr<AbstractAPOInfo> >& devices = factory->getDevices();
const QList<shared_ptr<AbstractAPOInfo>>& devices = factory->getDevices();
for (const shared_ptr<AbstractAPOInfo>& apoInfo : devices)
{
QStringList values;
@@ -99,7 +99,7 @@ QString DeviceFilterGUIDialog::getPattern()
{
if (pattern != "")
pattern += "; ";
shared_ptr<AbstractAPOInfo> apoInfo = item->data(0, Qt::UserRole).value<shared_ptr<AbstractAPOInfo> >();
shared_ptr<AbstractAPOInfo> apoInfo = item->data(0, Qt::UserRole).value<shared_ptr<AbstractAPOInfo>>();
pattern += QString::fromStdWString(apoInfo->getDeviceString());
}
}
@@ -122,7 +122,7 @@ void DeviceFilterGUIDialog::on_showOnlyInstalledCheckBox_toggled(bool checked)
for (int j = 0; j < groupItem->childCount(); j++)
{
QTreeWidgetItem* item = groupItem->child(j);
shared_ptr<AbstractAPOInfo> apoInfo = item->data(0, Qt::UserRole).value<shared_ptr<AbstractAPOInfo> >();
shared_ptr<AbstractAPOInfo> apoInfo = item->data(0, Qt::UserRole).value<shared_ptr<AbstractAPOInfo>>();
item->setHidden(item->checkState(0) != Qt::Checked && !apoInfo->isInstalled() && checked);
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ IFilterGUI* DeviceFilterGUIFactory::createFilterGUI(QString& command, QString& p
return result;
}
const QList<shared_ptr<AbstractAPOInfo> >& DeviceFilterGUIFactory::getDevices() const
const QList<shared_ptr<AbstractAPOInfo>>& DeviceFilterGUIFactory::getDevices() const
{
return devices;
}
+2 -2
View File
@@ -34,8 +34,8 @@ public:
QList<FilterTemplate> createFilterTemplates() override;
IFilterGUI* createFilterGUI(QString& command, QString& parameters) override;
const QList<std::shared_ptr<AbstractAPOInfo> >& getDevices() const;
const QList<std::shared_ptr<AbstractAPOInfo>>& getDevices() const;
private:
QList<std::shared_ptr<AbstractAPOInfo> > devices;
QList<std::shared_ptr<AbstractAPOInfo>> devices;
};
+3 -1
View File
@@ -52,7 +52,9 @@ IFilterGUI* GraphicEQFilterGUIFactory::createFilterGUI(QString& command, QString
if (command == "GraphicEQ")
{
GraphicEQFilterFactory factory;
std::vector<IFilter*> filters = factory.createFilter(L"", command.toStdWString(), parameters.toStdWString());
std::wstring commandWStr = command.toStdWString();
std::wstring paramWStr = parameters.toStdWString();
std::vector<IFilter*> filters = factory.createFilter(L"", commandWStr, paramWStr);
if (!filters.empty())
{
GraphicEQFilter* filter = (GraphicEQFilter*)filters[0];
+1 -1
View File
@@ -62,7 +62,7 @@ void GraphicEQFilterGUIItem::paint(QPainter* painter, const QStyleOptionGraphics
QFontMetrics metrics(font);
painter->setFont(font);
QString text = QString::number(index + 1);
painter->drawText(-metrics.width(text) / 2, metrics.boundingRect('0').height() / 2, text);
painter->drawText(-metrics.size(0, text).width() / 2, metrics.boundingRect('0').height() / 2, text);
}
}
+3 -1
View File
@@ -35,7 +35,9 @@ IFilterGUI* PreampFilterGUIFactory::createFilterGUI(QString& command, QString& p
if (command == "Preamp")
{
PreampFilterFactory factory;
std::vector<IFilter*> filters = factory.createFilter(L"", command.toStdWString(), parameters.toStdWString());
std::wstring commandWStr = command.toStdWString();
std::wstring paramWStr = parameters.toStdWString();
std::vector<IFilter*> filters = factory.createFilter(L"", commandWStr, paramWStr);
if (!filters.empty())
{
PreampFilter* filter = (PreampFilter*)filters[0];
+17 -21
View File
@@ -433,31 +433,27 @@ void VSTPluginFilterGUI::updatePermissionWarning()
{
QByteArray bytes = QByteArray::fromBase64(QString::fromStdWString(chunkData).toUtf8());
QString string = QString::fromUtf8(bytes.data(), bytes.length());
QRegExp regexp("[A-Za-z]:(?:\\\\[\\w \\(\\)-]+)+\\.[A-Za-z]{3}");
int offset = 0;
while (offset >= 0)
QRegularExpression regexp("[A-Za-z]:(?:\\\\[\\w \\(\\)-]+)+\\.[A-Za-z]{3}");
QRegularExpressionMatchIterator it = regexp.globalMatch(string);
while (it.hasNext())
{
offset = regexp.indexIn(string, offset);
if (offset >= 0)
QRegularExpressionMatch m = it.next();
QString path = m.captured();
QFile file(path);
if (file.exists())
{
QString path = regexp.cap();
QFile file(path);
if (file.exists())
ACCESS_MASK mask = GENERIC_READ;
try
{
ACCESS_MASK mask = GENERIC_READ;
try
{
mask = RegistryHelper::getFileAccessForUser(path.toStdWString(), SECURITY_LOCAL_SERVICE_RID);
}
catch (RegistryException e)
{
// ignore
}
if ((mask & GENERIC_READ) != GENERIC_READ && (mask & FILE_GENERIC_READ) != FILE_GENERIC_READ)
files.append(path);
mask = RegistryHelper::getFileAccessForUser(path.toStdWString(), SECURITY_LOCAL_SERVICE_RID);
}
offset += regexp.matchedLength();
catch (RegistryException e)
{
// ignore
}
if ((mask & GENERIC_READ) != GENERIC_READ && (mask & FILE_GENERIC_READ) != FILE_GENERIC_READ)
files.append(path);
}
}
}
+3 -1
View File
@@ -40,7 +40,9 @@ IFilterGUI* VSTPluginFilterGUIFactory::createFilterGUI(QString& command, QString
if (command == "VSTPlugin")
{
VSTPluginFilterFactory factory;
std::vector<IFilter*> filters = factory.createFilter(L"", command.toStdWString(), parameters.toStdWString());
std::wstring commandWStr = command.toStdWString();
std::wstring paramWStr = parameters.toStdWString();
std::vector<IFilter*> filters = factory.createFilter(L"", commandWStr, paramWStr);
if (!filters.empty())
{
VSTPluginFilter* filter = (VSTPluginFilter*)filters[0];