diff options
Diffstat (limited to 'src/lib/smpte.h')
-rw-r--r-- | src/lib/smpte.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/lib/smpte.h b/src/lib/smpte.h new file mode 100644 index 0000000..fdaef3a --- /dev/null +++ b/src/lib/smpte.h | |||
@@ -0,0 +1,41 @@ | |||
1 | #ifndef __smpte_h__ | ||
2 | #define __smpte_h__ | ||
3 | |||
4 | using namespace std; | ||
5 | #include "config.h" | ||
6 | #include <string> | ||
7 | #include <iostream> | ||
8 | |||
9 | class SMPTEgenerator | ||
10 | { | ||
11 | private: | ||
12 | |||
13 | short* smpteword; | ||
14 | int prevbitnum; | ||
15 | int prevhalfbit; | ||
16 | int prevoutval; | ||
17 | int framerate; | ||
18 | int nondrop; | ||
19 | int haveframe; // indicates if a new frame word must be generated | ||
20 | int samplerate; | ||
21 | |||
22 | /* These are pre-calculated: */ | ||
23 | int bitsperframe; | ||
24 | int bitspersecond; | ||
25 | int samplesperbit; | ||
26 | int samplesperframe; | ||
27 | void recalcrates(); | ||
28 | void fillword(int hour,int min,int sec,int frame); | ||
29 | |||
30 | void setsamplerate(__uint32 p_samplerate); | ||
31 | void setframerate(__uint32 p_samplerate); | ||
32 | |||
33 | int modulate(int currbitval,int bitnum,int halfbit); | ||
34 | public: | ||
35 | SMPTEgenerator(__uint32 p_samplerate); | ||
36 | ~SMPTEgenerator(); | ||
37 | int getbit(__uint32 insamnum); | ||
38 | |||
39 | }; | ||
40 | |||
41 | #endif | ||