fusion: Implement CreateAssemblyCache.
[wine.git] / dlls / wineoss.drv / oss.c
blob2632cd45b0153901a78e1fcd56e9c41b9583de25
1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
2 /*
3 * Wine Driver for Open Sound System
5 * Copyright 1999 Eric Pouech
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "config.h"
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wingdi.h"
29 #include "winuser.h"
30 #include "mmddk.h"
31 #include "oss.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(wave);
36 #ifdef HAVE_OSS
38 /**************************************************************************
39 * OSS_drvLoad [internal]
41 static LRESULT OSS_drvLoad(void)
43 TRACE("()\n");
44 OSS_WaveInit();
45 OSS_MidiInit();
46 OSS_MixerInit();
47 OSS_AuxInit();
48 return 1;
51 /**************************************************************************
52 * OSS_drvFree [internal]
54 static LRESULT OSS_drvFree(void)
56 TRACE("()\n");
57 OSS_WaveExit();
58 OSS_MidiExit();
59 OSS_MixerExit();
60 OSS_AuxExit();
61 return 1;
64 /**************************************************************************
65 * OSS_drvOpen [internal]
67 static LRESULT OSS_drvOpen(LPSTR str)
69 TRACE("(%s)\n", str);
70 return 1;
73 /**************************************************************************
74 * OSS_drvClose [internal]
76 static LRESULT OSS_drvClose(DWORD_PTR dwDevID)
78 TRACE("(%08lx)\n", dwDevID);
79 return 1;
82 #endif
85 /**************************************************************************
86 * DriverProc (WINEOSS.1)
88 LRESULT CALLBACK OSS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
89 LPARAM dwParam1, LPARAM dwParam2)
91 TRACE("(%08lX, %p, %08X, %08lX, %08lX)\n",
92 dwDevID, hDriv, wMsg, dwParam1, dwParam2);
94 switch(wMsg) {
95 #ifdef HAVE_OSS
96 case DRV_LOAD: return OSS_drvLoad();
97 case DRV_FREE: return OSS_drvFree();
98 case DRV_OPEN: return OSS_drvOpen((LPSTR)dwParam1);
99 case DRV_CLOSE: return OSS_drvClose(dwDevID);
100 case DRV_ENABLE: return 1;
101 case DRV_DISABLE: return 1;
102 case DRV_QUERYCONFIGURE: return 1;
103 case DRV_CONFIGURE: MessageBoxA(0, "OSS MultiMedia Driver !", "OSS Driver", MB_OK); return 1;
104 case DRV_INSTALL: return DRVCNF_RESTART;
105 case DRV_REMOVE: return DRVCNF_RESTART;
106 #endif
107 default:
108 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);