Version 1.1.1
Fixed: With some sound card drivers, unwanted sounds were heard when audio got silent (e.g. by pausing). The modification of silent buffers, which seems to cause this issue, is now optionally available via the troubleshooting options in the Configurator. Fixed: In the Configuration Editor the peak gain display in the analysis panel was sometimes showing incorrect values. Improved: The GUI of the GraphicEQ command can now import the measurement text file format from Room EQ Wizard.
This commit is contained in:
1 parent
74359f5bee
commit
9d1d57b352
11 files changed
+85
-26
No files matched your search
@@ -57,6 +57,7 @@ void Configurator::onInitDialog(HWND hDlg)
|
||||
useOriginalAPOPreMix = GetDlgItem(hDlg, IDC_USE_ORIGINAL_APO_PRE_MIX);
|
||||
useOriginalAPOPostMix = GetDlgItem(hDlg, IDC_USE_ORIGINAL_APO_POST_MIX);
|
||||
installModeComboBox = GetDlgItem(hDlg, IDC_INSTALL_MODE_COMBOBOX);
|
||||
allowSilentBuffer = GetDlgItem(hDlg, IDC_ALLOW_SILENT_BUFFER);
|
||||
selectOneDeviceLabel = GetDlgItem(hDlg, IDC_SELECT_ONE_DEVICE);
|
||||
|
||||
expandTroubleShooting(false);
|
||||
@@ -121,6 +122,29 @@ void Configurator::onInitDialog(HWND hDlg)
|
||||
}
|
||||
ComboBox_SetCurSel(installModeComboBox, 0);
|
||||
|
||||
LoadStringW(hInstance, IDS_ALLOW_SILENT_BUFFER, stringBuf, sizeof(stringBuf) / sizeof(wchar_t));
|
||||
SetWindowTextW(allowSilentBuffer, stringBuf);
|
||||
|
||||
LoadStringW(hInstance, IDS_ALLOW_SILENT_BUFFER_TOOLTIP, stringBuf, sizeof(stringBuf) / sizeof(wchar_t));
|
||||
HWND tooltip = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL,
|
||||
WS_POPUP | TTS_ALWAYSTIP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hDlg, NULL,
|
||||
hInstance, NULL);
|
||||
|
||||
if (tooltip != NULL)
|
||||
{
|
||||
TOOLINFO toolInfo = {0};
|
||||
toolInfo.cbSize = sizeof(toolInfo);
|
||||
toolInfo.hwnd = hDlg;
|
||||
toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
|
||||
toolInfo.uId = (UINT_PTR)allowSilentBuffer;
|
||||
toolInfo.lpszText = stringBuf;
|
||||
SendMessage(tooltip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);
|
||||
SendMessage(tooltip, TTM_SETMAXTIPWIDTH, 0, 400);
|
||||
}
|
||||
|
||||
LoadStringW(hInstance, IDS_SELECT_ONE_DEVICE, stringBuf, sizeof(stringBuf) / sizeof(wchar_t));
|
||||
SetWindowTextW(selectOneDeviceLabel, stringBuf);
|
||||
|
||||
@@ -316,6 +340,7 @@ bool Configurator::onButtonClicked(unsigned sourceId)
|
||||
case IDC_USE_ORIGINAL_APO_PRE_MIX:
|
||||
case IDC_USE_ORIGINAL_APO_POST_MIX:
|
||||
case IDC_INSTALL_MODE_COMBOBOX:
|
||||
case IDC_ALLOW_SILENT_BUFFER:
|
||||
{
|
||||
int index = TabCtrl_GetCurSel(categoryTabCtrl);
|
||||
HWND deviceList = deviceLists[index];
|
||||
@@ -351,6 +376,9 @@ bool Configurator::onButtonClicked(unsigned sourceId)
|
||||
case IDC_INSTALL_MODE_COMBOBOX:
|
||||
info.selectedInstallState.installMode = (DeviceAPOInfo::InstallMode)ComboBox_GetCurSel(installModeComboBox);
|
||||
break;
|
||||
case IDC_ALLOW_SILENT_BUFFER:
|
||||
info.selectedInstallState.allowSilentBufferModification = Button_GetCheck(allowSilentBuffer) == BST_CHECKED;
|
||||
break;
|
||||
}
|
||||
|
||||
updateList(index, i);
|
||||
@@ -522,6 +550,7 @@ void Configurator::expandTroubleShooting(bool expand)
|
||||
ShowWindow(useOriginalAPOPreMix, showCmd);
|
||||
ShowWindow(useOriginalAPOPostMix, showCmd);
|
||||
ShowWindow(installModeComboBox, showCmd);
|
||||
ShowWindow(allowSilentBuffer, showCmd);
|
||||
showCmd = expand && IsWindowEnabled(selectOneDeviceLabel) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(selectOneDeviceLabel, showCmd);
|
||||
|
||||
@@ -644,6 +673,7 @@ void Configurator::updateButtons(int listIndex)
|
||||
EnableWindow(useOriginalAPOPreMix, enable && hasOriginalAPOPreMix && installState.installPreMix);
|
||||
EnableWindow(useOriginalAPOPostMix, enable && !isInput && hasOriginalAPOPostMix && installState.installPostMix);
|
||||
EnableWindow(installModeComboBox, enable);
|
||||
EnableWindow(allowSilentBuffer, enable);
|
||||
EnableWindow(selectOneDeviceLabel, !enable);
|
||||
|
||||
Button_SetCheck(installPreMix, installState.installPreMix);
|
||||
@@ -654,6 +684,8 @@ void Configurator::updateButtons(int listIndex)
|
||||
if (RegistryHelper::isWindowsVersionAtLeast(6, 3)) // Windows 8.1
|
||||
ComboBox_SetCurSel(installModeComboBox, installState.installMode);
|
||||
|
||||
Button_SetCheck(allowSilentBuffer, installState.allowSilentBufferModification);
|
||||
|
||||
expandTroubleShooting(Button_GetCheck(toggleTroubleShooting) != 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ private:
|
||||
HWND useOriginalAPOPreMix;
|
||||
HWND useOriginalAPOPostMix;
|
||||
HWND installModeComboBox;
|
||||
HWND allowSilentBuffer;
|
||||
HWND selectOneDeviceLabel;
|
||||
|
||||
std::wstring cmdLine;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -39,6 +39,7 @@ using namespace std;
|
||||
#define childApoPath APP_REGPATH L"\\Child APOs"
|
||||
static const wchar_t* preMixChildGuidValueName = L"PreMixChild";
|
||||
static const wchar_t* postMixChildGuidValueName = L"PostMixChild";
|
||||
static const wchar_t* allowSilentBufferValueName = L"AllowSilentBufferModification";
|
||||
static const wchar_t* versionValueName = L"Version";
|
||||
static const wchar_t* connectionValueName = L"{a45c254e-df1c-4efd-8020-67d146a850e0},2";
|
||||
static const wchar_t* deviceValueName = L"{b3f8fa53-0004-438e-9003-51a46e139bfc},6";
|
||||
@@ -229,6 +230,7 @@ bool DeviceAPOInfo::load(const wstring& deviceGuid, wstring defaultDeviceGuid)
|
||||
currentInstallState.installPostMix = !isInput;
|
||||
currentInstallState.useOriginalAPOPreMix = true;
|
||||
currentInstallState.useOriginalAPOPostMix = !isInput;
|
||||
currentInstallState.allowSilentBufferModification = false;
|
||||
|
||||
if (!RegistryHelper::keyExists(keyPath + L"\\FxProperties"))
|
||||
{
|
||||
@@ -311,6 +313,9 @@ bool DeviceAPOInfo::load(const wstring& deviceGuid, wstring defaultDeviceGuid)
|
||||
currentInstallState.installMode = INSTALL_SFX_EFX;
|
||||
else if (foundAt[SFX_INDEX] || foundAt[MFX_INDEX])
|
||||
currentInstallState.installMode = INSTALL_SFX_MFX;
|
||||
|
||||
if (RegistryHelper::valueExists(childApoPath L"\\" + deviceGuid, allowSilentBufferValueName))
|
||||
currentInstallState.allowSilentBufferModification = RegistryHelper::readValue(childApoPath L"\\" + deviceGuid, allowSilentBufferValueName) != L"false";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -490,6 +495,7 @@ void DeviceAPOInfo::install()
|
||||
RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, preMixChildGuidValueName, preMixValue);
|
||||
RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, postMixChildGuidValueName, postMixValue);
|
||||
|
||||
RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, allowSilentBufferValueName, selectedInstallState.allowSilentBufferModification ? L"true" : L"false");
|
||||
RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, versionValueName, installVersion);
|
||||
|
||||
if (selectedInstallState.installMode == INSTALL_LFX_GFX)
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
bool useOriginalAPOPreMix;
|
||||
bool useOriginalAPOPostMix;
|
||||
InstallMode installMode;
|
||||
bool allowSilentBufferModification;
|
||||
|
||||
InstallState()
|
||||
{
|
||||
@@ -51,6 +52,7 @@ public:
|
||||
useOriginalAPOPreMix = false;
|
||||
useOriginalAPOPostMix = false;
|
||||
installMode = INSTALL_LFX_GFX;
|
||||
allowSilentBufferModification = false;
|
||||
}
|
||||
|
||||
bool operator!=(InstallState& other)
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
AnalysisThread::AnalysisThread()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
AnalysisThread::~AnalysisThread()
|
||||
@@ -245,7 +244,7 @@ void AnalysisThread::run()
|
||||
|
||||
double peakGain = -DBL_MAX;
|
||||
|
||||
for (int i = 0; i < frameCount; i++)
|
||||
for (int i = 0; i < frameCount / 2; i++)
|
||||
{
|
||||
float sqrGain = freqData[i][0] * freqData[i][0] + freqData[i][1] * freqData[i][1];
|
||||
if (sqrGain > peakGain)
|
||||
|
||||
@@ -308,23 +308,29 @@ void GraphicEQFilterGUI::on_actionImport_triggered()
|
||||
if (file.open(QFile::ReadOnly))
|
||||
{
|
||||
QTextStream stream(&file);
|
||||
QString text = stream.readAll();
|
||||
if (!text.contains('.'))
|
||||
text = text.replace(',', '.');
|
||||
QRegularExpressionMatchIterator it = numberRegEx.globalMatch(text);
|
||||
while (it.hasNext())
|
||||
while (!stream.atEnd())
|
||||
{
|
||||
QRegularExpressionMatch match = it.next();
|
||||
QString freqString = match.captured();
|
||||
bool ok;
|
||||
double freq = freqString.toDouble(&ok);
|
||||
if (ok && it.hasNext())
|
||||
QString text = stream.readLine();
|
||||
if (text.startsWith('*'))
|
||||
continue;
|
||||
|
||||
if (!text.contains('.'))
|
||||
text = text.replace(',', '.');
|
||||
QRegularExpressionMatchIterator it = numberRegEx.globalMatch(text);
|
||||
while (it.hasNext())
|
||||
{
|
||||
match = it.next();
|
||||
QString gainString = match.captured();
|
||||
double gain = gainString.toDouble(&ok);
|
||||
if (ok)
|
||||
newNodes.push_back(FilterNode(freq, gain));
|
||||
QRegularExpressionMatch match = it.next();
|
||||
QString freqString = match.captured();
|
||||
bool ok;
|
||||
double freq = freqString.toDouble(&ok);
|
||||
if (ok && it.hasNext())
|
||||
{
|
||||
match = it.next();
|
||||
QString gainString = match.captured();
|
||||
double gain = gainString.toDouble(&ok);
|
||||
if (ok)
|
||||
newNodes.push_back(FilterNode(freq, gain));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-8
@@ -47,6 +47,8 @@ EqualizerAPO::EqualizerAPO(IUnknown* pUnkOuter)
|
||||
else
|
||||
this->pUnkOuter = reinterpret_cast<IUnknown*>(static_cast<INonDelegatingUnknown*>(this));
|
||||
|
||||
allowSilentBufferModification = false;
|
||||
|
||||
childAPO = NULL;
|
||||
childRT = NULL;
|
||||
childCfg = NULL;
|
||||
@@ -142,6 +144,8 @@ HRESULT EqualizerAPO::Initialize(UINT32 cbDataSize, BYTE* pbyData)
|
||||
childApoGuid = apoInfo.preMixChildGuid;
|
||||
else
|
||||
childApoGuid = apoInfo.postMixChildGuid;
|
||||
|
||||
allowSilentBufferModification = apoInfo.currentInstallState.allowSilentBufferModification;
|
||||
}
|
||||
}
|
||||
catch (RegistryException e)
|
||||
@@ -425,18 +429,26 @@ void EqualizerAPO::APOProcess(UINT32 u32NumInputConnections,
|
||||
|
||||
if (ppInputConnections[0]->u32BufferFlags == BUFFER_SILENT)
|
||||
{
|
||||
unsigned outputFrameCount = ppOutputConnections[0]->u32ValidFrameCount * engine.getOutputChannelCount();
|
||||
boolean silent = true;
|
||||
for (unsigned i = 0; i < outputFrameCount; i++)
|
||||
if (allowSilentBufferModification)
|
||||
{
|
||||
if (outputFrames[i] != 0.0)
|
||||
unsigned outputFrameCount = ppOutputConnections[0]->u32ValidFrameCount * engine.getOutputChannelCount();
|
||||
boolean silent = true;
|
||||
for (unsigned i = 0; i < outputFrameCount; i++)
|
||||
{
|
||||
silent = false;
|
||||
break;
|
||||
if (abs(outputFrames[i]) > 1e-10)
|
||||
{
|
||||
silent = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// BUFFER_SILENT seems to be important for some sound card drivers, so only use BUFFER_VALID if there really is audio
|
||||
ppOutputConnections[0]->u32BufferFlags = silent ? BUFFER_SILENT : BUFFER_VALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(outputFrames, 0, ppOutputConnections[0]->u32ValidFrameCount * engine.getOutputChannelCount() * sizeof(float));
|
||||
ppOutputConnections[0]->u32BufferFlags = BUFFER_SILENT;
|
||||
}
|
||||
// BUFFER_SILENT seems to be important for some sound card drivers, so only use BUFFER_VALID if there really is audio
|
||||
ppOutputConnections[0]->u32BufferFlags = silent ? BUFFER_SILENT : BUFFER_VALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -72,6 +72,7 @@ private:
|
||||
long refCount;
|
||||
IUnknown* pUnkOuter;
|
||||
FilterEngine engine;
|
||||
bool allowSilentBufferModification;
|
||||
|
||||
void resetChild();
|
||||
|
||||
|
||||
Reference in new issue
Block a user