Ardour
9.0-pre0-582-g084a23a80d
demo_noise.h
Go to the documentation of this file.
1
#ifndef AUDIOGRAPHER_DEMO_NOISE_H
2
#define AUDIOGRAPHER_DEMO_NOISE_H
3
4
#include "
audiographer/visibility.h
"
5
#include "
audiographer/sink.h
"
6
#include "
audiographer/types.h
"
7
#include "
audiographer/utils/listed_source.h
"
8
9
namespace
AudioGrapher
10
{
11
13
class
LIBAUDIOGRAPHER_API
DemoNoiseAdder
14
:
public
ListedSource
<float>
15
,
public
Sink
<float>
16
,
public
Throwing
<>
17
{
18
public
:
20
DemoNoiseAdder
(
unsigned
int
channels);
21
~DemoNoiseAdder
();
22
23
void
init
(
samplecnt_t
max_samples,
samplecnt_t
interval,
samplecnt_t
duration,
float
level
);
24
25
void
process
(
ProcessContext<float>
const
& ctx);
26
using
Sink<float>::process
;
27
28
private
:
29
float
*
_data_out
;
30
samplecnt_t
_data_out_size
;
31
32
unsigned
int
_channels
;
33
samplecnt_t
_interval
;
34
samplecnt_t
_duration
;
35
float
_level
;
36
samplecnt_t
_pos
;
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
types.h
visibility.h
LIBAUDIOGRAPHER_API
#define LIBAUDIOGRAPHER_API
Definition:
audiographer/audiographer/visibility.h:38
AudioGrapher::DemoNoiseAdder
Noise injector.
Definition:
demo_noise.h:17
AudioGrapher::DemoNoiseAdder::DemoNoiseAdder
DemoNoiseAdder(unsigned int channels)
Constructor. RT safe.
AudioGrapher::DemoNoiseAdder::_data_out
float * _data_out
Definition:
demo_noise.h:29
AudioGrapher::DemoNoiseAdder::_level
float _level
Definition:
demo_noise.h:35
AudioGrapher::DemoNoiseAdder::randf
float randf()
Definition:
demo_noise.h:40
AudioGrapher::DemoNoiseAdder::~DemoNoiseAdder
~DemoNoiseAdder()
AudioGrapher::DemoNoiseAdder::_rseed
uint32_t _rseed
Definition:
demo_noise.h:41
AudioGrapher::DemoNoiseAdder::randi
uint32_t randi()
AudioGrapher::DemoNoiseAdder::_channels
unsigned int _channels
Definition:
demo_noise.h:32
AudioGrapher::DemoNoiseAdder::init
void init(samplecnt_t max_samples, samplecnt_t interval, samplecnt_t duration, float level)
AudioGrapher::DemoNoiseAdder::_pos
samplecnt_t _pos
Definition:
demo_noise.h:36
AudioGrapher::DemoNoiseAdder::_interval
samplecnt_t _interval
Definition:
demo_noise.h:33
AudioGrapher::DemoNoiseAdder::_data_out_size
samplecnt_t _data_out_size
Definition:
demo_noise.h:30
AudioGrapher::DemoNoiseAdder::_duration
samplecnt_t _duration
Definition:
demo_noise.h:34
AudioGrapher::DemoNoiseAdder::process
void process(ProcessContext< float > const &ctx)
AudioGrapher::ListedSource
An generic Source that uses a std::list for managing outputs.
Definition:
listed_source.h:17
AudioGrapher::ProcessContext
Definition:
process_context.h:25
AudioGrapher::Sink
Definition:
sink.h:17
AudioGrapher::Throwing
Definition:
throwing.h:44
listed_source.h
AudioGrapher
Definition:
analysis_graph.h:33
AudioGrapher::samplecnt_t
int64_t samplecnt_t
Definition:
audiographer/audiographer/types.h:11
sink.h
level
link region and track false waveform clip level
Definition:
ui_config_vars.inc.h:109
libs
audiographer
audiographer
general
demo_noise.h
Generated on Thu Dec 26 2024 05:38:48 for Ardour by
1.9.1