1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Make enum class for dither type

This commit is contained in:
Paul Licameli
2018-03-24 22:30:56 -04:00
parent bccf8f92cd
commit a3d12e1658
5 changed files with 22 additions and 20 deletions

View File

@@ -98,10 +98,10 @@ void QualityPrefs::Populate()
void QualityPrefs::GetNamesAndLabels()
{
//------------ Dither Names
mDitherNames.Add(_("None")); mDitherLabels.push_back(Dither::none);
mDitherNames.Add(_("Rectangle")); mDitherLabels.push_back(Dither::rectangle);
mDitherNames.Add(_("Triangle")); mDitherLabels.push_back(Dither::triangle);
mDitherNames.Add(_("Shaped")); mDitherLabels.push_back(Dither::shaped);
mDitherNames.Add(_("None")); mDitherLabels.push_back((int) DitherType::none);
mDitherNames.Add(_("Rectangle")); mDitherLabels.push_back((int) DitherType::rectangle);
mDitherNames.Add(_("Triangle")); mDitherLabels.push_back((int) DitherType::triangle);
mDitherNames.Add(_("Shaped")); mDitherLabels.push_back((int) DitherType::shaped);
//------------ Sample Rate Names
// JKC: I don't understand the following comment.
@@ -179,7 +179,7 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
/* i18n-hint: technical term for randomization to reduce undesirable resampling artifacts */
S.TieChoice(_("&Dither:"),
wxT("/Quality/DitherAlgorithm"),
Dither::none,
(int) DitherType::none,
mDitherNames,
mDitherLabels);
}
@@ -197,7 +197,7 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
/* i18n-hint: technical term for randomization to reduce undesirable resampling artifacts */
S.TieChoice(_("Dit&her:"),
wxT("/Quality/HQDitherAlgorithm"),
Dither::shaped,
(int) DitherType::shaped,
mDitherNames,
mDitherLabels);
}

View File

@@ -23,6 +23,7 @@
class ShuttleGui;
enum sampleFormat : unsigned;
enum class DitherType : unsigned;
class QualityPrefs final : public PrefsPanel
{