Audacity  3.0.3
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 
15 template< typename Enum > class EnumSetting;
16 
17 
19 enum DitherType : unsigned {
20  none = 0, rectangle = 1, triangle = 2, shaped = 3 };
21 
22 class MATH_API Dither
23 {
24 public:
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__ */
Dither
This class implements various functions for dithering and is derived from the dither code in the Ardo...
Definition: Dither.h:23
Dither::BestSetting
static EnumSetting< DitherType > BestSetting
Definition: Dither.h:29
shaped
@ shaped
Definition: Dither.h:20
constSamplePtr
const char * constSamplePtr
Definition: SampleFormat.h:50
none
@ none
Definition: Dither.h:20
rectangle
@ rectangle
Definition: Dither.h:20
sampleFormat
sampleFormat
Definition: SampleFormat.h:29
samplePtr
char * samplePtr
Definition: SampleFormat.h:49
DitherType
DitherType
These ditherers are currently available:
Definition: Dither.h:19
EnumSetting
Adapts EnumSettingBase to a particular enumeration type.
Definition: Prefs.h:351
SampleFormat.h
Dither::FastSetting
static EnumSetting< DitherType > FastSetting
Definition: Dither.h:28
triangle
@ triangle
Definition: Dither.h:20