Huw Davies : winecoreaudio: Move DriverProc to midi.c.
Alexandre Julliard
julliard at winehq.org
Wed Nov 17 16:27:59 CST 2021
Module: wine
Branch: master
Commit: 0e52d77f92b859244df681b95618c86ab6d8ddad
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0e52d77f92b859244df681b95618c86ab6d8ddad
Author: Huw Davies <huw at codeweavers.com>
Date: Wed Nov 17 09:08:25 2021 -0600
winecoreaudio: Move DriverProc to midi.c.
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/coreaudio.c | 81 --------------------------------------
dlls/winecoreaudio.drv/coreaudio.h | 9 -----
dlls/winecoreaudio.drv/midi.c | 78 +++++++++++++++++++++++++++++++++++-
3 files changed, 77 insertions(+), 91 deletions(-)
diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c
index 321c24b477c..1f222367bed 100644
--- a/dlls/winecoreaudio.drv/coreaudio.c
+++ b/dlls/winecoreaudio.drv/coreaudio.c
@@ -1,8 +1,6 @@
/*
* Wine Driver for CoreAudio
*
- * Copyright 2005 Emmanuel Maillard
- *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -30,82 +28,3 @@
#include "mmddk.h"
#include "coreaudio.h"
#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(coreaudio);
-
-
-/**************************************************************************
- * CoreAudio_drvLoad [internal]
- */
-static LRESULT CoreAudio_drvLoad(void)
-{
- TRACE("()\n");
-
- if (CoreAudio_MIDIInit() != DRV_SUCCESS)
- return DRV_FAILURE;
-
- return DRV_SUCCESS;
-}
-
-/**************************************************************************
- * CoreAudio_drvFree [internal]
- */
-static LRESULT CoreAudio_drvFree(void)
-{
- TRACE("()\n");
- CoreAudio_MIDIRelease();
- return DRV_SUCCESS;
-}
-
-/**************************************************************************
- * CoreAudio_drvOpen [internal]
- */
-static LRESULT CoreAudio_drvOpen(LPSTR str)
-{
- TRACE("(%s)\n", str);
- return 1;
-}
-
-/**************************************************************************
- * CoreAudio_drvClose [internal]
- */
-static DWORD CoreAudio_drvClose(DWORD dwDevID)
-{
- TRACE("(%08x)\n", dwDevID);
- return 1;
-}
-
-/**************************************************************************
- * DriverProc (WINECOREAUDIO.1)
- */
-LRESULT CALLBACK CoreAudio_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
- LPARAM dwParam1, LPARAM dwParam2)
-{
- TRACE("(%08lX, %p, %s (%08X), %08lX, %08lX)\n",
- dwDevID, hDriv, wMsg == DRV_LOAD ? "DRV_LOAD" :
- wMsg == DRV_FREE ? "DRV_FREE" :
- wMsg == DRV_OPEN ? "DRV_OPEN" :
- wMsg == DRV_CLOSE ? "DRV_CLOSE" :
- wMsg == DRV_ENABLE ? "DRV_ENABLE" :
- wMsg == DRV_DISABLE ? "DRV_DISABLE" :
- wMsg == DRV_QUERYCONFIGURE ? "DRV_QUERYCONFIGURE" :
- wMsg == DRV_CONFIGURE ? "DRV_CONFIGURE" :
- wMsg == DRV_INSTALL ? "DRV_INSTALL" :
- wMsg == DRV_REMOVE ? "DRV_REMOVE" : "UNKNOWN",
- wMsg, dwParam1, dwParam2);
-
- switch(wMsg) {
- case DRV_LOAD: return CoreAudio_drvLoad();
- case DRV_FREE: return CoreAudio_drvFree();
- case DRV_OPEN: return CoreAudio_drvOpen((LPSTR)dwParam1);
- case DRV_CLOSE: return CoreAudio_drvClose(dwDevID);
- case DRV_ENABLE: return 1;
- case DRV_DISABLE: return 1;
- case DRV_QUERYCONFIGURE: return 1;
- case DRV_CONFIGURE: MessageBoxA(0, "CoreAudio driver!", "CoreAudio driver", MB_OK); return 1;
- case DRV_INSTALL: return DRVCNF_RESTART;
- case DRV_REMOVE: return DRVCNF_RESTART;
- default:
- return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
- }
-}
diff --git a/dlls/winecoreaudio.drv/coreaudio.h b/dlls/winecoreaudio.drv/coreaudio.h
index 68b52502333..e04043c4010 100644
--- a/dlls/winecoreaudio.drv/coreaudio.h
+++ b/dlls/winecoreaudio.drv/coreaudio.h
@@ -22,15 +22,6 @@
#include "wine/debug.h"
-extern LONG CoreAudio_WaveInit(void);
-extern void CoreAudio_WaveRelease(void);
-
-extern LONG CoreAudio_MIDIInit(void);
-extern LONG CoreAudio_MIDIRelease(void);
-
-extern LONG CoreAudio_MixerInit(void);
-extern void CoreAudio_MixerRelease(void);
-
/* fourcc is in native order, where MSB is the first character. */
static inline const char* wine_dbgstr_fourcc(INT32 fourcc)
{
diff --git a/dlls/winecoreaudio.drv/midi.c b/dlls/winecoreaudio.drv/midi.c
index c299d116f12..64fc3618f61 100644
--- a/dlls/winecoreaudio.drv/midi.c
+++ b/dlls/winecoreaudio.drv/midi.c
@@ -8,7 +8,7 @@
* current support is limited to MIDI ports of OSS systems
* 98/9 rewriting MCI code for MIDI
* 98/11 split in midi.c and mcimidi.c
- * Copyright 2006 Emmanuel Maillard
+ * Copyright 2005, 2006 Emmanuel Maillard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1033,3 +1033,79 @@ DWORD WINAPI CoreAudio_midMessage(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dw
}
return MMSYSERR_NOTSUPPORTED;
}
+
+/**************************************************************************
+ * CoreAudio_drvLoad [internal]
+ */
+static LRESULT CoreAudio_drvLoad(void)
+{
+ TRACE("()\n");
+
+ if (CoreAudio_MIDIInit() != DRV_SUCCESS)
+ return DRV_FAILURE;
+
+ return DRV_SUCCESS;
+}
+
+/**************************************************************************
+ * CoreAudio_drvFree [internal]
+ */
+static LRESULT CoreAudio_drvFree(void)
+{
+ TRACE("()\n");
+ CoreAudio_MIDIRelease();
+ return DRV_SUCCESS;
+}
+
+/**************************************************************************
+ * CoreAudio_drvOpen [internal]
+ */
+static LRESULT CoreAudio_drvOpen(LPSTR str)
+{
+ TRACE("(%s)\n", str);
+ return 1;
+}
+
+/**************************************************************************
+ * CoreAudio_drvClose [internal]
+ */
+static DWORD CoreAudio_drvClose(DWORD dwDevID)
+{
+ TRACE("(%08x)\n", dwDevID);
+ return 1;
+}
+
+/**************************************************************************
+ * DriverProc (WINECOREAUDIO.1)
+ */
+LRESULT CALLBACK CoreAudio_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
+ LPARAM dwParam1, LPARAM dwParam2)
+{
+ TRACE("(%08lX, %p, %s (%08X), %08lX, %08lX)\n",
+ dwDevID, hDriv, wMsg == DRV_LOAD ? "DRV_LOAD" :
+ wMsg == DRV_FREE ? "DRV_FREE" :
+ wMsg == DRV_OPEN ? "DRV_OPEN" :
+ wMsg == DRV_CLOSE ? "DRV_CLOSE" :
+ wMsg == DRV_ENABLE ? "DRV_ENABLE" :
+ wMsg == DRV_DISABLE ? "DRV_DISABLE" :
+ wMsg == DRV_QUERYCONFIGURE ? "DRV_QUERYCONFIGURE" :
+ wMsg == DRV_CONFIGURE ? "DRV_CONFIGURE" :
+ wMsg == DRV_INSTALL ? "DRV_INSTALL" :
+ wMsg == DRV_REMOVE ? "DRV_REMOVE" : "UNKNOWN",
+ wMsg, dwParam1, dwParam2);
+
+ switch(wMsg) {
+ case DRV_LOAD: return CoreAudio_drvLoad();
+ case DRV_FREE: return CoreAudio_drvFree();
+ case DRV_OPEN: return CoreAudio_drvOpen((LPSTR)dwParam1);
+ case DRV_CLOSE: return CoreAudio_drvClose(dwDevID);
+ case DRV_ENABLE: return 1;
+ case DRV_DISABLE: return 1;
+ case DRV_QUERYCONFIGURE: return 1;
+ case DRV_CONFIGURE: MessageBoxA(0, "CoreAudio driver!", "CoreAudio driver", MB_OK); return 1;
+ case DRV_INSTALL: return DRVCNF_RESTART;
+ case DRV_REMOVE: return DRVCNF_RESTART;
+ default:
+ return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
+ }
+}
More information about the wine-cvs
mailing list