-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_module.h
More file actions
52 lines (45 loc) · 1.26 KB
/
model_module.h
File metadata and controls
52 lines (45 loc) · 1.26 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
/*
* model_module.h
*
* Created on: Apr 2, 2018
* Author: MisterCavespider
*/
#ifndef MODEL_MODULE_H_
#define MODEL_MODULE_H_
#include <Audio.h>
#include "value_bounded.h"
#include "value_value.h"
class Module {
public:
uint8_t getId();
Value **getValues();
uint8_t *getInputs();
uint8_t *getOutputs();
const char *getName();
const char **getValueNames();
uint8_t getValueCount();
uint8_t getInputCount();
uint8_t getOutputCount();
uint8_t getParalsCount();
virtual uint8_t spStream(AudioStream **arrStore)=0;
virtual uint8_t spConnIn(AudioStream **arrStore, AudioStream **used, int *port, int idx)=0;
virtual uint8_t spConnOut(AudioStream **arrStore, AudioStream **used, int *port, int idx)=0;
virtual void updateForValue(AudioStream **arrStore, uint8_t val)=0;
virtual ~Module();
protected:
uint8_t id;
Value **values = NULL; // Pointers to all values (can be cast)
uint8_t *inputs = NULL;
uint8_t *outputs = NULL;
const char *name;
const char **valueNames;
uint8_t valueCount;
uint8_t inputCount;
uint8_t outputCount;
uint8_t paralsCount;
Module(uint8_t id,
const char *name, const char **valueNames,
uint8_t valueCount, uint8_t inputCount,
uint8_t outputCount, uint8_t paralsCount);
};
#endif /* MODEL_MODULE_H_ */