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:
1 parent
3d51af7364
commit
c692f0639b
94 files changed
+362
-184
No files matched your search
@@ -22,34 +22,34 @@
|
||||
<ProjectGuid>{D4474852-5724-4253-95C6-7A6DC424F194}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Benchmark</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -69,22 +69,22 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.1\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.4\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\libsndfile\lib;C:\Program Files\muparserx_v3_0_1\lib;C:\Program Files (x86)\fftw3;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.1\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.4\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files\libsndfile\lib;C:\Program Files\muparserx_v3_0_1\lib64;C:\Program Files\fftw3;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.1\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.4\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\libsndfile\lib;C:\Program Files\muparserx_v3_0_1\lib;C:\Program Files (x86)\fftw3;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.1\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir);C:\Program Files\tclap-1.2.4\include;C:\Program Files\libsndfile\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files\libsndfile\lib;C:\Program Files\muparserx_v3_0_1\lib64;C:\Program Files\fftw3;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -93,6 +93,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -106,6 +108,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -122,6 +126,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -140,6 +146,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
||||
+13
-4
@@ -22,31 +22,32 @@
|
||||
<ProjectGuid>{6758B50E-B9F0-4389-A61D-A842F0545E1B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Common</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -84,6 +85,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -96,6 +99,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -110,6 +115,8 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -126,6 +133,8 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
||||
@@ -757,7 +757,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
||||
{
|
||||
for (int index = 0; index <= 1; index++)
|
||||
{
|
||||
vector<shared_ptr<AbstractAPOInfo> > apoInfos = DeviceAPOInfo::loadAllInfos(index == 1);
|
||||
vector<shared_ptr<AbstractAPOInfo>> apoInfos = DeviceAPOInfo::loadAllInfos(index == 1);
|
||||
|
||||
for (shared_ptr<AbstractAPOInfo>& apoInfo : apoInfos)
|
||||
{
|
||||
|
||||
@@ -64,6 +64,6 @@ private:
|
||||
void updateList(int listIndex, int itemIndex);
|
||||
void updateButtons(int listIndex);
|
||||
|
||||
std::vector<std::shared_ptr<AbstractAPOInfo> > apoInfos[2];
|
||||
std::vector<std::shared_ptr<AbstractAPOInfo>> apoInfos[2];
|
||||
bool askForReboot = false;
|
||||
};
|
||||
@@ -51,34 +51,34 @@
|
||||
<ProjectGuid>{E18E1CA7-3D6C-4CD5-9CE9-E72565A206E5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Configurator</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -126,6 +126,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -139,6 +141,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -154,6 +158,8 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -171,6 +177,8 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
||||
+2
-2
@@ -70,9 +70,9 @@ static const wchar_t* disableEnhancementsValueName = L"{1da5d803-d492-4edd-8c23-
|
||||
static const wchar_t* installVersion = L"2";
|
||||
static PROPERTYKEY guidPropertyKey = {{0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e}, 4};
|
||||
|
||||
vector<shared_ptr<AbstractAPOInfo> > DeviceAPOInfo::loadAllInfos(bool input)
|
||||
vector<shared_ptr<AbstractAPOInfo>> DeviceAPOInfo::loadAllInfos(bool input)
|
||||
{
|
||||
vector<shared_ptr<AbstractAPOInfo> > result;
|
||||
vector<shared_ptr<AbstractAPOInfo>> result;
|
||||
|
||||
vector<wstring> deviceGuidStrings = RegistryHelper::enumSubKeys(input ? captureKeyPath : renderKeyPath);
|
||||
wstring defaultDeviceGuid = getDefaultDevice(input);
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static std::vector<std::shared_ptr<AbstractAPOInfo> > loadAllInfos(bool input);
|
||||
static std::vector<std::shared_ptr<AbstractAPOInfo>> loadAllInfos(bool input);
|
||||
static std::wstring getDefaultDevice(bool input, int role = 1);
|
||||
static bool checkProtectedAudioDG(bool fix);
|
||||
static bool checkAPORegistration(bool fix);
|
||||
|
||||
@@ -44,7 +44,7 @@ void AnalysisPlotScene::setFreqData(fftwf_complex* freqData, int frameCount, uns
|
||||
update();
|
||||
}
|
||||
|
||||
vector<FilterNode> AnalysisPlotScene::getNodes() const
|
||||
const vector<FilterNode>& AnalysisPlotScene::getNodes() const
|
||||
{
|
||||
return nodes;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
void setFreqData(fftwf_complex* freqData, int frameCount, unsigned sampleRate);
|
||||
|
||||
std::vector<FilterNode> getNodes() const;
|
||||
const std::vector<FilterNode>& getNodes() const;
|
||||
|
||||
private:
|
||||
std::vector<FilterNode> nodes;
|
||||
|
||||
@@ -36,7 +36,7 @@ void AnalysisPlotView::drawBackground(QPainter* painter, const QRectF& rect)
|
||||
|
||||
painter->setRenderHint(QPainter::Antialiasing, true);
|
||||
AnalysisPlotScene* s = qobject_cast<AnalysisPlotScene*>(scene());
|
||||
std::vector<FilterNode>& nodes = s->getNodes();
|
||||
const std::vector<FilterNode>& nodes = s->getNodes();
|
||||
GainIterator gainIterator(nodes);
|
||||
QPainterPath path;
|
||||
bool first = true;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
#include <fftw3.h>
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ FilterTable::~FilterTable()
|
||||
factories.clear();
|
||||
}
|
||||
|
||||
void FilterTable::initialize(QScrollArea* scrollArea, const QList<shared_ptr<AbstractAPOInfo> >& outputDevices, const QList<shared_ptr<AbstractAPOInfo> >& inputDevices)
|
||||
void FilterTable::initialize(QScrollArea* scrollArea, const QList<shared_ptr<AbstractAPOInfo>>& outputDevices, const QList<shared_ptr<AbstractAPOInfo>>& inputDevices)
|
||||
{
|
||||
this->scrollArea = scrollArea;
|
||||
this->outputDevices = outputDevices;
|
||||
@@ -144,7 +144,7 @@ void FilterTable::updateGuis()
|
||||
timer.start();
|
||||
|
||||
gridLayout = new QGridLayout(this);
|
||||
gridLayout->setMargin(0);
|
||||
gridLayout->setContentsMargins(0, 0, 0, 0);
|
||||
gridLayout->setSpacing(0);
|
||||
gridLayout->setColumnStretch(0, 0);
|
||||
gridLayout->setColumnStretch(1, 1);
|
||||
@@ -926,7 +926,7 @@ void FilterTable::keyPressEvent(QKeyEvent* event)
|
||||
void FilterTable::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
scrollingNow = true;
|
||||
scrollStartPoint = event->globalPos();
|
||||
scrollStartPoint = event->globalPosition();
|
||||
|
||||
QWidget::wheelEvent(event);
|
||||
}
|
||||
@@ -939,7 +939,7 @@ bool FilterTable::eventFilter(QObject* obj, QEvent* event)
|
||||
if (type == QEvent::Wheel)
|
||||
{
|
||||
QWheelEvent* wheelEvent = (QWheelEvent*)event;
|
||||
scrollStartPoint = wheelEvent->globalPos();
|
||||
scrollStartPoint = wheelEvent->globalPosition();
|
||||
|
||||
QWidget* widget = qobject_cast<QWidget*>(obj);
|
||||
if (widget != NULL)
|
||||
@@ -1059,12 +1059,12 @@ const QSet<FilterTable::Item*>& FilterTable::getSelectedItems() const
|
||||
return selected;
|
||||
}
|
||||
|
||||
const QList<shared_ptr<AbstractAPOInfo> >& FilterTable::getOutputDevices() const
|
||||
const QList<shared_ptr<AbstractAPOInfo>>& FilterTable::getOutputDevices() const
|
||||
{
|
||||
return outputDevices;
|
||||
}
|
||||
|
||||
const QList<shared_ptr<AbstractAPOInfo> >& FilterTable::getInputDevices() const
|
||||
const QList<shared_ptr<AbstractAPOInfo>>& FilterTable::getInputDevices() const
|
||||
{
|
||||
return inputDevices;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
explicit FilterTable(MainWindow* mainWindow, QWidget* parent = 0);
|
||||
~FilterTable();
|
||||
void initialize(QScrollArea* scrollArea, const QList<std::shared_ptr<AbstractAPOInfo> >& outputDevices, const QList<std::shared_ptr<AbstractAPOInfo> >& inputDevices);
|
||||
void initialize(QScrollArea* scrollArea, const QList<std::shared_ptr<AbstractAPOInfo>>& outputDevices, const QList<std::shared_ptr<AbstractAPOInfo>>& inputDevices);
|
||||
void updateDeviceAndChannelMask(std::shared_ptr<AbstractAPOInfo> selectedDevice, int selectedChannelMask);
|
||||
void updateGuis();
|
||||
void propagateChannels();
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
void deleteSelectedLines();
|
||||
void selectAll();
|
||||
|
||||
const QList<std::shared_ptr<AbstractAPOInfo> >& getOutputDevices() const;
|
||||
const QList<std::shared_ptr<AbstractAPOInfo> >& getInputDevices() const;
|
||||
const QList<std::shared_ptr<AbstractAPOInfo>>& getOutputDevices() const;
|
||||
const QList<std::shared_ptr<AbstractAPOInfo>>& getInputDevices() const;
|
||||
std::shared_ptr<AbstractAPOInfo> getSelectedDevice() const;
|
||||
int getSelectedChannelMask() const;
|
||||
|
||||
@@ -135,9 +135,9 @@ private:
|
||||
Item* selectionStart = NULL;
|
||||
QList<IFilterGUIFactory*> factories;
|
||||
bool scrollingNow = false;
|
||||
QPoint scrollStartPoint;
|
||||
QList<std::shared_ptr<AbstractAPOInfo> > outputDevices;
|
||||
QList<std::shared_ptr<AbstractAPOInfo> > inputDevices;
|
||||
QPointF scrollStartPoint;
|
||||
QList<std::shared_ptr<AbstractAPOInfo>> outputDevices;
|
||||
QList<std::shared_ptr<AbstractAPOInfo>> inputDevices;
|
||||
std::shared_ptr<AbstractAPOInfo> selectedDevice;
|
||||
int selectedChannelMask;
|
||||
QString configPath;
|
||||
|
||||
@@ -170,7 +170,7 @@ void FilterTableRow::on_actionEditText_triggered(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (!lastEditTime.isValid() || lastEditTime.elapsed() > 100)
|
||||
if (!lastEditTime.isValid() || lastEditTime.msecsTo(QDateTime::currentDateTimeUtc()) > 100)
|
||||
{
|
||||
ui->lineEdit->setText(item->text);
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
@@ -199,7 +199,7 @@ void FilterTableRow::on_lineEdit_editingFinished()
|
||||
else
|
||||
{
|
||||
ui->stackedWidget->setCurrentIndex(1);
|
||||
lastEditTime.start();
|
||||
lastEditTime = QDateTime::currentDateTimeUtc();
|
||||
ui->actionEditText->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,5 +60,5 @@ private:
|
||||
FilterTable::Item* item;
|
||||
IFilterGUI* gui;
|
||||
bool editingDone = false;
|
||||
QTime lastEditTime;
|
||||
QDateTime lastEditTime;
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
This file is part of Equalizer APO, a system-wide equalizer.
|
||||
Copyright (C) %YEAR% Jonas Thedering
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
+29
-19
@@ -51,8 +51,8 @@ using namespace std;
|
||||
MainWindow::MainWindow(QDir configDir, QWidget* parent)
|
||||
: QMainWindow(parent), ui(new Ui::MainWindow), configDir(configDir)
|
||||
{
|
||||
outputDevices = QList<shared_ptr<AbstractAPOInfo> >::fromVector(QVector<shared_ptr<AbstractAPOInfo> >::fromStdVector(DeviceAPOInfo::loadAllInfos(false)));
|
||||
inputDevices = QList<shared_ptr<AbstractAPOInfo> >::fromVector(QVector<shared_ptr<AbstractAPOInfo> >::fromStdVector(DeviceAPOInfo::loadAllInfos(true)));
|
||||
outputDevices = toQList(DeviceAPOInfo::loadAllInfos(false));
|
||||
inputDevices = toQList(DeviceAPOInfo::loadAllInfos(true));
|
||||
|
||||
defaultOutputDevice = NULL;
|
||||
for (shared_ptr<AbstractAPOInfo>& apoInfo : outputDevices)
|
||||
@@ -141,7 +141,7 @@ MainWindow::MainWindow(QDir configDir, QWidget* parent)
|
||||
if (autoLocale.language() != QLocale::German)
|
||||
autoLocale = QLocale("en");
|
||||
QLocale::Language languages[] = {QLocale::AnyLanguage, QLocale::English, QLocale::German};
|
||||
for (int i = 0; i < sizeof(languages) / sizeof(QLocale::Language); i++)
|
||||
for (size_t i = 0; i < sizeof(languages) / sizeof(QLocale::Language); i++)
|
||||
{
|
||||
QLocale::Language language = languages[i];
|
||||
QString languageName;
|
||||
@@ -228,7 +228,7 @@ void MainWindow::runConfigurator()
|
||||
{
|
||||
// cannot use QProcess::startDetached because of UAC
|
||||
wstring file = (QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/Configurator.exe")).toStdWString();
|
||||
int result = (int)ShellExecuteW(NULL, L"open", file.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
unsigned long long result = (unsigned long long)ShellExecuteW(NULL, L"open", file.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
if (result == SE_ERR_ACCESSDENIED)
|
||||
ShellExecuteW(NULL, L"runas", file.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ void MainWindow::load(QString path)
|
||||
encodedLine.resize(encodedLine.size() - 1);
|
||||
|
||||
wstring line = StringHelper::toWString(encodedLine, CP_UTF8);
|
||||
if (line.find(L'\uFFFD') != -1)
|
||||
if (line.find(L'\uFFFD') != wstring::npos)
|
||||
line = StringHelper::toWString(encodedLine, CP_ACP);
|
||||
|
||||
lines.append(QString::fromStdWString(line));
|
||||
@@ -402,7 +402,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||
|
||||
void MainWindow::deviceSelected(int index)
|
||||
{
|
||||
shared_ptr<AbstractAPOInfo> apoInfo = deviceComboBox->itemData(index).value<shared_ptr<AbstractAPOInfo> >();
|
||||
shared_ptr<AbstractAPOInfo> apoInfo = deviceComboBox->itemData(index).value<shared_ptr<AbstractAPOInfo>>();
|
||||
if (apoInfo == NULL)
|
||||
apoInfo = defaultOutputDevice;
|
||||
|
||||
@@ -415,7 +415,7 @@ void MainWindow::deviceSelected(int index)
|
||||
const GUIChannelHelper::ChannelConfigurationInfo* selectedInfo = NULL;
|
||||
for (const GUIChannelHelper::ChannelConfigurationInfo& info : infos)
|
||||
{
|
||||
if (info.channelMask == apoInfo->getChannelMask())
|
||||
if (info.channelMask == (int)apoInfo->getChannelMask())
|
||||
{
|
||||
selectedInfo = &info;
|
||||
break;
|
||||
@@ -425,7 +425,7 @@ void MainWindow::deviceSelected(int index)
|
||||
if (selectedInfo != NULL)
|
||||
channelConfigurationComboBox->addItem(tr("From device") + " (" + selectedInfo->name + ")", 0);
|
||||
else if (apoInfo->getChannelCount() != 0)
|
||||
channelConfigurationComboBox->addItem(tr("From device") + " (" + apoInfo->getChannelCount() + " channels)", 0);
|
||||
channelConfigurationComboBox->addItem((tr("From device") + " (%1 channels)").arg(apoInfo->getChannelCount()), 0);
|
||||
else
|
||||
channelConfigurationComboBox->addItem(tr("From device") + " (? channels)", 0);
|
||||
}
|
||||
@@ -458,7 +458,7 @@ void MainWindow::channelConfigurationSelected(int index)
|
||||
if (selectedDevice != NULL)
|
||||
{
|
||||
unsigned channelCount = selectedDevice->getChannelCount();
|
||||
if (channelMask != 0 && channelMask != selectedDevice->getChannelMask())
|
||||
if (channelMask != 0 && channelMask != (int)selectedDevice->getChannelMask())
|
||||
{
|
||||
channelCount = 0;
|
||||
for (int i = 0; i < 31; i++)
|
||||
@@ -475,7 +475,7 @@ void MainWindow::channelConfigurationSelected(int index)
|
||||
}
|
||||
|
||||
vector<wstring> channelNames = ChannelHelper::getChannelNames(channelCount, channelMask);
|
||||
for (wstring channelName : channelNames)
|
||||
for (const wstring& channelName : channelNames)
|
||||
{
|
||||
ui->analysisChannelComboBox->addItem(QString::fromStdWString(channelName));
|
||||
}
|
||||
@@ -615,7 +615,7 @@ void MainWindow::on_actionSaveAs_triggered()
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
QString savePath = dialog.selectedFiles().first();
|
||||
QString savePath = dialog.selectedFiles().at(0);
|
||||
save(filterTable, savePath);
|
||||
filterTable->setConfigPath(QDir::toNativeSeparators(savePath));
|
||||
|
||||
@@ -817,12 +817,12 @@ void MainWindow::on_actionResetAllGlobalPreferences_triggered()
|
||||
if (QMessageBox::question(this, tr("Restart required"), tr("Configuration Editor will be restarted to apply the changed settings. Proceed?")) == QMessageBox::Yes)
|
||||
{
|
||||
QSettings settings(QString::fromWCharArray(EDITOR_REGPATH), QSettings::NativeFormat);
|
||||
for (QString key : settings.childGroups())
|
||||
for (const QString& key : settings.childGroups())
|
||||
{
|
||||
if (key != "file-specific")
|
||||
settings.remove(key);
|
||||
}
|
||||
for (QString key : settings.childKeys())
|
||||
for (const QString& key : settings.childKeys())
|
||||
settings.remove(key);
|
||||
|
||||
restart = true;
|
||||
@@ -836,9 +836,9 @@ void MainWindow::on_actionResetAllFileSpecificPreferences_triggered()
|
||||
if (QMessageBox::question(this, tr("Restart required"), tr("Configuration Editor will be restarted to apply the changed settings. Proceed?")) == QMessageBox::Yes)
|
||||
{
|
||||
QSettings settings(QString::fromWCharArray(EDITOR_PER_FILE_REGPATH), QSettings::NativeFormat);
|
||||
for (QString key : settings.childGroups())
|
||||
for (const QString& key : settings.childGroups())
|
||||
settings.remove(key);
|
||||
for (QString key : settings.childKeys())
|
||||
for (const QString& key : settings.childKeys())
|
||||
settings.remove(key);
|
||||
|
||||
restart = true;
|
||||
@@ -871,7 +871,7 @@ FilterTable* MainWindow::addTab(QString title, QString tooltip, QString configPa
|
||||
|
||||
void MainWindow::getDeviceAndChannelMask(shared_ptr<AbstractAPOInfo>* selectedDevice, int* channelMask)
|
||||
{
|
||||
*selectedDevice = deviceComboBox->currentData().value<shared_ptr<AbstractAPOInfo> >();
|
||||
*selectedDevice = deviceComboBox->currentData().value<shared_ptr<AbstractAPOInfo>>();
|
||||
if (*selectedDevice == NULL)
|
||||
*selectedDevice = defaultOutputDevice;
|
||||
|
||||
@@ -981,7 +981,7 @@ void MainWindow::loadPreferences()
|
||||
{
|
||||
for (int i = 0; i < deviceComboBox->count(); i++)
|
||||
{
|
||||
shared_ptr<AbstractAPOInfo> apoInfo = deviceComboBox->itemData(i).value<shared_ptr<AbstractAPOInfo> >();
|
||||
shared_ptr<AbstractAPOInfo> apoInfo = deviceComboBox->itemData(i).value<shared_ptr<AbstractAPOInfo>>();
|
||||
if (apoInfo != NULL)
|
||||
{
|
||||
if (QString::fromStdWString(apoInfo->getDeviceString()).compare(selectedDevice, Qt::CaseInsensitive) == 0)
|
||||
@@ -1055,7 +1055,7 @@ void MainWindow::savePreferences()
|
||||
settings.setValue("geometry", saveGeometry());
|
||||
settings.setValue("windowState", saveState());
|
||||
settings.setValue("instantMode", instantModeCheckBox->isChecked());
|
||||
shared_ptr<AbstractAPOInfo> selectedDevice = deviceComboBox->currentData().value<shared_ptr<AbstractAPOInfo> >();
|
||||
shared_ptr<AbstractAPOInfo> selectedDevice = deviceComboBox->currentData().value<shared_ptr<AbstractAPOInfo>>();
|
||||
settings.setValue("selectedDevice", selectedDevice != NULL ? QString::fromStdWString(selectedDevice->getDeviceString()) : "");
|
||||
int channelMask = channelConfigurationComboBox->currentData().toInt();
|
||||
settings.setValue("selectedChannelMask", channelMask);
|
||||
@@ -1105,7 +1105,7 @@ void MainWindow::updateRecentFiles()
|
||||
if (separatorsFound == 1)
|
||||
{
|
||||
QList<QAction*> newActions;
|
||||
for (QString recentFile : recentFiles)
|
||||
for (const QString& recentFile : recentFiles)
|
||||
{
|
||||
QAction* newAction = new QAction(recentFile, ui->menuFile);
|
||||
connect(newAction, SIGNAL(triggered(bool)), this, SLOT(recentFileSelected()));
|
||||
@@ -1124,3 +1124,13 @@ void MainWindow::updateRecentFiles()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<class T> QList<T> MainWindow::toQList(const std::vector<T>& vector)
|
||||
{
|
||||
QList<T> list;
|
||||
list.reserve((int)vector.size());
|
||||
for (T t : vector)
|
||||
list.append(t);
|
||||
|
||||
return list;
|
||||
}
|
||||
+3
-2
@@ -98,6 +98,7 @@ private:
|
||||
void loadPreferences();
|
||||
void savePreferences();
|
||||
void updateRecentFiles();
|
||||
template<class T> QList<T> toQList(const std::vector<T>& vector);
|
||||
|
||||
Ui::MainWindow* ui;
|
||||
|
||||
@@ -105,8 +106,8 @@ private:
|
||||
QCheckBox* instantModeCheckBox;
|
||||
QComboBox* deviceComboBox;
|
||||
QComboBox* channelConfigurationComboBox;
|
||||
QList<std::shared_ptr<AbstractAPOInfo> > outputDevices;
|
||||
QList<std::shared_ptr<AbstractAPOInfo> > inputDevices;
|
||||
QList<std::shared_ptr<AbstractAPOInfo>> outputDevices;
|
||||
QList<std::shared_ptr<AbstractAPOInfo>> inputDevices;
|
||||
std::shared_ptr<AbstractAPOInfo> defaultOutputDevice;
|
||||
AnalysisPlotScene* analysisPlotScene;
|
||||
AnalysisThread* analysisThread = NULL;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
+6
-6
@@ -47,17 +47,17 @@ int main(int argc, char* argv[])
|
||||
QSettings settings(QString::fromWCharArray(EDITOR_REGPATH), QSettings::NativeFormat);
|
||||
QVariant languageValue = settings.value("language");
|
||||
if (languageValue.isValid())
|
||||
QLocale::setDefault(languageValue.toString());
|
||||
QLocale::setDefault(QLocale(languageValue.toString()));
|
||||
else
|
||||
QLocale::setDefault(QLocale::system());
|
||||
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load(QLocale(), ":/translations/qtbase", "_");
|
||||
application.installTranslator(&qtTranslator);
|
||||
if (qtTranslator.load(QLocale(), ":/translations/qtbase", "_"))
|
||||
application.installTranslator(&qtTranslator);
|
||||
|
||||
QTranslator editorTranslator;
|
||||
editorTranslator.load(QLocale(), ":/translations/Editor", "_");
|
||||
application.installTranslator(&editorTranslator);
|
||||
if (editorTranslator.load(QLocale(), ":/translations/Editor", "_"))
|
||||
application.installTranslator(&editorTranslator);
|
||||
|
||||
QString configPath = QDir::currentPath();
|
||||
if (RegistryHelper::keyExists(APP_REGPATH) && RegistryHelper::valueExists(APP_REGPATH, L"ConfigPath"))
|
||||
@@ -82,7 +82,7 @@ int main(int argc, char* argv[])
|
||||
if (args.isEmpty() && w.isEmpty())
|
||||
args = QStringList("config.txt");
|
||||
|
||||
for (QString arg : args)
|
||||
for (const QString& arg : args)
|
||||
w.load(configDir.absoluteFilePath(arg));
|
||||
|
||||
w.doChecks();
|
||||
|
||||
@@ -35,7 +35,7 @@ QRectF ChannelGraphItem::boundingRect() const
|
||||
if (cachedRect.isNull())
|
||||
{
|
||||
QFontMetrics metrics(scene()->font());
|
||||
int width = metrics.width(name);
|
||||
int width = metrics.size(0, name).width();
|
||||
// we only use upper case characters and digits, so everything is above the baseline
|
||||
int height = metrics.ascent();
|
||||
// make it at least quadratic
|
||||
|
||||
@@ -63,7 +63,7 @@ void FrequencyPlotHRuler::paintEvent(QPaintEvent*)
|
||||
text = QString("%0").arg(hz);
|
||||
else
|
||||
text = QString("%0k").arg(hz / 1000);
|
||||
if (metrics.width(text) + 2 < s->hzToX(hz + hzBase) - x)
|
||||
if (metrics.size(0, text).width() + 2 < s->hzToX(hz + hzBase) - x)
|
||||
painter.drawText(x - topLeft.x() + offsetLeft + 1, 0, 0, height(), Qt::TextDontClip | Qt::AlignCenter, text);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void FrequencyPlotHRuler::paintEvent(QPaintEvent*)
|
||||
void FrequencyPlotHRuler::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
FrequencyPlotView* view = qobject_cast<FrequencyPlotView*>(parentWidget());
|
||||
view->zoom(event->angleDelta().y(), 0, event->x() - view->viewportMargins().left(), 0);
|
||||
view->zoom(event->angleDelta().y(), 0, event->position().x() - view->viewportMargins().left(), 0);
|
||||
}
|
||||
|
||||
void FrequencyPlotHRuler::mouseMoveEvent(QMouseEvent* event)
|
||||
|
||||
@@ -101,5 +101,5 @@ void FrequencyPlotVRuler::wheelEvent(QWheelEvent* event)
|
||||
void FrequencyPlotVRuler::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
FrequencyPlotView* view = qobject_cast<FrequencyPlotView*>(parentWidget());
|
||||
view->setLastMousePos(QPoint(0, min(event->y(), view->viewport()->height() - 1)));
|
||||
view->setLastMousePos(QPoint(0, fmin(event->y(), view->viewport()->height() - 1)));
|
||||
}
|
||||
@@ -179,7 +179,7 @@ void FrequencyPlotView::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
int delta = event->angleDelta().y();
|
||||
zoom(delta, delta, event->x(), event->y());
|
||||
zoom(delta, delta, event->position().x(), event->position().y());
|
||||
}
|
||||
|
||||
void FrequencyPlotView::scrollContentsBy(int dx, int dy)
|
||||
|
||||
@@ -28,7 +28,7 @@ MiddleClickTabBar::MiddleClickTabBar(QWidget* parent)
|
||||
|
||||
void MiddleClickTabBar::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->button() == Qt::MidButton)
|
||||
if (event->button() == Qt::MiddleButton)
|
||||
{
|
||||
int tabIndex = tabAt(event->pos());
|
||||
if (tabIndex != -1)
|
||||
|
||||
@@ -40,8 +40,8 @@ QSize ResizingLineEdit::sizeHint() const
|
||||
QSize originalSize = QLineEdit::sizeHint();
|
||||
|
||||
QFontMetrics metrics = fontMetrics();
|
||||
QSize contentSize(metrics.width(text()), metrics.height());
|
||||
QStyleOptionFrameV2 opt;
|
||||
QSize contentSize(metrics.size(0, text()));
|
||||
QStyleOptionFrame opt;
|
||||
initStyleOption(&opt);
|
||||
|
||||
QSize size = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, contentSize, this);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<ProjectGuid>{5AF4EE2B-CC80-4AE5-A786-86FACC0CC649}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>EqualizerAPO</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -30,28 +30,28 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfAtl>false</UseOfAtl>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfAtl>false</UseOfAtl>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -95,11 +95,13 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;_DEBUG;_WINDOWS;_USRDLL;EQUALIZERAPO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserxd.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserxd.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;legacy_stdio_definitions.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>EqualizerAPO.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<Midl>
|
||||
@@ -112,11 +114,13 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;_DEBUG;_WINDOWS;_USRDLL;EQUALIZERAPO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserxd.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserxd.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;legacy_stdio_definitions.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>EqualizerAPO.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<Midl>
|
||||
@@ -132,13 +136,15 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;NDEBUG;_WINDOWS;_USRDLL;EQUALIZERAPO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserx.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserx.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;legacy_stdio_definitions.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>EqualizerAPO.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
@@ -151,13 +157,15 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;USE_WINDDK;NDEBUG;_WINDOWS;_USRDLL;EQUALIZERAPO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserx.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(OutDir)Common.lib;muparserx.lib;audioeng.lib;version.lib;wmcodecdspuuid.lib;AudioBaseProcessingObject.lib;legacy_stdio_definitions.lib;audiomediatypecrt.lib;Shlwapi.lib;authz.lib;crypt32.lib;dbghelp.lib;libsndfile-1.lib;libfftw3f-3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>EqualizerAPO.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
+68
-17
@@ -1,6 +1,11 @@
|
||||
!include "LogicLib.nsh"
|
||||
!include "MUI2.nsh"
|
||||
!include "NSISpcre.nsh"
|
||||
!include "WinVer.nsh"
|
||||
|
||||
;Use ANSI because NSISpcre's Unicode version is less optimized
|
||||
Unicode false
|
||||
ManifestDPIAware true
|
||||
;Use more efficient compression
|
||||
SetCompressor /SOLID lzma
|
||||
|
||||
@@ -32,12 +37,14 @@ SetCompressor /SOLID lzma
|
||||
|
||||
Var StartMenuFolder
|
||||
Var OldStartMenuFolder
|
||||
Var OLDINSTDIR
|
||||
|
||||
;--------------------------------
|
||||
;Interface Settings
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_COMPONENTSPAGE_NODESC
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
||||
;--------------------------------
|
||||
;Pages
|
||||
@@ -71,29 +78,47 @@ SetCompressor /SOLID lzma
|
||||
;Macros
|
||||
|
||||
!macro RenameAndDelete path
|
||||
IfFileExists "${path}" 0 +3
|
||||
${If} ${FileExists} "${path}"
|
||||
Rename "${path}" "${path}.old"
|
||||
Delete /REBOOTOK "${path}.old"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
LangString UCRTError ${LANG_ENGLISH} "Your Windows installation is missing required updates to use this program. Please install remaining Windows updates or the Visual C++ Redistributable for Visual Studio 2015 - 2019.$\n$\nDo you want to download the Visual C++ Redistributable now?"
|
||||
LangString UCRTError ${LANG_GERMAN} "Ihrer Windows-Installation fehlen benötigte Updates, um dieses Programm zu verwenden. Bitte installieren Sie ausstehende Windows-Updates oder das Visual C++ Redistributable für Visual Studio 2015 - 2019.$\n$\nMöchten Sie jetzt das Visual C++ Redistributable herunterladen?"
|
||||
|
||||
;--------------------------------
|
||||
;Functions
|
||||
Function .onInit
|
||||
SetRegView 64
|
||||
!if ${LIBPATH} == "lib64"
|
||||
SetRegView 64
|
||||
!endif
|
||||
;Get installation folder from registry if available
|
||||
ReadRegStr $INSTDIR HKLM ${REGPATH} "InstallPath"
|
||||
|
||||
;Use default installation folder otherwise
|
||||
StrCmp $INSTDIR "" 0 +2
|
||||
${If} $INSTDIR == ""
|
||||
StrCpy $INSTDIR "$PROGRAMFILES64\EqualizerAPO"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||
;Try to replace version number in start menu folder
|
||||
${REReplace} $0 "Equalizer APO [0-9]+\.[0-9]+(?:\.[0-9]+)?" "$StartMenuFolder" "Equalizer APO ${VERSION}" 1
|
||||
StrCmp $0 "" +2 0
|
||||
${If} $0 != ""
|
||||
StrCpy $StartMenuFolder "$0"
|
||||
${EndIf}
|
||||
|
||||
Call initCheck
|
||||
|
||||
${IfNot} ${AtLeastWin10}
|
||||
System::Call 'KERNEL32::LoadLibrary(t "ucrtbase.dll")p.r0'
|
||||
${If} $0 P= 0
|
||||
MessageBox MB_YESNO|MB_ICONSTOP $(UCRTError) IDNO skipDownload
|
||||
ExecShell "open" "${VCREDIST_URL}"
|
||||
skipDownload:
|
||||
Abort
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
@@ -109,13 +134,17 @@ Section "Install" SecInstall
|
||||
|
||||
;Rename before delete as these files may be in use
|
||||
!insertmacro RenameAndDelete "$INSTDIR\EqualizerAPO.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\libsndfile-1.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\libfftw3f-3.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\libsndfile-1.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcp100.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcr100.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcp120.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcr120.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcp140.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcp140_1.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\VoicemeeterClient.exe"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\vcruntime140.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\vcruntime140_1.dll"
|
||||
|
||||
File "${BINPATH}\EqualizerAPO.dll"
|
||||
File "${BINPATH}\Configurator.exe"
|
||||
@@ -124,22 +153,28 @@ Section "Install" SecInstall
|
||||
|
||||
File "${BINPATH_EDITOR}\Editor.exe"
|
||||
|
||||
File "${LIBPATH}\libsndfile-1.dll"
|
||||
File "${LIBPATH}\libfftw3f-3.dll"
|
||||
File "${LIBPATH}\msvcp120.dll"
|
||||
File "${LIBPATH}\msvcr120.dll"
|
||||
File "${LIBPATH}\libsndfile-1.dll"
|
||||
File "${LIBPATH}\msvcp140.dll"
|
||||
File "${LIBPATH}\msvcp140_1.dll"
|
||||
File "${LIBPATH}\Qt5Core.dll"
|
||||
File "${LIBPATH}\Qt5Gui.dll"
|
||||
File "${LIBPATH}\Qt5Widgets.dll"
|
||||
File "${LIBPATH}\vcruntime140.dll"
|
||||
!if ${LIBPATH} == "lib64"
|
||||
File "${LIBPATH}\vcruntime140_1.dll"
|
||||
!endif
|
||||
|
||||
CreateDirectory "$INSTDIR\qt"
|
||||
CreateDirectory "$INSTDIR\qt\platforms"
|
||||
CreateDirectory "$INSTDIR\qt\imageformats"
|
||||
CreateDirectory "$INSTDIR\qt\platforms"
|
||||
CreateDirectory "$INSTDIR\qt\styles"
|
||||
|
||||
File /oname=qt\platforms\qwindows.dll "${LIBPATH}\qt\platforms\qwindows.dll"
|
||||
File /oname=qt\imageformats\qgif.dll "${LIBPATH}\qt\imageformats\qgif.dll"
|
||||
File /oname=qt\imageformats\qico.dll "${LIBPATH}\qt\imageformats\qico.dll"
|
||||
File /oname=qt\imageformats\qjpeg.dll "${LIBPATH}\qt\imageformats\qjpeg.dll"
|
||||
File /oname=qt\platforms\qwindows.dll "${LIBPATH}\qt\platforms\qwindows.dll"
|
||||
File /oname=qt\styles\qwindowsvistastyle.dll "${LIBPATH}\qt\styles\qwindowsvistastyle.dll"
|
||||
|
||||
File "Configuration tutorial (online).url"
|
||||
File "Configuration reference (online).url"
|
||||
@@ -159,10 +194,21 @@ Section "Install" SecInstall
|
||||
;Grant write access to the config directory for all users
|
||||
AccessControl::GrantOnFile "$INSTDIR\config" "(S-1-5-32-545)" "FullAccess"
|
||||
|
||||
ReadRegStr $OLDINSTDIR HKLM ${REGPATH} "InstallPath"
|
||||
WriteRegStr HKLM ${REGPATH} "InstallPath" "$INSTDIR"
|
||||
WriteRegStr HKLM ${REGPATH} "ConfigPath" "$INSTDIR\config"
|
||||
WriteRegStr HKLM ${REGPATH} "EnableTrace" "false"
|
||||
|
||||
;Write ConfigPath if non-existing or if InstallPath has changed
|
||||
ReadRegStr $0 HKLM ${REGPATH} "ConfigPath"
|
||||
${If} $0 == ""
|
||||
${OrIf} $INSTDIR != $OLDINSTDIR
|
||||
WriteRegStr HKLM ${REGPATH} "ConfigPath" "$INSTDIR\config"
|
||||
${EndIf}
|
||||
|
||||
ReadRegStr $0 HKLM ${REGPATH} "EnableTrace"
|
||||
${If} $0 == ""
|
||||
WriteRegStr HKLM ${REGPATH} "EnableTrace" "false"
|
||||
${EndIf}
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
@@ -205,7 +251,9 @@ Section /o un.$(SecRemoveName)
|
||||
SectionEnd
|
||||
|
||||
Section "-un.Uninstall"
|
||||
SetRegView 64
|
||||
!if ${LIBPATH} == "lib64"
|
||||
SetRegView 64
|
||||
!endif
|
||||
|
||||
ExecWait '"$INSTDIR\Configurator.exe" /u'
|
||||
|
||||
@@ -222,14 +270,17 @@ Section "-un.Uninstall"
|
||||
|
||||
RMDir /r "$INSTDIR\qt"
|
||||
|
||||
!if ${LIBPATH} == "lib64"
|
||||
Delete /REBOOTOK "$INSTDIR\vcruntime140_1.dll"
|
||||
!endif
|
||||
Delete /REBOOTOK "$INSTDIR\vcruntime140.dll"
|
||||
Delete "$INSTDIR\Qt5Widgets.dll"
|
||||
Delete "$INSTDIR\Qt5Gui.dll"
|
||||
Delete "$INSTDIR\Qt5Core.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\msvcr120.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\msvcp120.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\libfftw3f-3.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\msvcp140_1.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\msvcp140.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\libsndfile-1.dll"
|
||||
|
||||
Delete /REBOOTOK "$INSTDIR\libfftw3f-3.dll"
|
||||
Delete "$INSTDIR\Editor.exe"
|
||||
|
||||
Delete "$INSTDIR\VoicemeeterClient.exe"
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
|
||||
!define BINPATH "..\Release"
|
||||
!define BINPATH_EDITOR "..\build-Editor-Desktop_Qt_5_7_MSVC2013_32bit-Release\release"
|
||||
!define BINPATH_EDITOR "..\build-Editor-Desktop_Qt_5_15_2_MSVC2019_32bit\release"
|
||||
!define LIBPATH "lib32"
|
||||
!define VCREDIST_URL "https://aka.ms/vs/16/release/vc_redist.x86.exe"
|
||||
|
||||
!include "Setup.nsi"
|
||||
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
|
||||
!define BINPATH "..\x64\Release"
|
||||
!define BINPATH_EDITOR "..\build-Editor-Desktop_Qt_5_7_MSVC2013_64bit-Release\release"
|
||||
!define BINPATH_EDITOR "..\build-Editor-Desktop_Qt_5_15_2_MSVC2019_64bit\release"
|
||||
!define LIBPATH "lib64"
|
||||
!define VCREDIST_URL "https://aka.ms/vs/16/release/vc_redist.x64.exe"
|
||||
|
||||
!include "Setup.nsi"
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -38,7 +38,7 @@ static const wchar_t* clientFilename = L"VoicemeeterClient.exe";
|
||||
static const wchar_t* voicemeeterClientKeyPath = USER_REGPATH L"\\Voicemeeter Client";
|
||||
static const wchar_t* sampleRateValueName = L"sampleRate";
|
||||
|
||||
typedef NTSTATUS (NTAPI* pfnNtQueryInformationProcess)(
|
||||
typedef NTSTATUS (NTAPI * pfnNtQueryInformationProcess)(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PROCESSINFOCLASS ProcessInformationClass,
|
||||
OUT PVOID ProcessInformation,
|
||||
@@ -46,7 +46,7 @@ typedef NTSTATUS (NTAPI* pfnNtQueryInformationProcess)(
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
);
|
||||
|
||||
void VoicemeeterAPOInfo::prependInfos(vector<shared_ptr<AbstractAPOInfo> >& list)
|
||||
void VoicemeeterAPOInfo::prependInfos(vector<shared_ptr<AbstractAPOInfo>>& list)
|
||||
{
|
||||
wstring voicemeeterDirectory;
|
||||
if (RegistryHelper::keyExists(voicemeeterKeyPath))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
class VoicemeeterAPOInfo : public AbstractAPOInfo
|
||||
{
|
||||
public:
|
||||
static void prependInfos(std::vector<std::shared_ptr<AbstractAPOInfo> >& list);
|
||||
static void prependInfos(std::vector<std::shared_ptr<AbstractAPOInfo>>& list);
|
||||
|
||||
VoicemeeterAPOInfo(const std::wstring& connectionName, bool voicemeeterInstalled);
|
||||
|
||||
|
||||
@@ -22,31 +22,32 @@
|
||||
<ProjectGuid>{10F1DD37-EA50-46C2-810D-D01A1A0D4D2F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>VoicemeeterClient</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -92,6 +93,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -105,6 +108,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -121,6 +126,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -139,6 +146,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
call "%VS120COMNTOOLS%\vsvars32.bat"
|
||||
msbuild EqualizerAPO.sln /p:Configuration=release /p:platform=win32 /t:rebuild
|
||||
FOR /F "tokens=*" %%g IN ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -products * -property installationPath') do (SET vspath=%%g)
|
||||
call "%vspath%\Common7\Tools\VsDevCmd.bat"
|
||||
msbuild EqualizerAPO.sln /p:Configuration=release /p:platform=win32 /t:rebuild /m
|
||||
if %ERRORLEVEL% GEQ 1 goto done
|
||||
msbuild EqualizerAPO.sln /p:Configuration=release /p:platform=x64 /t:rebuild
|
||||
msbuild EqualizerAPO.sln /p:Configuration=release /p:platform=x64 /t:rebuild /m
|
||||
if %ERRORLEVEL% GEQ 1 goto done
|
||||
|
||||
if not exist build-Editor-Desktop_Qt_5_7_MSVC2013_32bit-Release mkdir build-Editor-Desktop_Qt_5_7_MSVC2013_32bit-Release
|
||||
cd build-Editor-Desktop_Qt_5_7_MSVC2013_32bit-Release
|
||||
call "%VCINSTALLDIR%vcvarsall.bat" x86
|
||||
"C:\Qt\5.7\msvc2013\bin\qmake.exe" ..\Editor\Editor.pro -r -spec win32-msvc2013 "CONFIG+=release"
|
||||
if not exist build-Editor-Desktop_Qt_5_15_2_MSVC2019_32bit mkdir build-Editor-Desktop_Qt_5_15_2_MSVC2019_32bit
|
||||
cd build-Editor-Desktop_Qt_5_15_2_MSVC2019_32bit
|
||||
call "%vspath%\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
"C:\Qt\5.15.2\msvc2019\bin\qmake.exe" ..\Editor\Editor.pro -r "CONFIG+=release"
|
||||
"C:\Qt\Tools\QtCreator\bin\jom.exe" clean
|
||||
"C:\Qt\Tools\QtCreator\bin\jom.exe"
|
||||
if %ERRORLEVEL% GEQ 1 goto done
|
||||
cd..
|
||||
|
||||
if not exist build-Editor-Desktop_Qt_5_7_MSVC2013_64bit-Release mkdir build-Editor-Desktop_Qt_5_7_MSVC2013_64bit-Release
|
||||
cd build-Editor-Desktop_Qt_5_7_MSVC2013_64bit-Release
|
||||
call "%VCINSTALLDIR%vcvarsall.bat" amd64
|
||||
"C:\Qt\5.7\msvc2013_64\bin\qmake.exe" ..\Editor\Editor.pro -r -spec win32-msvc2013 "CONFIG+=release"
|
||||
if not exist build-Editor-Desktop_Qt_5_15_2_MSVC2019_64bit mkdir build-Editor-Desktop_Qt_5_15_2_MSVC2019_64bit
|
||||
cd build-Editor-Desktop_Qt_5_15_2_MSVC2019_64bit
|
||||
call "%vspath%\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
"C:\Qt\5.15.2\msvc2019_64\bin\qmake.exe" ..\Editor\Editor.pro -r "CONFIG+=release"
|
||||
"C:\Qt\Tools\QtCreator\bin\jom.exe" clean
|
||||
"C:\Qt\Tools\QtCreator\bin\jom.exe"
|
||||
if %ERRORLEVEL% GEQ 1 goto done
|
||||
|
||||
@@ -27,8 +27,8 @@ class BiQuadFilter : public IFilter
|
||||
{
|
||||
public:
|
||||
BiQuadFilter(BiQuad::Type type, double dbGain, double freq, double bandwidthOrQOrS, bool isBandwidthOrS, bool isCornerFreq);
|
||||
virtual~BiQuadFilter();
|
||||
bool getInPlace() override{return true;}
|
||||
virtual ~BiQuadFilter();
|
||||
bool getInPlace() override {return true;}
|
||||
std::vector<std::wstring> initialize(float sampleRate, unsigned maxFrameCount, std::vector<std::wstring> channelNames) override;
|
||||
void process(float** output, float** input, unsigned frameCount) override;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ bool DeviceFilterFactory::matchDevice(const std::wstring& deviceString, const st
|
||||
{
|
||||
wstring value = StringHelper::trim(pattern) + L";";
|
||||
|
||||
vector<vector<wstring> > fullList;
|
||||
vector<vector<wstring>> fullList;
|
||||
vector<wstring> currentList;
|
||||
wstring currentWord;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <hash_map>
|
||||
|
||||
#include "IFilterFactory.h"
|
||||
#include "IFilter.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
template<typename type> struct to_WString_type_traits
|
||||
{
|
||||
static inline std::wstring cast_ToWString(type& input) {return std::wstring();}
|
||||
static inline std::wstring cast_ToWString(const type& input) {return std::wstring();}
|
||||
};
|
||||
|
||||
template<> struct to_WString_type_traits<float>
|
||||
@@ -41,12 +41,12 @@ template<> struct to_WString_type_traits<double>
|
||||
|
||||
template<> struct to_WString_type_traits<int>
|
||||
{
|
||||
static inline std::wstring cast_ToWString(const int& input) {return std::to_wstring((_Longlong)input);}
|
||||
static inline std::wstring cast_ToWString(const int& input) {return std::to_wstring((long long)input);}
|
||||
};
|
||||
|
||||
template<> struct to_WString_type_traits<bool>
|
||||
{
|
||||
static inline std::wstring cast_ToWString(const bool& input) {return std::to_wstring((_Longlong)input);}
|
||||
static inline std::wstring cast_ToWString(const bool& input) {return std::to_wstring((long long)input);}
|
||||
};
|
||||
|
||||
template<> struct to_WString_type_traits<std::string>
|
||||
@@ -99,7 +99,7 @@ template<> struct constructor_traits<std::wstring>
|
||||
static inline std::wstring initFrom(std::wstring input) {return input;}
|
||||
};
|
||||
|
||||
template<> struct constructor_traits<std::vector<char> >
|
||||
template<> struct constructor_traits<std::vector<char>>
|
||||
{
|
||||
static inline std::wstring initFrom(std::vector<char> input)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ HRESULT VolumeController::getVolume(float& currentVolume)
|
||||
|
||||
HRESULT VolumeController::setVolume(float volume)
|
||||
{
|
||||
volume = min(volume, _maxVol);
|
||||
volume = max(volume, _minVol);
|
||||
volume = fmin(volume, _maxVol);
|
||||
volume = fmax(volume, _minVol);
|
||||
return _endpointVolume->SetMasterVolumeLevel(volume, NULL);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <wincrypt.h>
|
||||
#include <inttypes.h>
|
||||
#include "StringHelper.h"
|
||||
#include "version.h"
|
||||
#include "VSTPluginLibrary.h"
|
||||
@@ -32,7 +33,7 @@ static intptr_t callback(AEffect* effect, int32_t opcode, int32_t index, intptr_
|
||||
{
|
||||
VSTPluginInstance* instance = effect != NULL ? (VSTPluginInstance*)effect->user : NULL;
|
||||
#ifdef _DEBUG
|
||||
printf("vst: %p opcode: %d index: %d value: %d ptr: %p opt: %f user: %p\n",
|
||||
printf("vst: %p opcode: %d index: %d value: %" PRIdPTR " ptr: %p opt: %f user: %p\n",
|
||||
effect, opcode, index, value, ptr, opt, effect != NULL ? effect->user : NULL);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
@@ -59,10 +60,10 @@ static intptr_t callback(AEffect* effect, int32_t opcode, int32_t index, intptr_
|
||||
return 0;
|
||||
|
||||
case audioMasterNeedIdle:
|
||||
return effect->dispatcher(effect, effIdle, 0, 0, NULL, 0.0f);
|
||||
return effect != NULL ? effect->dispatcher(effect, effIdle, 0, 0, NULL, 0.0f) : 0;
|
||||
|
||||
case audioMasterUpdateDisplay:
|
||||
return effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f);
|
||||
return effect != NULL ? effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f) : 0;
|
||||
|
||||
case audioMasterGetTime:
|
||||
return 0;
|
||||
@@ -199,6 +200,7 @@ std::wstring VSTPluginInstance::getName() const
|
||||
char buf[256];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
effect->dispatcher(effect, effGetEffectName, 0, 0, buf, 0.0f);
|
||||
buf[255] = '\0'; // just to be sure
|
||||
|
||||
return StringHelper::toWString(buf, CP_UTF8);
|
||||
}
|
||||
@@ -271,6 +273,7 @@ void VSTPluginInstance::writeToEffect(const std::wstring& chunkData, const std::
|
||||
{
|
||||
char buf[256];
|
||||
effect->dispatcher(effect, effGetParamName, i, 0, buf, 0.0f);
|
||||
buf[255] = '\0'; // just to be sure
|
||||
wstring name = StringHelper::toWString(buf, CP_UTF8);
|
||||
auto it = paramMap.find(name);
|
||||
if (it != paramMap.end())
|
||||
@@ -291,7 +294,7 @@ void VSTPluginInstance::readFromEffect(std::wstring& chunkData, std::unordered_m
|
||||
{
|
||||
BYTE* chunk = NULL;
|
||||
int size = (int)effect->dispatcher(effect, effGetChunk, 1, 0, &chunk, 0.0f);
|
||||
DWORD stringLength;
|
||||
DWORD stringLength = 0;
|
||||
CryptBinaryToStringW(chunk, size, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, NULL, &stringLength);
|
||||
wchar_t* string = new wchar_t[stringLength];
|
||||
if (CryptBinaryToStringW(chunk, size, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, string, &stringLength) == TRUE)
|
||||
@@ -304,6 +307,7 @@ void VSTPluginInstance::readFromEffect(std::wstring& chunkData, std::unordered_m
|
||||
{
|
||||
char buf[256];
|
||||
effect->dispatcher(effect, effGetParamName, i, 0, buf, 0.0f);
|
||||
buf[255] = '\0'; // just to be sure
|
||||
float value = effect->getParameter(effect, i);
|
||||
paramMap[StringHelper::toWString(buf, CP_UTF8)] = value;
|
||||
}
|
||||
|
||||
@@ -68,11 +68,11 @@ public:
|
||||
|
||||
private:
|
||||
std::shared_ptr<VSTPluginLibrary> library;
|
||||
AEffect* effect;
|
||||
AEffect* effect = NULL;
|
||||
std::function<void()> automateFunc;
|
||||
std::function<void(int, int)> sizeWindowFunc;
|
||||
float sampleRate = 0.0f;
|
||||
int usedChannelCount;
|
||||
int usedChannelCount = -1;
|
||||
int processLevel = 0;
|
||||
int language = 1;
|
||||
};
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
std::unordered_map<std::wstring, std::weak_ptr<VSTPluginLibrary> > VSTPluginLibrary::instanceMap;
|
||||
std::unordered_map<std::wstring, std::weak_ptr<VSTPluginLibrary>> VSTPluginLibrary::instanceMap;
|
||||
std::wstring VSTPluginLibrary::defaultPluginPath;
|
||||
|
||||
std::shared_ptr<VSTPluginLibrary> VSTPluginLibrary::getInstance(const wstring& libPath)
|
||||
|
||||
@@ -43,7 +43,7 @@ protected:
|
||||
|
||||
private:
|
||||
VSTPluginLibrary(const std::wstring& libPath);
|
||||
static std::unordered_map<std::wstring, std::weak_ptr<VSTPluginLibrary> > instanceMap;
|
||||
static std::unordered_map<std::wstring, std::weak_ptr<VSTPluginLibrary>> instanceMap;
|
||||
static std::wstring defaultPluginPath;
|
||||
std::wstring libPath;
|
||||
};
|
||||
@@ -85,7 +85,7 @@ void ReadRegDWORDFunction::Eval(ptr_val_type& ret, const ptr_val_type* arg, int
|
||||
{
|
||||
unsigned long value = RegistryHelper::readDWORDValue(key, valuename);
|
||||
|
||||
*ret = (long)value;
|
||||
*ret = (int)value;
|
||||
|
||||
engine->watchRegistryKey(key);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class ReadRegStringFunction : public mup::ICallback
|
||||
public:
|
||||
ReadRegStringFunction(FilterEngine* engine);
|
||||
void Eval(mup::ptr_val_type& ret, const mup::ptr_val_type* arg, int argc) override;
|
||||
const mup::char_type* GetDesc() const;
|
||||
const mup::char_type* GetDesc() const override;
|
||||
mup::IToken* Clone() const override;
|
||||
|
||||
private:
|
||||
@@ -40,7 +40,7 @@ class ReadRegDWORDFunction : public mup::ICallback
|
||||
public:
|
||||
ReadRegDWORDFunction(FilterEngine* engine);
|
||||
void Eval(mup::ptr_val_type& ret, const mup::ptr_val_type* arg, int argc) override;
|
||||
const mup::char_type* GetDesc() const;
|
||||
const mup::char_type* GetDesc() const override;
|
||||
mup::IToken* Clone() const override;
|
||||
|
||||
private:
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
cd %~dp0
|
||||
for /r %%f in (*.cpp *.h) do (
|
||||
(Echo "%%f" | FIND /I "\build-" 1>NUL) || (Echo "%%f" | FIND /I "\resource.h" 1>NUL) || (Echo "%%f" | FIND /I "\libHybridConv-0.1.1\" 1>NUL) || (Echo "%%f" | FIND /I "\helpers\aeffectx.h" 1>NUL) || (Echo "%%f" | FIND /I "\helpers\UncaughtExceptions.h" 1>NUL) || (Echo "%%f" | FIND /I "\VoicemeeterClient\VoicemeeterRemote.h" 1>NUL) || (
|
||||
uncrustify -c uncrustify.cfg -l CPP --no-backup "%%f"
|
||||
uncrustify -c uncrustify.cfg -l CPP --replace --no-backup "%%f"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+19
@@ -1 +1,20 @@
|
||||
/*
|
||||
This file is part of Equalizer APO, a system-wide equalizer.
|
||||
Copyright (C) 2017 Jonas Thedering
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of Equalizer APO, a system-wide equalizer.
|
||||
Copyright (C) 2017 Jonas Thedering
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <climits>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# for Uncrustify 0.65
|
||||
tok_split_gte=false
|
||||
utf8_byte=false
|
||||
utf8_force=false
|
||||
@@ -168,6 +169,7 @@ sp_after_angle=remove
|
||||
sp_angle_paren=remove
|
||||
sp_angle_word=add
|
||||
sp_angle_shift=remove
|
||||
sp_permit_cpp11_shift=true
|
||||
sp_before_sparen=add
|
||||
sp_inside_sparen=remove
|
||||
sp_inside_sparen_close=remove
|
||||
|
||||
Reference in new issue
Block a user