chenlh
2026-01-28 8758151dcdb0f89e362dd297405a384d3a034380
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
#ifndef PARAMCTRL_H_
#define PARAMCTRL_H_
 
#include "module_def.h"
#include "../param_ctrl.h"
#include "../ModuleExport.h"
 
class tg_param_ctrl_t : public param_ctrl_t
{
private:
 
public:
    tg_param_ctrl_t();
 
    template<typename A>
    bool decide_modu_type_equal(A *pmodu, s16 dst_ch, s16 src_ch)
    {
        bool ret = false;
 
        const auto& dst_module = pmodu[dst_ch];
        const auto& src_module = pmodu[src_ch];
 
        if (dst_module.proc_type == src_module.proc_type) {
            switch (dst_module.proc_type) {
                case PROC_EQ: {
                    ptag_eq dst_eq = (ptag_eq)&dst_module.proc_ins;
                    ptag_eq src_eq = (ptag_eq)&src_module.proc_ins;
                    ret = (dst_eq->nsection == src_eq->nsection);
                    break;
                }
                case PROC_GEQ: {
                    ptag_geq dst_geq = (ptag_geq)&dst_module.proc_ins;
                    ptag_geq src_geq = (ptag_geq)&src_module.proc_ins;
                    ret = (dst_geq->nsections == src_geq->nsections);
                    break;
                }
                default:
                    ret = true;
                    break;
            }
        }
        return ret;
    }
};
 
#endif