Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/sanear.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Marsev <alex.marsev@gmail.com>2015-08-02 21:29:57 +0300
committerAlex Marsev <alex.marsev@gmail.com>2015-08-02 21:29:57 +0300
commit83e03be00c356baf1a9a50cc55fd2be113903039 (patch)
tree3f6d259abf88df00f0640a2757e731147ab8068e
parentd71020022e340d17420528272e89cf531a45a4b8 (diff)
parent662a7e29a59d7cc0a82f59a1544ea8cbe38bbf64 (diff)
Merge master
-rw-r--r--changelog.txt6
-rw-r--r--dll/base.props3
-rw-r--r--dll/platform.props9
-rw-r--r--dll/sanear-platform.props4
-rw-r--r--dll/src/baseclasses.vcxproj3
-rw-r--r--dll/src/bs2b.vcxproj3
-rw-r--r--dll/src/sanear-dll.vcxproj7
-rw-r--r--dll/src/sanear-dll.vcxproj.filters74
-rw-r--r--dll/src/sanear-dll/Entry.cpp2
-rw-r--r--dll/src/sanear-dll/TrayWindow.cpp2
-rw-r--r--dll/src/sanear-dll/sanear.rc10
-rw-r--r--dll/src/soundtouch.vcxproj3
-rw-r--r--dll/src/soxr.vcxproj3
-rw-r--r--dll/src/zita-resampler.vcxproj3
-rw-r--r--sanear.vcxproj27
-rw-r--r--sanear.vcxproj.filters5
-rwxr-xr-x[-rw-r--r--]src/DspDither.cpp23
-rwxr-xr-x[-rw-r--r--]src/DspDither.h6
-rw-r--r--src/DspLimiter.cpp2
19 files changed, 153 insertions, 42 deletions
diff --git a/changelog.txt b/changelog.txt
index 88048b4..4847bdc 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,6 +1,10 @@
-sanear, a robust DirectShow audio renderer
+Sanear, a robust DirectShow audio renderer
==========================================
+v0.2 - 2015/08/02
+* Bugfixing release
+* Fixes audible noise in dithering
+
v0.1 - 2015/07/22
* Initial release
* Outputs sound through WASAPI (shared or exclusive)
diff --git a/dll/base.props b/dll/base.props
index 53e1624..334f96e 100644
--- a/dll/base.props
+++ b/dll/base.props
@@ -5,9 +5,6 @@
<BinDir>$(SolutionDir)bin\$(Configuration)$(PlatformArchitecture)\</BinDir>
<IntDir>$(SolutionDir)bin\$(Configuration)$(PlatformArchitecture)\obj\$(ProjectName)\</IntDir>
</PropertyGroup>
- <PropertyGroup Label="Configuration">
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
diff --git a/dll/platform.props b/dll/platform.props
new file mode 100644
index 0000000..08291b8
--- /dev/null
+++ b/dll/platform.props
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="Configuration" Condition="'$(VisualStudioVersion)' == '14.0'">
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(VisualStudioVersion)' == '12.0'">
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+</Project>
diff --git a/dll/sanear-platform.props b/dll/sanear-platform.props
new file mode 100644
index 0000000..d661c12
--- /dev/null
+++ b/dll/sanear-platform.props
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)platform.props" />
+</Project>
diff --git a/dll/src/baseclasses.vcxproj b/dll/src/baseclasses.vcxproj
index b494cb6..b9228a8 100644
--- a/dll/src/baseclasses.vcxproj
+++ b/dll/src/baseclasses.vcxproj
@@ -22,7 +22,7 @@
<ProjectGuid>{B8375339-1932-4CC0-AE5B-257672078E41}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\base.props" />
+ <Import Project="..\platform.props" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Import Project="..\base.props" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
diff --git a/dll/src/bs2b.vcxproj b/dll/src/bs2b.vcxproj
index 283dc11..7644af6 100644
--- a/dll/src/bs2b.vcxproj
+++ b/dll/src/bs2b.vcxproj
@@ -22,7 +22,7 @@
<ProjectGuid>{C59B751C-F10D-4DE0-B580-73CB03B27B6E}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\base.props" />
+ <Import Project="..\platform.props" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Import Project="..\base.props" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
diff --git a/dll/src/sanear-dll.vcxproj b/dll/src/sanear-dll.vcxproj
index 3e24a91..12a15ca 100644
--- a/dll/src/sanear-dll.vcxproj
+++ b/dll/src/sanear-dll.vcxproj
@@ -22,7 +22,7 @@
<ProjectGuid>{E02FD084-ED17-46C7-B5A6-F0BBB7966BBB}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\base.props" />
+ <Import Project="..\platform.props" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Import Project="..\base.props" />
<PropertyGroup>
<OutDir>$(BinDir)</OutDir>
<TargetExt>.ax</TargetExt>
@@ -144,6 +145,10 @@
<ClInclude Include="sanear-dll\TrayWindow.h" />
</ItemGroup>
<ItemGroup>
+ <None Include="..\base.props" />
+ <None Include="..\platform.props" />
+ <None Include="..\sanear-platform.props" />
+ <None Include="..\sanear.props" />
<None Include="sanear-dll\sanear.def" />
</ItemGroup>
<ItemGroup>
diff --git a/dll/src/sanear-dll.vcxproj.filters b/dll/src/sanear-dll.vcxproj.filters
new file mode 100644
index 0000000..5f36429
--- /dev/null
+++ b/dll/src/sanear-dll.vcxproj.filters
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="sanear-dll\Entry.cpp" />
+ <ClCompile Include="sanear-dll\pch.cpp">
+ <Filter>Common</Filter>
+ </ClCompile>
+ <ClCompile Include="sanear-dll\OuterFilter.cpp">
+ <Filter>Filter</Filter>
+ </ClCompile>
+ <ClCompile Include="sanear-dll\RegistryKey.cpp">
+ <Filter>Filter</Filter>
+ </ClCompile>
+ <ClCompile Include="sanear-dll\TrayWindow.cpp">
+ <Filter>Filter</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="sanear-dll\resource.h">
+ <Filter>Resources</Filter>
+ </ClInclude>
+ <ClInclude Include="sanear-dll\pch.h">
+ <Filter>Common</Filter>
+ </ClInclude>
+ <ClInclude Include="sanear-dll\OuterFilter.h">
+ <Filter>Filter</Filter>
+ </ClInclude>
+ <ClInclude Include="sanear-dll\RegistryKey.h">
+ <Filter>Filter</Filter>
+ </ClInclude>
+ <ClInclude Include="sanear-dll\TrayWindow.h">
+ <Filter>Filter</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="Resources">
+ <UniqueIdentifier>{c31c72e9-891d-4f49-8964-60ac80d2db08}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Common">
+ <UniqueIdentifier>{57b1ee7d-f0ca-499f-b0fd-57fe76f3012d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Filter">
+ <UniqueIdentifier>{8215adc6-5660-48db-98c3-2627cc6f8b77}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Props">
+ <UniqueIdentifier>{575443ed-3498-4000-aec4-9cfc20cb4a2f}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\base.props">
+ <Filter>Props</Filter>
+ </None>
+ <None Include="..\platform.props">
+ <Filter>Props</Filter>
+ </None>
+ <None Include="..\sanear.props">
+ <Filter>Props</Filter>
+ </None>
+ <None Include="..\sanear-platform.props">
+ <Filter>Props</Filter>
+ </None>
+ <None Include="sanear-dll\sanear.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="sanear-dll\sanear.ico">
+ <Filter>Resources</Filter>
+ </Image>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="sanear-dll\sanear.rc">
+ <Filter>Resources</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/dll/src/sanear-dll/Entry.cpp b/dll/src/sanear-dll/Entry.cpp
index 84850cf..9cabd03 100644
--- a/dll/src/sanear-dll/Entry.cpp
+++ b/dll/src/sanear-dll/Entry.cpp
@@ -7,7 +7,7 @@ namespace
// {DF557071-C9FD-433A-9627-81E0D3640ED9}
const GUID filterGuid = {0xdf557071, 0xc9fd, 0x433a, {0x96, 0x27, 0x81, 0xe0, 0xd3, 0x64, 0xe, 0xd9}};
- const WCHAR filterName[] = L"sanear";
+ const WCHAR filterName[] = L"Sanear Audio Renderer";
const AMOVIESETUP_MEDIATYPE pinTypes[] = {
{&MEDIATYPE_Audio, &CLSID_NULL},
diff --git a/dll/src/sanear-dll/TrayWindow.cpp b/dll/src/sanear-dll/TrayWindow.cpp
index 5f805d4..12f05a4 100644
--- a/dll/src/sanear-dll/TrayWindow.cpp
+++ b/dll/src/sanear-dll/TrayWindow.cpp
@@ -170,7 +170,7 @@ namespace SaneAudioRenderer
m_nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_SHOWTIP;
LoadIconMetric(g_hInst, MAKEINTRESOURCE(IDI_ICON1), LIM_SMALL, &m_nid.hIcon);
m_nid.uCallbackMessage = WM_TRAYNOTIFY;
- lstrcpy(m_nid.szTip, L"sanear");
+ lstrcpy(m_nid.szTip, L"Sanear Audio Renderer");
Shell_NotifyIcon(NIM_ADD, &m_nid);
Shell_NotifyIcon(NIM_SETVERSION, &m_nid);
diff --git a/dll/src/sanear-dll/sanear.rc b/dll/src/sanear-dll/sanear.rc
index 6d2fd44..fa267f1 100644
--- a/dll/src/sanear-dll/sanear.rc
+++ b/dll/src/sanear-dll/sanear.rc
@@ -60,8 +60,8 @@ IDI_ICON1 ICON "sanear.ico"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,1,0,0
- PRODUCTVERSION 0,1,0,0
+ FILEVERSION 0,2,0,0
+ PRODUCTVERSION 0,2,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -77,9 +77,9 @@ BEGIN
BLOCK "080904b0"
BEGIN
VALUE "FileDescription", "Robust DirectShow audio renderer"
- VALUE "FileVersion", "0.1.0.0"
- VALUE "ProductName", "sanear"
- VALUE "ProductVersion", "0.1.0.0"
+ VALUE "FileVersion", "0.2.0.0"
+ VALUE "ProductName", "Sanear Audio Renderer"
+ VALUE "ProductVersion", "0.2.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/dll/src/soundtouch.vcxproj b/dll/src/soundtouch.vcxproj
index 28c20f4..2378af6 100644
--- a/dll/src/soundtouch.vcxproj
+++ b/dll/src/soundtouch.vcxproj
@@ -22,7 +22,7 @@
<ProjectGuid>{3C1B816A-645C-4E1F-A006-5C47263E59C5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\base.props" />
+ <Import Project="..\platform.props" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Import Project="..\base.props" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
diff --git a/dll/src/soxr.vcxproj b/dll/src/soxr.vcxproj
index ffc1c94..7cfe9c1 100644
--- a/dll/src/soxr.vcxproj
+++ b/dll/src/soxr.vcxproj
@@ -22,7 +22,7 @@
<ProjectGuid>{2D2A92FF-1FB6-4926-AFFB-5E00D27939FC}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\base.props" />
+ <Import Project="..\platform.props" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Import Project="..\base.props" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
diff --git a/dll/src/zita-resampler.vcxproj b/dll/src/zita-resampler.vcxproj
index 9cf66ca..cabd048 100644
--- a/dll/src/zita-resampler.vcxproj
+++ b/dll/src/zita-resampler.vcxproj
@@ -22,7 +22,7 @@
<ProjectGuid>{34DC7A3D-B219-4F42-A1E5-8DBB22DEC08C}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\base.props" />
+ <Import Project="..\platform.props" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Import Project="..\base.props" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
diff --git a/sanear.vcxproj b/sanear.vcxproj
index 0da5290..eb6d000 100644
--- a/sanear.vcxproj
+++ b/sanear.vcxproj
@@ -23,19 +23,19 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Choose>
- <When Condition="'$(SanearPropsPath)' != ''" />
- <When Condition="'$(SolutionDir)' != '' And Exists('$(SolutionDir)sanear.props')">
+ <When Condition="'$(SanearPlatformPropsPath)' != ''" />
+ <When Condition="'$(SolutionDir)' != '' And Exists('$(SolutionDir)sanear-platform.props')">
<PropertyGroup>
- <SanearPropsPath>$(SolutionDir)sanear.props</SanearPropsPath>
+ <SanearPlatformPropsPath>$(SolutionDir)sanear-platform.props</SanearPlatformPropsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
- <SanearPropsPath>..\sanear.props</SanearPropsPath>
+ <SanearPlatformPropsPath>..\sanear-platform.props</SanearPlatformPropsPath>
</PropertyGroup>
</Otherwise>
</Choose>
- <Import Project="$(SanearPropsPath)" />
+ <Import Project="$(SanearPlatformPropsPath)" />
<PropertyGroup Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -53,6 +53,20 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <Choose>
+ <When Condition="'$(SanearPropsPath)' != ''" />
+ <When Condition="'$(SolutionDir)' != '' And Exists('$(SolutionDir)sanear.props')">
+ <PropertyGroup>
+ <SanearPropsPath>$(SolutionDir)sanear.props</SanearPropsPath>
+ </PropertyGroup>
+ </When>
+ <Otherwise>
+ <PropertyGroup>
+ <SanearPropsPath>..\sanear.props</SanearPropsPath>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+ <Import Project="$(SanearPropsPath)" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -139,9 +153,6 @@
<ClCompile Include="src\Settings.cpp" />
<ClCompile Include="src\SampleCorrection.cpp" />
</ItemGroup>
- <ItemGroup>
- <None Include="..\sanear.props" />
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/sanear.vcxproj.filters b/sanear.vcxproj.filters
index 697961b..aa707a8 100644
--- a/sanear.vcxproj.filters
+++ b/sanear.vcxproj.filters
@@ -165,9 +165,4 @@
<UniqueIdentifier>{a3828985-2937-4570-8aa1-110935fd6227}</UniqueIdentifier>
</Filter>
</ItemGroup>
- <ItemGroup>
- <None Include="..\sanear.props">
- <Filter>Common</Filter>
- </None>
- </ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/DspDither.cpp b/src/DspDither.cpp
index c0c91a5..c8682b0 100644..100755
--- a/src/DspDither.cpp
+++ b/src/DspDither.cpp
@@ -6,8 +6,13 @@ namespace SaneAudioRenderer
void DspDither::Initialize(DspFormat outputFormat)
{
m_active = (outputFormat == DspFormat::Pcm16);
- m_error1 = {};
- m_error2 = {};
+
+ for (size_t i = 0; i < 18; i++)
+ {
+ m_previous[i] = 0.0f;
+ m_generator[i].seed((uint32_t)(GetPerformanceCounter() + i));
+ m_distributor[i] = std::uniform_real_distribution<float>(0, 1.0f);
+ }
}
bool DspDither::Active()
@@ -32,12 +37,14 @@ namespace SaneAudioRenderer
{
for (size_t channel = 0; channel < channels; channel++)
{
- // Rectangular dither with simple second-order noise shaping.
- float inputSample = inputData[frame * channels + channel] * (INT16_MAX - 4);
- float noise = (float)m_rand() / m_rand.max() + 0.5f * m_error1[channel] - m_error2[channel];
- float outputSample = round(inputSample + noise);
- m_error2[channel] = m_error1[channel];
- m_error1[channel] = outputSample - inputSample;
+ float inputSample = inputData[frame * channels + channel] * (INT16_MAX - 1);
+
+ // High-pass TPDF, 2 LSB amplitude.
+ float r = m_distributor[channel](m_generator[channel]);
+ float noise = r - m_previous[channel];
+ m_previous[channel] = r;
+
+ float outputSample = std::round(inputSample + noise);
assert(outputSample >= INT16_MIN && outputSample <= INT16_MAX);
outputData[frame * channels + channel] = (int16_t)outputSample;
}
diff --git a/src/DspDither.h b/src/DspDither.h
index b41c37e..6fe5422 100644..100755
--- a/src/DspDither.h
+++ b/src/DspDither.h
@@ -25,8 +25,8 @@ namespace SaneAudioRenderer
private:
bool m_active = false;
- std::array<float, 18> m_error1;
- std::array<float, 18> m_error2;
- std::minstd_rand m_rand;
+ std::array<float, 18> m_previous;
+ std::array<std::minstd_rand, 18> m_generator;
+ std::array<std::uniform_real_distribution<float>, 18> m_distributor;
};
}
diff --git a/src/DspLimiter.cpp b/src/DspLimiter.cpp
index a4a8056..0868149 100644
--- a/src/DspLimiter.cpp
+++ b/src/DspLimiter.cpp
@@ -90,7 +90,7 @@ namespace SaneAudioRenderer
NewTreshold(peak);
}
- m_holdWindow = m_rate * m_channels * 10; // 10 seconds
+ m_holdWindow = (int64_t)m_rate * m_channels * 10; // 10 seconds
}
// Apply limiter