From 8758151dcdb0f89e362dd297405a384d3a034380 Mon Sep 17 00:00:00 2001
From: chenlh <2008get@163.com>
Date: 星期三, 28 一月 2026 20:21:37 +0800
Subject: [PATCH] 天宫输入源模块设置时爆音及参数拷贝更新
---
src/scene.cpp | 36 ++++++++++++++----------------------
1 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/src/scene.cpp b/src/scene.cpp
index e8618b9..0aeb71e 100644
--- a/src/scene.cpp
+++ b/src/scene.cpp
@@ -50,7 +50,16 @@
}
}
-
+void *Scene::get_param(s32 proc_id)
+{
+ for (auto& proc : proc_list) {
+ if (proc.proc_id == proc_id) {
+// printf("proc:%d,addr:0x%x\n", proc_id, proc.parameters);
+ return proc.parameters;
+ }
+ }
+ return nullptr;
+}
s32 Scene::convert_to_bin(u8* bin)
{
@@ -68,7 +77,7 @@
if (!bin) return 0;
struct Module *m = (struct Module *)(bin + size);
- printf("proc list size %d\n", proc_list.size());
+ dbg_printf("proc list size %d\n", proc_list.size());
for (i=0; i< proc_list.size(); i++) {
Module *m = (struct Module *)(bin + size);
@@ -81,25 +90,9 @@
continue;
}
- //ducker & spl.
+ //ducker & spl with mix.
if(p->proc_type == PROC_DUCKER || p->proc_type == PROC_CONTINUNOUS_SPL) {
- //insert a mixer.
- struct Module *mixer = (struct Module *)(bin + size);
- u16 channelID[64];
-
- mixer->mDsp = 0;
- mixer->mID = p->proc_id + 320;
- mixer->mType = ModuleType::PROC_MIXER;
- mixer->mTag = 0;
- mixer->mPhyModule = 0;
- mixer->mParamaddr = (s32)get_module_param_ptr(mixer->mType, p->parameters, p->fixed);
-
- size += sizeof(struct Module);
-
- mixer->mRxNum = str_delim(proc_list[1].inportstr, channelID) ;
- memcpy(bin + size , channelID, mixer->mRxNum*sizeof(u16)); size += mixer->mRxNum*sizeof(u16);
- mixer->mTxNum = 1;
- memcpy(bin + size , &rxBufID[1], mixer->mTxNum*sizeof(u16)); size += mixer->mTxNum*sizeof(u16);
+ ninports = str_delim(proc_list[1].inportstr, &rxBufID[1]) + 1; // rxBufID[0] is the dataIn Frame, rxBufID[1]~rxBufID[inportstr] is the mix channel.
}
if(hw_adapter->get_system_is_dual_dsp()){
dsp_index = p->dsp_index ;
@@ -107,7 +100,6 @@
else {
dsp_index = 0;
}
-
m = (struct Module *)(bin + size);
for(j = 0 ; j< ninports ;j ++) {
@@ -139,7 +131,7 @@
for(j = 0 ; j< ninports ;j ++, phy_id++) {
phy_id->mIntType = 0;
phy_id->mPhyID = hw_adapter->get_physical_channel(1, rxBufID[j]-1);
-// printf("PhyID:%d\n", phy_id->mPhyID);
+// dbg_printf("PhyID:%d\n", phy_id->mPhyID);
}
size += ninports*sizeof(PhyPort);
}
--
Gitblit v1.9.3