qipp
2025-11-07 1db34b4e65f72d8ae8b1f0efbc7a4395f9bbcae8
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
/*
 * audioproc.h
 *
 *  Created on: 2021Äê11ÔÂ2ÈÕ
 *      Author: graydon
 */
 
#ifndef _AUDIOPROC_HH__
#define _AUDIOPROC_HH__
 
#include <vector>
#include "typedefs.h"
#include "config.h"
#include "IModule.h"
#include "frames.h"
#include "ModuleExport.h"
#include "protocol.h"
#include <map>
//#include "convert.h"
#include "ParamCtrl.h"
 
class ToB {
private :
    std::vector<IModule*> mList;//Ä£¿éÁбí
    std::vector<u16> mModuleIndex;
 
    Frames* frames;
    u8  dsp_index;
    ubool dual_dsp;
    u16   mLevelNum;
 
    ubool processed;
    ubool pad;
    u16   mModuleNum;
 
    static ToB* tob;
 
    //static std::map<u32, convert_fn> ProcConvert;
    static std::map<u32, ParamEntry*> ProcParamCtrl;
 
    IModule* CreateBaseModule( u32 moduleType, u16 tag, u16 rxNum, u16 txNum);
public:
    ToB(ubool dualDsp, u32 dspIndex);
    ~ToB();
    static ToB* GetInstance(){
        return tob;
    }
 
    uvoid SetMute(ubool mute);
    ErrStatus toClear();
    ErrStatus toProc();
    ErrStatus toCtrl(u32 mID, u32 pID,  s16* val, u32 num);
    ErrStatus toCtrl(u32 mID, u32 pID,  s16* val);
    ErrStatus toCtrl(const u8* bin , u32 nbytes);
    ErrStatus CreateModule(const u8* bin, u32 nbytes);
    ErrStatus CreateModule(const u8* bin, u32 nbytes, const u8 *scene_bin);
    u32 GetLevels(s16 * buffer);
    u32 GetRuntime(u16 * buffer);
    uvoid SetModuleParam(u32 proc_type, u32 mID, void *handle);
};
 
#endif