1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01: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

@@ -45,18 +45,18 @@
#include "Dither.h"
#include "Internat.h"
static Dither::DitherType gLowQualityDither = Dither::none;
static Dither::DitherType gHighQualityDither = Dither::none;
static DitherType gLowQualityDither = DitherType::none;
static DitherType gHighQualityDither = DitherType::none;
static Dither gDitherAlgorithm;
void InitDitherers()
{
// Read dither preferences
gLowQualityDither = (Dither::DitherType)
gPrefs->Read(wxT("/Quality/DitherAlgorithm"), (long)Dither::none);
gLowQualityDither = (DitherType)
gPrefs->Read(wxT("/Quality/DitherAlgorithm"), (long)DitherType::none);
gHighQualityDither = (Dither::DitherType)
gPrefs->Read(wxT("/Quality/HQDitherAlgorithm"), (long)Dither::shaped);
gHighQualityDither = (DitherType)
gPrefs->Read(wxT("/Quality/HQDitherAlgorithm"), (long)DitherType::shaped);
}
const wxChar *GetSampleFormatStr(sampleFormat format)
@@ -120,6 +120,6 @@ void CopySamplesNoDither(samplePtr src, sampleFormat srcFormat,
unsigned int dstStride /* = 1 */)
{
gDitherAlgorithm.Apply(
Dither::none,
DitherType::none,
src, srcFormat, dst, dstFormat, len, srcStride, dstStride);
}