3rdparty/portmidi: Fixed more macOS errors.

This commit is contained in:
Vas Crabb 2025-04-20 11:02:29 +10:00
parent fd2ff42459
commit 53cd382d4a
2 changed files with 4 additions and 4 deletions

View File

@ -519,7 +519,7 @@ static PmError midi_in_open(PmInternal *midi, void *driverInfo)
{
MIDIEndpointRef endpoint;
coremidi_info_type info;
OSStatus macHostError;
OSStatus macHostError = noErr;
int is_virtual = pm_descriptors[midi->device_id].pub.is_virtual;
/* if this is an external device, descriptor is a MIDIEndpointRef.
@ -771,7 +771,7 @@ static PmError send_packet(PmInternal *midi, Byte *message,
info->packet = MIDIPacketListAdd(info->packetList,
sizeof(info->packetBuffer), info->packet,
timestamp, messageLength, message);
#if LIMIT_SEND_RATE
#if defined(LIMIT_SEND_RATE) && (LIMIT_SEND_RATE != 0)
info->byte_count += messageLength;
#endif
if (info->packet == NULL) {
@ -1201,7 +1201,7 @@ PmError pm_macosxcm_init(void)
MIDIEndpointRef endpoint;
int i;
OSStatus macHostError = noErr;
char *error_text;
const char *error_text;
memset(isIAC, 0, sizeof(isIAC)); /* initialize all FALSE */

View File

@ -988,7 +988,7 @@ static PmError winmm_write_byte(PmInternal *midi, unsigned char byte,
info->hdr = hdr = get_free_output_buffer(midi);
assert(hdr);
midi->fill_base = (unsigned char *) info->hdr->lpData;
midi->fill_offset_ptr = (unsigned int *) &(hdr->dwBytesRecorded);
midi->fill_offset_ptr = (uint32_t *) &(hdr->dwBytesRecorded);
/* when buffer fills, Pm_WriteSysEx will revert to calling
* pmwin_write_byte, which expect to have space, so leave
* one byte free for pmwin_write_byte. Leave another byte