forked from PAWPAW-Mirror/lib_xua
增加MAC电脑连接的指示
This commit is contained in:
@@ -117,7 +117,7 @@ static unsigned longMul(unsigned a, unsigned b, int prec)
|
|||||||
ret = (x << (32-prec) | (y >> prec));
|
ret = (x << (32-prec) | (y >> prec));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
extern void sound_effect_set_pc_connect_status( int status);
|
||||||
/* Update master volume i.e. i.e update weights for all channels */
|
/* Update master volume i.e. i.e update weights for all channels */
|
||||||
static void updateMasterVol(int unitID, chanend ?c_mix_ctl)
|
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);
|
unsigned vol = volsIn[i] == 0x8000 ? 0 : db_to_mult(volsIn[i], 8, 29);
|
||||||
|
|
||||||
int x = longMul(master_vol, vol, 29) * !mutesIn[0] * !mutesIn[i];
|
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 (IN_VOLUME_IN_MIXER)
|
||||||
if (!isnull(c_mix_ctl))
|
if (!isnull(c_mix_ctl))
|
||||||
{
|
{
|
||||||
@@ -235,6 +237,7 @@ static void updateVol(int unitID, int channel, chanend ?c_mix_ctl)
|
|||||||
}
|
}
|
||||||
case FU_USBIN:
|
case FU_USBIN:
|
||||||
{
|
{
|
||||||
|
//windows
|
||||||
/* Calc multipliers with 29 fractional bits from a db value with 8 fractional bits */
|
/* Calc multipliers with 29 fractional bits from a db value with 8 fractional bits */
|
||||||
/* 0x8000 is a special value representing -inf (i.e. mute) */
|
/* 0x8000 is a special value representing -inf (i.e. mute) */
|
||||||
unsigned master_vol = volsIn[0] == 0x8000 ? 0 : db_to_mult(volsIn[0], 8, 29);
|
unsigned master_vol = volsIn[0] == 0x8000 ? 0 : db_to_mult(volsIn[0], 8, 29);
|
||||||
|
|||||||
Reference in New Issue
Block a user