-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjackengine.h
More file actions
76 lines (53 loc) · 2.07 KB
/
Copy pathjackengine.h
File metadata and controls
76 lines (53 loc) · 2.07 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef awb_jackengine_h_
#define awb_jackengine_h_
#include <iostream>
namespace awb {
class JackEngine {
private:
void closeRecordChannel(const int pos);
public:
enum RecordMode {
// When recording past the end of the current span, wrap around
// to the beginning of the buffer.
wrap,
// If we record past the end, continue recording and quantize to
// the span to the new position.
expand,
// Allow recording past the end of the span, like in expand mode,
// but also let the current record drive when it is looped so that
// we can begin looping in the same span that we ended in.
spanRelative,
};
~JackEngine();
static JackEngine *create(const char *name);
// Process some number of frames.
void process(unsigned int nframes);
void startRecord(int channel);
void endRecord();
// Returns the channel that is currently being recorded, -1 if not
// recording.
int getRecordChannel() const;
void startPlay();
void endPlay();
bool isPlaying() const;
// Set the "sticky" flag on the channel. A sticky channel will
// transfer its state to the corresponding channel in a new section.
void setSticky(int channel, bool sticky);
// Get the sticky flag for a channel.
bool getSticky(int channel) const;
// Clear all buffers, restore the engine to a pristine state.
void clear();
// Start a new section as soon as the old section ends or when record
// is initiated.
void startNewSection();
// Start the previous section as soon as the old section ends or when
// record is initiated.
void startPrevSection();
// Start the next section as soon as the old section ends or when
// record is initiated.
void startNextSection();
void store(std::ostream &out);
void load(std::istream &in);
};
} // namespace awb
#endif