Async  1.5.0
AsyncAudioNoiseAdder.h
Go to the documentation of this file.
1 
28 #ifndef ASYNC_AUDIO_NOISE_ADDER
29 #define ASYNC_AUDIO_NOISE_ADDER
30 
31 
32 /****************************************************************************
33  *
34  * System Includes
35  *
36  ****************************************************************************/
37 
38 #include <string>
39 
40 
41 /****************************************************************************
42  *
43  * Project Includes
44  *
45  ****************************************************************************/
46 
47 
48 
49 /****************************************************************************
50  *
51  * Local Includes
52  *
53  ****************************************************************************/
54 
55 #include <AsyncAudioProcessor.h>
56 
57 
58 
59 /****************************************************************************
60  *
61  * Forward declarations
62  *
63  ****************************************************************************/
64 
65 
66 
67 /****************************************************************************
68  *
69  * Namespace
70  *
71  ****************************************************************************/
72 
73 namespace Async
74 {
75 
76 
77 /****************************************************************************
78  *
79  * Forward declarations of classes inside of the declared namespace
80  *
81  ****************************************************************************/
82 
83 
84 
85 /****************************************************************************
86  *
87  * Defines & typedefs
88  *
89  ****************************************************************************/
90 
91 
92 
93 /****************************************************************************
94  *
95  * Exported Global Variables
96  *
97  ****************************************************************************/
98 
99 
100 
101 /****************************************************************************
102  *
103  * Class definitions
104  *
105  ****************************************************************************/
106 
122 {
123  public:
135  AudioNoiseAdder(float level_db);
136 
140  ~AudioNoiseAdder(void);
141 
142  protected:
154  void processSamples(float *dest, const float *src, int count);
155 
156  private:
157  float sigma; // Standard deviation of the generated noise
158  float z1;
159  bool generate;
160  unsigned int seed;
161 
163  AudioNoiseAdder& operator=(const AudioNoiseAdder&);
164  float generateGaussianNoise(void);
165 
166 }; /* class AudioNoiseAdder */
167 
168 
169 } /* namespace */
170 
171 #endif /* ASYNC_AUDIO_NOISE_ADDER */
172 
173 
174 /*
175  * This file has not been truncated
176  */
The base class for an audio processor.
void processSamples(float *dest, const float *src, int count)
Process incoming samples and put them into the output buffer.
A class to add gaussian white noise to an audio stream.
AudioNoiseAdder(float level_db)
Constuctor.
Namespace for the asynchronous programming classes.
The base class for an audio processor class.
~AudioNoiseAdder(void)
Destructor.