分支自 DSP/ADSP21569/DSP-21569

graydon
2024-02-28 420778fcee054257d540cf24fbf1b1e3f9fc0d9f
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
/*
 * audioproc.h
 *
 *  Created on: 2021Äê11ÔÂ2ÈÕ
 *      Author: graydon
 */
 
#ifndef _AUDIOPROC_HH__
#define _AUDIOPROC_HH__
 
#include "typedefs.h"
#include "config.h"
#include "IModule.h"
#include "frames.h"
#include "ModuleExport.h"
#include "messageproc.h"
#include "protocol.h"
 
 
class ToB {
private :
    std::vector<IModule*> mList;//Ä£¿éÁбí
    std::vector<u16> mModuleIndex;
 
    Frames* frames;
    u32  dsp_index;
    ubool dual_dsp;
    ubool processed;
    u16   mModuleNum;
    u16  mLevelPacketNum ;
    IModule* CreateBaseModule( u32 moduleType, u16 tag, u16 rxNum, u16 txNum);
public:
    ToB(ubool dualDsp, u32 dspIndex);
    ~ToB();
    static ToB* GetInstance();
    uvoid SetMute(ubool mute);
    ErrStatus toClear();
    ErrStatus toProc();
    ErrStatus toCtrl(u32 mID, u32 pID,  const s16* val, u32 num);
    ErrStatus toCtrl(const u8* bin , u32 nbytes);
    ErrStatus CreateModule(const u8* bin, u32 nbytes);
    u32 GetLevels(Message* handle , MSG* msg);
    u32 GetModuleCPU(Message* handle , MSG* pmsg);
    u16 GetModuleNum() {return mModuleNum;}
    u16 GetLevelPacketNum() {return mLevelPacketNum;}
};
 
#endif