Fixed a bug where a bit of code only needed for the Microphone was causing issues with Halo 2 when the XBLC is connected during startup. I moved it so that it's only used for the XBLC Microphone endpoint and that seems to have resolved the issue

This commit is contained in:
specialfred453@gmail.com 2025-03-16 16:30:30 -04:00
parent d756abd5c2
commit 69a1b065c1
2 changed files with 6 additions and 6 deletions

View File

@ -442,6 +442,11 @@ static void usb_xblc_handle_data(USBDevice *dev, USBPacket *p)
to_process -= chunk_len;
}
// Ensure we fill the entire packet regardless of if we have audio data so we don't
// cause an underrun error.
if (p->actual_length < p->iov.size)
usb_packet_copy(p, (void *)silence, p->iov.size - p->actual_length);
break;
case USB_TOKEN_OUT:
// Speaker data - get data from usb packet then push to fifo.
@ -456,12 +461,6 @@ static void usb_xblc_handle_data(USBDevice *dev, USBPacket *p)
assert(false);
break;
}
// Ensure we fill the entire packet regardless of if we have audio data so we don't
// cause an underrun error.
if (p->actual_length < p->iov.size)
usb_packet_copy(p, (void *)silence, p->iov.size - p->actual_length);
}
static void usb_xbox_communicator_unrealize(USBDevice *dev)

@ -0,0 +1 @@
Subproject commit 0f1b62c2b3d0898cbab7aa685c2593303ffdc1a2