-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchannel.h
More file actions
31 lines (26 loc) · 751 Bytes
/
channel.h
File metadata and controls
31 lines (26 loc) · 751 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
//channel.h
#ifndef CHANNEL_H
#define CHANNEL_H
#include <alsa/asoundlib.h>
#include "sequence.h"
#define TICKS_PER_QUARTER 192
class Channel {
public:
int port;
snd_seq_tick_time_t tick;
bool closed;
bool waiting;
Sequence seq;
Channel(int port);
virtual void processEvent(Event *event, snd_seq_event_t *ev);
virtual Event *nextEvent();
virtual Event *peekNextEvent();
virtual snd_seq_tick_time_t getTick(){return tick;}
void setTick(snd_seq_tick_time_t t){tick=t;}
void addWait(string label, Channel *channel);
void wakeUp(snd_seq_tick_time_t t);
void jump(string label);
void addSequence(vector<Event *> *s){seq.addSequence(s);}
virtual snd_seq_tick_time_t incTick(int duration){ return duration;}
};
#endif