forked from PAWPAW-Mirror/lib_xua
Fixed bug in getting level meters - was requesting channel past array bounds
This commit is contained in:
@@ -921,9 +921,9 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
|
|||||||
if (!isnull(c_mix_ctl))
|
if (!isnull(c_mix_ctl))
|
||||||
{
|
{
|
||||||
outuint(c_mix_ctl, GET_INPUT_LEVELS);
|
outuint(c_mix_ctl, GET_INPUT_LEVELS);
|
||||||
outuint(c_mix_ctl, (i - NUM_USB_CHAN_IN));
|
outuint(c_mix_ctl, i);
|
||||||
outct(c_mix_ctl, XS1_CT_END);
|
outct(c_mix_ctl, XS1_CT_END);
|
||||||
storeShort(buffer, i*2, (inuint(c_mix_ctl)>>15));
|
storeShort(buffer, i*2, (inuint(c_mix_ctl) >> 15));
|
||||||
chkct(c_mix_ctl, XS1_CT_END);
|
chkct(c_mix_ctl, XS1_CT_END);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -952,7 +952,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
|
|||||||
|
|
||||||
case 1: /* Mixer Output levels */
|
case 1: /* Mixer Output levels */
|
||||||
length = MAX_MIX_COUNT * 2; /* 2 bytes per chan */
|
length = MAX_MIX_COUNT * 2; /* 2 bytes per chan */
|
||||||
|
|
||||||
for(int i = 0; i < MAX_MIX_COUNT; i++)
|
for(int i = 0; i < MAX_MIX_COUNT; i++)
|
||||||
{
|
{
|
||||||
if (!isnull(c_mix_ctl))
|
if (!isnull(c_mix_ctl))
|
||||||
|
|||||||
Reference in New Issue
Block a user