| | |
| | | /* |
| | | * scene.c |
| | | * |
| | | * Created on: 2025年7月18日 |
| | | * Created on: 2025年7月18日 |
| | | * Author: 86189 |
| | | */ |
| | | #include <string.h> |
| | |
| | | |
| | | tgScene::tgScene(hw_adapter_t* adapter):Scene(adapter) |
| | | { |
| | | s8 inport_str[8],outport_str[8]; |
| | | s8 ana_input_num, ana_output_num,dante_input_num,dante_output_num ; |
| | | s8 inport_str[16],outport_str[16]; |
| | | <<<<<<< HEAD |
| | | s8 ana_input_num, ana_output_num, loc_input_num, loc_output_num, dante_input_num, dante_output_num ; |
| | | s8 usb_input_num, usb_output_num; |
| | | s16 input_num, output_num ; |
| | | s32 n; |
| | | s32 n, new_idx = 300; //ID of the USB channel starts from 300. |
| | | ======= |
| | | s8 ana_input_num, ana_output_num,dante_input_num,dante_output_num ; |
| | | s8 usb_input_num = 2, usb_output_num = 2; |
| | | s16 input_num, output_num ; |
| | | s32 n, new_idx = 300; //usb 新增模块ID从300开始(与arm/pc协商一致),使用new_idx递增. |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | |
| | | s16 dual_dsp = adapter->get_system_is_dual_dsp(); |
| | | s16 dsp_index = adapter->get_dsp_index(); |
| | | |
| | | <<<<<<< HEAD |
| | | adapter->get_channel_num(&loc_input_num, &loc_output_num, &dante_input_num, &dante_output_num, &usb_input_num, &usb_output_num); |
| | | ana_input_num = loc_input_num - usb_input_num; |
| | | ana_output_num = loc_output_num - usb_output_num; |
| | | |
| | | //物理输入共16+16+2 |
| | | ======= |
| | | adapter->get_channel_num(&ana_input_num, &ana_output_num, &dante_input_num, &dante_output_num); |
| | | input_num = ana_input_num + dante_input_num; |
| | | output_num = ana_output_num + dante_output_num; |
| | | |
| | | //新增加的2x2 usb是带处理的和输入,输出平级 |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | input_num = ana_input_num + dante_input_num + usb_input_num; //2 USB |
| | | output_num = ana_output_num + dante_output_num + usb_output_num; |
| | | |
| | | tgScene_param_default(¶meters); |
| | | |
| | | <<<<<<< HEAD |
| | | ======= |
| | | |
| | | //只有physic_type 为PHY_INPUT和PHY_OUTPUT的 才会调用XX_adapter.cpp下的get_physical_channel函数. |
| | | //所以这2两个模块类型 port_str 对应的是逻辑通道应该覆盖到所有物理通道包括模拟、dante、usb. |
| | | //逻辑通道也就是PC软件看到的通道顺序(ana+dante+usbL+usbR+am+aec+ans). |
| | | //物理通道是DMA配置的顺序,get_physical_channel就是做逻辑通道到物理通道的映射. |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | sprintf(inport_str, "1-%d", input_num); |
| | | __MADD(299,PROC_INPUT,inport_str,inport_str,0, 1 ,¶meters.input, 0, ModuleInterfaceType::PHY_INPUT); |
| | | |
| | | sprintf(inport_str, "1-%d", input_num); |
| | | __MADD(298,PROC_METER,inport_str,"",0,1 ,NULL,0, ModuleInterfaceType::SOFT_MODULE); //tag:0-peak,1-rms |
| | | |
| | | //The number of DSPs is 1, but the number of input and output channels is greater than 16. |
| | | //It only processes analog input and output. |
| | | //However, for the channels that do not need to be processed, the level offset needs to be calculated. |
| | | if(!dual_dsp && input_num >16) { |
| | | n = ana_input_num; |
| | | } |
| | | else { |
| | | n= input_num; |
| | | } |
| | | // if(!dual_dsp && input_num >16) { |
| | | // n = ana_input_num; |
| | | // } |
| | | // else { |
| | | // n= input_num; |
| | | // } |
| | | |
| | | //expander |
| | | for(s32 i =0 ;i < input_num ; i++) { |
| | | sprintf(inport_str, "%d|", i+1); |
| | | __MADD(1+i,PROC_EXPANDER, inport_str, inport_str, 0, 0, ¶meters.in1[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < input_num - usb_input_num) |
| | | __MADD(1+i,PROC_EXPANDER, inport_str, inport_str, 0, 0, ¶meters.in1[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_EXPANDER, inport_str, inport_str, 0, 0, ¶meters.in1[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | } |
| | | |
| | | //compresser |
| | | for(s32 i =0 ;i < input_num ; i++) { |
| | | sprintf(inport_str, "%d|", i+1); |
| | | __MADD(33+i,PROC_COMPRESS, inport_str, inport_str, 0, 0, ¶meters.in2[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < input_num - usb_input_num) |
| | | __MADD(33+i,PROC_COMPRESS, inport_str, inport_str, 0, 0, ¶meters.in2[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_COMPRESS, inport_str, inport_str, 0, 0, ¶meters.in2[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | } |
| | | |
| | | //agc |
| | | for(s32 i =0 ;i < input_num ; i++) { |
| | | sprintf(inport_str, "%d|", i+1); |
| | | __MADD(65+i,PROC_AGC, inport_str, inport_str, 0, 0, ¶meters.in3[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < input_num - usb_input_num) |
| | | __MADD(65+i,PROC_AGC, inport_str, inport_str, 0, 0, ¶meters.in3[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_AGC, inport_str, inport_str, 0, 0, ¶meters.in3[i], 0, ModuleInterfaceType::SOFT_MODULE); |
| | | } |
| | | |
| | | //eq |
| | | for(s32 i =0 ;i < input_num ; i++) { |
| | | sprintf(inport_str, "%d|", i+1); |
| | | __MADD(97+i,PROC_EQ, inport_str, inport_str, 0, 0, ¶meters.in4[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < input_num - usb_input_num) |
| | | __MADD(97+i,PROC_EQ, inport_str, inport_str, 0, 0, ¶meters.in4[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_EQ, inport_str, inport_str, 0, 0, ¶meters.in4[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | } |
| | | |
| | | //nhs |
| | | for(s32 i =0 ;i < input_num ; i++) { |
| | | sprintf(inport_str, "%d|", i+1); |
| | | __MADD(129+i,PROC_FEEDBACK, inport_str, inport_str, 0, 0, ¶meters.in5[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < input_num - usb_input_num) |
| | | __MADD(129+i,PROC_FEEDBACK, inport_str, inport_str, 0, 0, ¶meters.in5[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_FEEDBACK, inport_str, inport_str, 0, 0, ¶meters.in5[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | } |
| | | |
| | | //am |
| | | sprintf(inport_str, "1-%d", input_num); |
| | | sprintf(outport_str, "1-%d", input_num+1); |
| | | <<<<<<< HEAD |
| | | __MADD(161,PROC_AUTOMIXER,inport_str, outport_str, 0, 0, ¶meters.automixer, 0, ModuleInterfaceType::SOFT_MODULE); //¿ÉÌæ»» |
| | | ======= |
| | | __MADD(161,PROC_AUTOMIXER,inport_str, outport_str, 0, 0, ¶meters.automixer, 0, ModuleInterfaceType::SOFT_MODULE); //可替换 |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | |
| | | //aec selector |
| | | sprintf(inport_str, "1-%d", input_num+ 2);//+1 add usb |
| | | sprintf(outport_str, "%d|%d|", input_num+ 3, input_num+ 4); |
| | | sprintf(inport_str, "1-%d", input_num+ 1); |
| | | sprintf(outport_str, "%d|%d|", input_num+ 2, input_num+ 3); |
| | | __MADD(162,PROC_SELECTOR, inport_str,outport_str, 0, 1, ¶meters.aec_selector, 0, ModuleInterfaceType::SOFT_MODULE); //add usb |
| | | |
| | | //aec |
| | | sprintf(inport_str, "%d|%d", input_num+ 3, input_num+ 4); |
| | | sprintf(outport_str, "%d|", input_num+ 3); |
| | | sprintf(inport_str, "%d|%d", input_num+ 2, input_num+ 3); |
| | | sprintf(outport_str, "%d|", input_num+ 2); |
| | | __MADD(163,PROC_AEC,inport_str, outport_str ,0, 1, ¶meters.aec, 256, ModuleInterfaceType::SOFT_MODULE); |
| | | |
| | | //ans selector |
| | | sprintf(inport_str, "1-%d", input_num+ 3); |
| | | sprintf(outport_str, "%d|", input_num+ 4); |
| | | sprintf(inport_str, "1-%d", input_num+ 2); |
| | | sprintf(outport_str, "%d|", input_num+ 3); |
| | | __MADD(164,PROC_SELECTOR,inport_str,outport_str, 1, 1 ,¶meters.ans_selector, 0, ModuleInterfaceType::SOFT_MODULE); |
| | | |
| | | //ans |
| | | sprintf(inport_str, "%d|", input_num+ 4); |
| | | sprintf(outport_str, "%d|", input_num+ 4); |
| | | sprintf(inport_str, "%d|", input_num+ 3); |
| | | sprintf(outport_str, "%d|", input_num+ 3); |
| | | __MADD(165,PROC_ANS,inport_str,outport_str, 1, 0 ,¶meters.afc_ns,0, ModuleInterfaceType::SOFT_MODULE); |
| | | |
| | | //mixer |
| | | sprintf(inport_str, "1-%d", input_num+ 4); |
| | | sprintf(outport_str, "1-%d", output_num+1); |
| | | sprintf(inport_str, "1-%d", input_num+ 3); |
| | | sprintf(outport_str, "%d-%d",input_num+4, input_num+output_num+4); |
| | | <<<<<<< HEAD |
| | | __MADD(166,PROC_MIXER,inport_str,outport_str,1, 1 ,¶meters.mixer, 0, ModuleInterfaceType::SOFT_MODULE); // .begin()+48 |
| | | ======= |
| | | __MADD(166,PROC_MIXER,inport_str,outport_str,1, 1 ,¶meters.mixer, 0, ModuleInterfaceType::SOFT_MODULE); // .begin()+48 |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | |
| | | //crossover |
| | | for(s32 i =0 ;i < output_num ; i++) { |
| | | sprintf(inport_str, "%d|", i+input_num+4); |
| | | sprintf(outport_str, "%d|", i+1); |
| | | __MADD(167+i,PROC_CROSSOVER,outport_str, outport_str,1, 0, ¶meters.out1[i],2, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(167+i,PROC_CROSSOVER,inport_str,outport_str,1, 0, ¶meters.out1[i],2, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_CROSSOVER,inport_str,outport_str,1, 0, ¶meters.out1[i],2, ModuleInterfaceType::SOFT_MODULE); |
| | | } |
| | | |
| | | //eq |
| | | for(s32 i =0 ;i < output_num ; i++) { |
| | | <<<<<<< HEAD |
| | | sprintf(outport_str, "%d|", i+1); |
| | | __MADD(199+i,PROC_EQ,outport_str, outport_str,1, 0, ¶meters.out2[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(199+i,PROC_EQ,outport_str, outport_str,1, 0, ¶meters.out2[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_EQ,outport_str, outport_str,1, 0, ¶meters.out2[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | ======= |
| | | sprintf(inport_str, "%d|", i+input_num+4); |
| | | sprintf(outport_str, "%d|", i+1); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(199+i,PROC_EQ,inport_str, outport_str,1, 0, ¶meters.out2[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_EQ,inport_str, outport_str,1, 0, ¶meters.out2[i], 8, ModuleInterfaceType::SOFT_MODULE); |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | } |
| | | |
| | | //delay |
| | | for(s32 i =0 ;i < output_num ; i++) { |
| | | <<<<<<< HEAD |
| | | sprintf(outport_str, "%d|", i+1); |
| | | __MADD(231+i,PROC_DELAY,outport_str, outport_str,1, 0, ¶meters.out3[i], 1200, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(231+i,PROC_DELAY,outport_str, outport_str,1, 0, ¶meters.out3[i], 1200, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_DELAY,outport_str, outport_str,1, 0, ¶meters.out3[i], 1200, ModuleInterfaceType::SOFT_MODULE); |
| | | ======= |
| | | sprintf(inport_str, "%d|", i+input_num+4); |
| | | sprintf(outport_str, "%d|", i+1); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(231+i,PROC_DELAY,inport_str, outport_str,1, 0, ¶meters.out3[i], 1200, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_DELAY,inport_str, outport_str,1, 0, ¶meters.out3[i], 1200, ModuleInterfaceType::SOFT_MODULE); |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | } |
| | | |
| | | //limit |
| | | for(s32 i =0 ;i < output_num ; i++) { |
| | | <<<<<<< HEAD |
| | | sprintf(outport_str, "%d|", i+1); |
| | | __MADD(263+i,PROC_LIMIT,outport_str, outport_str,1, 0, ¶meters.out4[i],0, ModuleInterfaceType::SOFT_MODULE); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(263+i,PROC_LIMIT,outport_str, outport_str,1, 0, ¶meters.out4[i],0, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx++,PROC_LIMIT,outport_str, outport_str,1, 0, ¶meters.out4[i],0, ModuleInterfaceType::SOFT_MODULE); |
| | | ======= |
| | | sprintf(inport_str, "%d|", i+input_num+4); |
| | | sprintf(outport_str, "%d|", i+1); |
| | | if(i < output_num - usb_output_num) |
| | | __MADD(263+i,PROC_LIMIT,inport_str, outport_str,1, 0, ¶meters.out4[i],0, ModuleInterfaceType::SOFT_MODULE); |
| | | else |
| | | __MADD(new_idx,PROC_LIMIT,inport_str, outport_str,1, 0, ¶meters.out4[i],0, ModuleInterfaceType::SOFT_MODULE); |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | } |
| | | |
| | | //output |
| | |
| | | //meter |
| | | __MADD(297,PROC_METER,outport_str,"",1, 1, NULL, 0, ModuleInterfaceType::SOFT_MODULE); |
| | | |
| | | printf("lst size=%d\n", proc_list.size()); |
| | | |
| | | }; |
| | | |
| | | |
| | |
| | | break; |
| | | |
| | | case PROC_FIR: |
| | | <<<<<<< HEAD |
| | | ptag_fir pfir = (ptag_fir)param_ptr; |
| | | pfir->bypass = allbypass; |
| | | pfir->taps = 1024; |
| | | memset((void*)pfir->coeffs, 0, sizeof(pfir->coeffs)); |
| | | pfir->coeffs[0] = 1; |
| | | ======= |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | break; |
| | | |
| | | default: |
| | |
| | | s32 tgScene::set_parameters_content(uvoid* param, s32 size) |
| | | { |
| | | tag_parameters* pp = (tag_parameters*)param; |
| | | <<<<<<< HEAD |
| | | int L[24] = {0}; |
| | | if(pp->magic != 0xbcba || size != sizeof(tag_parameters)) { |
| | | printf("preset param error!\n"); |
| | | /*printf("tag_head:%d,%d,%d,%d,%d\n", L[0]=sizeof(parameters.magic), L[1]=sizeof(parameters.nmds)+L[0], L[2]=sizeof(parameters.pad1)+L[1], L[3]=sizeof(parameters.pad2)+L[2], L[4]=sizeof(parameters.crc)+L[3]); |
| | | printf("tag_input:%d, %d\n", sizeof(tag_input), L[5]=sizeof(tag_input)+L[4]); |
| | | printf("tag_module_in:%d, %d\n", sizeof(tag_module), L[6]=sizeof(tag_module) * MAX_INPUT_NUM * 5 + L[5]); |
| | | |
| | | printf("tag_automixer:%d, %d\n", sizeof(tag_automixer), L[7]=sizeof(tag_automixer)+L[6]); |
| | | printf("tag_select1:%d, %d\n", sizeof(tag_selector), L[8]=sizeof(tag_selector)+L[7]); |
| | | printf("tag_aec:%d, %d\n", sizeof(tag_aec), L[9]=sizeof(tag_aec)+L[8]); |
| | | printf("tag_selector:%d, %d\n", sizeof(tag_selector), L[10]=sizeof(tag_selector) + L[9]); |
| | | printf("tag_3a:%d, %d, %d\n", sizeof(tag_3a), L[11]=sizeof(tag_3a)+L[10]); |
| | | printf("tag_mixer:%d, %d\n", sizeof(tag_mixer), L[12]=sizeof(tag_mixer)+L[11]); |
| | | |
| | | printf("tag_module_o1:%d, %d\n", sizeof(tag_module), L[13]=sizeof(tag_module) * MAX_INPUT_NUM + L[12]); |
| | | printf("tag_module_fir:%d\n", sizeof(tag_module_fir), L[14]=sizeof(tag_module_fir) * MAX_OUTPUT_NUM + L[13]); |
| | | printf("tag_module_out:%d\n", sizeof(tag_module), L[15]=sizeof(tag_module) * MAX_OUTPUT_NUM * 2 + L[14]); |
| | | printf("tag_output:%d, %d\n", sizeof(tag_output), L[16]=sizeof(tag_output)+L[15]); |
| | | printf("tag_sysctl:%d, %d\n", sizeof(tag_sysctl), L[17]=sizeof(tag_sysctl)+L[16]); |
| | | printf("tag_group:%d, %d\n", sizeof(tag_group), L[18]=sizeof(tag_group)+L[17]);*/ |
| | | |
| | | printf("Len parameters:%d, Len recv:%d\n", L[19]=sizeof(tag_parameters), size); |
| | | ======= |
| | | if(pp->magic != 0xbcba || size != sizeof(tag_parameters)) { |
| | | printf("preset param error!\n"); |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | return -1; |
| | | } |
| | | memcpy(¶meters, param, sizeof(tag_parameters)); |
| | |
| | | return 0; |
| | | } |
| | | |
| | | s32 tgScene::update_dynmodule_tag(s32 proc_type,struct proc_field* proc) |
| | | s32 tgScene::update_dynmodule_tag(s32 proc_type, struct proc_field* proc) |
| | | { |
| | | switch(proc_type) { |
| | | case ModuleType::PROC_GEQ:{ |
| | |
| | | proc->tag =1200; |
| | | break; |
| | | case ModuleType::PROC_CROSSOVER: |
| | | proc->tag =2; |
| | | proc->tag =1; |
| | | break; |
| | | case ModuleType::PROC_FEEDBACK:{ |
| | | ptag_module pmodule = (ptag_module)proc->parameters; |
| | |
| | | |
| | | s32 tgScene::update_module() |
| | | { |
| | | <<<<<<< HEAD |
| | | s8 ana_input_num, ana_output_num,dante_input_num,dante_output_num, usb_input_num, usb_output_num ; |
| | | ======= |
| | | s8 ana_input_num, ana_output_num,dante_input_num,dante_output_num ; |
| | | >>>>>>> 0d5b7df96a2ee186b7b085dca9cf9a33f791c430 |
| | | s16 input_num, output_num ; |
| | | s16 dual_dsp = hw_adapter->get_system_is_dual_dsp(); |
| | | s16 dsp_index = hw_adapter->get_dsp_index(); |
| | | |
| | | hw_adapter->get_channel_num(&ana_input_num, &ana_output_num, &dante_input_num, &dante_output_num); |
| | | hw_adapter->get_channel_num(&ana_input_num, &ana_output_num, &dante_input_num, &dante_output_num, &usb_input_num, &usb_output_num); |
| | | input_num = ana_input_num + dante_input_num; |
| | | output_num = ana_output_num + dante_output_num; |
| | | |
| | |
| | | if(pmodule->proc_type >= ModuleType::PROC_COUNT || pmodule->proc_type < ModuleType::PROC_NONE) { |
| | | pmodule->proc_type = ModuleType::PROC_NONE; |
| | | } |
| | | update_dynmodule_tag(pmodule->proc_type, &iter); |
| | | |
| | | // if(iter.dsp_index == 0) { |
| | | // s32 n = input_num; |
| | | // s32 ninports = str_delim((const s8*)iter.inportstr, port_number); |
| | | // |
| | | // //Consider PCM model&& PCM channel don't process. |
| | | // if(dual_dsp == 0 && input_num >16){ |
| | | // n = ana_input_num; |
| | | // } |
| | | // |
| | | // if(ninports == 1 && port_number[0] >= n){ |
| | | // iter.proc_type = ModuleType::PROC_NONE;//便于解析场景过滤 |
| | | // //even though module not to process, but the pc has level offset. |
| | | // if(port_number[0] >= input_num) { |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | // else { |
| | | // s32 n = output_num; |
| | | // s32 ninports = str_delim(iter.inportstr, port_number); |
| | | // |
| | | // if(dual_dsp == 0 && output_num >16){ |
| | | // n = ana_output_num; |
| | | // } |
| | | // |
| | | // if(ninports==1 && port_number[0] >= n){ |
| | | // iter.proc_type = ModuleType::PROC_NONE; //便于解析场景过滤 |
| | | // //even though module not to process, but the pc has level offset. |
| | | // if(port_number[0] >= output_num) { |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | update_dynmodule_tag(pmodule->proc_type, &iter); |
| | | } |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | uvoid* tgScene::get_module_param_ptr(uvoid *param, s32 fixed) |
| | | uvoid* tgScene::get_module_param_ptr(s32 mType, uvoid *param, s32 fixed) |
| | | { |
| | | uvoid *ptr = param; |
| | | |
| | | if(fixed == 0){ |
| | | ptag_module pmod = (ptag_module)param; |
| | | ptr = (void*)pmod->proc_ins; |
| | | if (PROC_FIR == mType) { |
| | | ptag_module_fir pmod = (ptag_module_fir)param; |
| | | ptr = (void*)pmod->proc_ins; |
| | | } |
| | | else { |
| | | ptag_module pmod = (ptag_module)param; |
| | | ptr = (void*)pmod->proc_ins; |
| | | } |
| | | } |
| | | return ptr; |
| | | } |
| | | |
| | | |
| | | u32 tgScene::get_module_id(u32 mid, s32 mtype , u32 pid) |
| | | { |
| | | if(mtype == PROC_INPUT && (pid == INPUT_TYPE || pid == INPUT_FREQ || pid == INPUT_LEVEL)){ |
| | | mid = 300; |
| | | } |
| | | else if(mtype == PROC_DUCKER && pid == DUCKER_MIX){ |
| | | mid = mid + 320; |
| | | } |
| | | |
| | | return mid; |
| | | } |
| | | //u32 tgScene::get_module_id(u32 mid, s32 mtype , u32 pid) |
| | | //{ |
| | | // if(mtype == PROC_INPUT && (pid == INPUT_TYPE || pid == INPUT_FREQ || pid == INPUT_LEVEL)){ |
| | | // mid = 300; |
| | | // } |
| | | // else if(mtype == PROC_DUCKER && pid == DUCKER_MIX){ |
| | | // mid = mid + 320; |
| | | // } |
| | | // |
| | | // return mid; |
| | | //} |