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

Alexandre Julliard julliard at winehq.org
Fri Nov 26 15:46:28 CST 2021


Module: wine
Branch: master
Commit: 1f0591dd4558c606d844fc30c21f5c2b1e11c34b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1f0591dd4558c606d844fc30c21f5c2b1e11c34b

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Nov 25 11:03:36 2021 +0000

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: Huw Davies <huw at codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winecoreaudio.drv/audiounit.c | 13 +++++++++++++
 dlls/winecoreaudio.drv/coremidi.c  | 12 ------------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/dlls/winecoreaudio.drv/audiounit.c b/dlls/winecoreaudio.drv/audiounit.c
index 030ff4d090a..c91fec216bd 100644
--- a/dlls/winecoreaudio.drv/audiounit.c
+++ b/dlls/winecoreaudio.drv/audiounit.c
@@ -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);
+}
diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c
index 94761b05c4f..6d54d89cfac 100644
--- a/dlls/winecoreaudio.drv/coremidi.c
+++ b/dlls/winecoreaudio.drv/coremidi.c
@@ -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);
-}




More information about the wine-cvs mailing list