Audacity 3.2.0
Dither.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Steve Harris
6 Markus Meyer
7
8**********************************************************************/
9
10#ifndef __AUDACITY_DITHER_H__
11#define __AUDACITY_DITHER_H__
12
13#include "SampleFormat.h"
14
15template< typename Enum > class EnumSetting;
16
17
19enum DitherType : unsigned {
20 none = 0, rectangle = 1, triangle = 2, shaped = 3 };
21
22class MATH_API Dither
23{
24public:
25 static DitherType FastDitherChoice();
26 static DitherType BestDitherChoice();
27
30
32 Dither();
33
35 void Reset();
36
41 void Apply(DitherType ditherType,
42 constSamplePtr source, sampleFormat sourceFormat,
43 samplePtr dest, sampleFormat destFormat,
44 unsigned int len,
45 unsigned int sourceStride = 1,
46 unsigned int destStride = 1);
47};
48
49#endif /* __AUDACITY_DITHER_H__ */
DitherType
These ditherers are currently available:
Definition: Dither.h:19
@ rectangle
Definition: Dither.h:20
@ shaped
Definition: Dither.h:20
@ triangle
Definition: Dither.h:20
@ none
Definition: Dither.h:20
sampleFormat
Definition: SampleFormat.h:29
char * samplePtr
Definition: SampleFormat.h:49
const char * constSamplePtr
Definition: SampleFormat.h:50
This class implements various functions for dithering and is derived from the dither code in the Ardo...
Definition: Dither.h:23
static EnumSetting< DitherType > BestSetting
Definition: Dither.h:29
static EnumSetting< DitherType > FastSetting
Definition: Dither.h:28
Adapts EnumSettingBase to a particular enumeration type.
Definition: Prefs.h:507