Skip to content
Snippets Groups Projects
Commit 1f0591dd authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard
Browse files

winecoreaudio: Temporarily move MIDIOut_Send() to audiounit.c.


This is to enable coremidi.c to become the unixlib, while still
enabling code on the user-side to be able to call MIDIOut_Send() for
the time being.  Eventually, its equivalent will move to the unixlib
and audiounit.c will disappear.

Signed-off-by: default avatarHuw Davies <huw@codeweavers.com>
Signed-off-by: default avatarAndrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 236a1bc8
Branches
Tags
No related merge requests found
......@@ -22,6 +22,7 @@
#define ULONG CoreFoundation_ULONG
#define HRESULT CoreFoundation_HRESULT
#include <mach/mach_time.h>
#include <AudioUnit/AudioUnit.h>
#include <AudioToolbox/AudioToolbox.h>
#undef ULONG
......@@ -195,3 +196,15 @@ int SynthUnit_Close(AUGraph graph)
return 1;
}
void MIDIOut_Send(MIDIPortRef port, MIDIEndpointRef dest, UInt8 *buffer, unsigned length)
{
Byte packetBuff[512];
MIDIPacketList *packetList = (MIDIPacketList *)packetBuff;
MIDIPacket *packet = MIDIPacketListInit(packetList);
packet = MIDIPacketListAdd(packetList, sizeof(packetBuff), packet, mach_absolute_time(), length, buffer);
if (packet)
MIDISend(port, dest, packetList);
}
......@@ -67,15 +67,3 @@ void MIDIIn_ReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefC
packet = MIDIPacketNext(packet);
}
}
void MIDIOut_Send(MIDIPortRef port, MIDIEndpointRef dest, UInt8 *buffer, unsigned length)
{
Byte packetBuff[512];
MIDIPacketList *packetList = (MIDIPacketList *)packetBuff;
MIDIPacket *packet = MIDIPacketListInit(packetList);
packet = MIDIPacketListAdd(packetList, sizeof(packetBuff), packet, mach_absolute_time(), length, buffer);
if (packet)
MIDISend(port, dest, packetList);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment