From b29e6ffa914fd2738cc1a8f45878be8cc450cd5a Mon Sep 17 00:00:00 2001 From: Virgil_lai <414785686@qq.com> Date: Thu, 28 Dec 2023 22:13:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0MAC=E7=94=B5=E8=84=91?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E7=9A=84=E6=8C=87=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc index 4300313a..0d6fd020 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc +++ b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc @@ -117,7 +117,7 @@ static unsigned longMul(unsigned a, unsigned b, int prec) ret = (x << (32-prec) | (y >> prec)); return ret; } - + extern void sound_effect_set_pc_connect_status( int status); /* Update master volume i.e. i.e update weights for all channels */ static void updateMasterVol(int unitID, chanend ?c_mix_ctl) { @@ -166,7 +166,9 @@ static void updateMasterVol(int unitID, chanend ?c_mix_ctl) unsigned vol = volsIn[i] == 0x8000 ? 0 : db_to_mult(volsIn[i], 8, 29); int x = longMul(master_vol, vol, 29) * !mutesIn[0] * !mutesIn[i]; - + //mac + + sound_effect_set_pc_connect_status(1); #if (IN_VOLUME_IN_MIXER) if (!isnull(c_mix_ctl)) { @@ -235,6 +237,7 @@ static void updateVol(int unitID, int channel, chanend ?c_mix_ctl) } case FU_USBIN: { + //windows /* Calc multipliers with 29 fractional bits from a db value with 8 fractional bits */ /* 0x8000 is a special value representing -inf (i.e. mute) */ unsigned master_vol = volsIn[0] == 0x8000 ? 0 : db_to_mult(volsIn[0], 8, 29);