1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

EnumSetting has a template parameter

This commit is contained in:
Paul Licameli
2019-04-03 09:17:16 -04:00
parent 85b06fe6d0
commit 0d910bbe02
8 changed files with 79 additions and 37 deletions

View File

@@ -63,7 +63,7 @@ static auto intChoicesMethod = {
0, 1, 2, 3
};
EnumSetting Resample::FastMethodSetting{
EnumSetting< int > Resample::FastMethodSetting{
wxT("/Quality/LibsoxrSampleRateConverterChoice"),
methodNames,
1, // Medium Quality
@@ -73,7 +73,7 @@ EnumSetting Resample::FastMethodSetting{
wxT("/Quality/LibsoxrSampleRateConverter")
};
EnumSetting Resample::BestMethodSetting
EnumSetting< int > Resample::BestMethodSetting
{
wxT("/Quality/LibsoxrHQSampleRateConverterChoice"),
methodNames,
@@ -115,7 +115,7 @@ std::pair<size_t, size_t>
void Resample::SetMethod(const bool useBestMethod)
{
if (useBestMethod)
mMethod = BestMethodSetting.ReadInt();
mMethod = BestMethodSetting.ReadEnum();
else
mMethod = FastMethodSetting.ReadInt();
mMethod = FastMethodSetting.ReadEnum();
}