1 module pixelperfectengine.audio.modules.delaylines;
2 
3 import pixelperfectengine.audio.base.modulebase;
4 import pixelperfectengine.audio.base.types;
5 import pixelperfectengine.audio.base.envgen;
6 import pixelperfectengine.audio.base.func;
7 import pixelperfectengine.audio.base.envgen;
8 import pixelperfectengine.audio.base.osc;
9 import pixelperfectengine.system.etc : isPowerOf2;
10 
11 import midi2.types.structs;
12 import midi2.types.enums;
13 
14 public class DelayLines : AudioModule {
15     protected float[]           priDelayLine;
16     protected float[]           secDelayLine;
17     protected MultiTapOsc[4]    osc;
18 
19     public this(size_t priLen, size_t secLen) {
20         assert(isPowerOf2(priLen));
21         assert(isPowerOf2(secLen) || !secLen);
22         info.nOfAudioInput = 2;
23 		info.nOfAudioOutput = 2;
24         info.inputChNames = ["mainL", "mainR"];
25 		info.outputChNames = ["mainL", "mainR"];
26 		info.hasMidiIn = true;
27         priDelayLine.length = priLen;
28         secDelayLine.length = secLen;
29         resetBuffer(priDelayLine);
30         resetBuffer(secDelayLine);
31     }
32 
33     override public void midiReceive(UMP data0, uint data1 = 0, uint data2 = 0, uint data3 = 0) @nogc nothrow {
34         
35     }
36 
37     override public void renderFrame(float*[] input, float*[] output) @nogc nothrow {
38         
39     }
40 
41     override public int waveformDataReceive(uint id, ubyte[] rawData, WaveFormat format) nothrow {
42         return int.init; // TODO: implement
43     }
44 
45     override public int writeParam_int(uint presetID, uint paramID, int value) nothrow {
46         return int.init; // TODO: implement
47     }
48 
49     override public int writeParam_long(uint presetID, uint paramID, long value) nothrow {
50         return int.init; // TODO: implement
51     }
52 
53     override public int writeParam_double(uint presetID, uint paramID, double value) nothrow {
54         return int.init; // TODO: implement
55     }
56 
57     override public int writeParam_string(uint presetID, uint paramID, string value) nothrow {
58         return int.init; // TODO: implement
59     }
60 
61     override public MValue[] getParameters() nothrow {
62         return null; // TODO: implement
63     }
64 
65     override public int readParam_int(uint presetID, uint paramID) nothrow {
66         return int.init; // TODO: implement
67     }
68 
69     override public long readParam_long(uint presetID, uint paramID) nothrow {
70         return long.init; // TODO: implement
71     }
72 
73     override public double readParam_double(uint presetID, uint paramID) nothrow {
74         return double.init; // TODO: implement
75     }
76 
77     override public string readParam_string(uint presetID, uint paramID) nothrow {
78         return string.init; // TODO: implement
79     }
80 }