Ardour  8.7-15-gadf511264b
demo_noise.h
Go to the documentation of this file.
1 #ifndef AUDIOGRAPHER_DEMO_NOISE_H
2 #define AUDIOGRAPHER_DEMO_NOISE_H
3 
5 #include "audiographer/sink.h"
6 #include "audiographer/types.h"
8 
9 namespace AudioGrapher
10 {
11 
14  : public ListedSource<float>
15  , public Sink<float>
16  , public Throwing<>
17 {
18 public:
20  DemoNoiseAdder (unsigned int channels);
22 
23  void init (samplecnt_t max_samples, samplecnt_t interval, samplecnt_t duration, float level);
24 
25  void process (ProcessContext<float> const& ctx);
27 
28 private:
29  float* _data_out;
31 
32  unsigned int _channels;
35  float _level;
37 
38  /* Park-Miller-Carta */
39  uint32_t randi ();
40  float randf () { return (randi () / 1073741824.f) - 1.f; }
41  uint32_t _rseed;
42 };
43 
44 } // namespace
45 
46 #endif
DemoNoiseAdder(unsigned int channels)
Constructor. RT safe.
void init(samplecnt_t max_samples, samplecnt_t interval, samplecnt_t duration, float level)
void process(ProcessContext< float > const &ctx)
An generic Source that uses a std::list for managing outputs.
Definition: listed_source.h:17
link region and track false waveform clip level