-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFMMod.h
More file actions
35 lines (25 loc) · 720 Bytes
/
FMMod.h
File metadata and controls
35 lines (25 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* FMMod.h - FM modulation class
*
* Copyright (C) 2019
* Mark Broihier
*
*/
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
class FMMod {
private:
float centerFrequency; // center frequency
float fd; // frequency deviation
float sampleRate; // samples per second
float * inputBuffer; // raw input
float * outputBuffer; // output buffer
float deltaT; // time delta of each sample
float TWO_PI;
int readSignalPipe();
int writeSignalPipe();
public:
FMMod(float sampleRate);
int modulate();
~FMMod(void);
};