Fixed header dependencies to be fully compatible with the Windows
[wine/multimedia.git] / dlls / winmm / winearts / arts.c
blob3e9d86815c66ceaf73cfbf88db606e3282204d7c
1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
2 /*
3 * Wine Driver for aRts Sound Server
4 * http://www.arts-project.org
6 * Copyright 2002 Chris Morgan<cmorgan@alum.wpi.edu>
7 * Code massively copied from Eric Pouech's OSS driver
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include "config.h"
26 #include <stdarg.h>
28 #include "windef.h"
29 #include "winbase.h"
30 #include "wingdi.h"
31 #include "winuser.h"
32 #include "mmddk.h"
33 #include "arts.h"
35 #ifdef HAVE_ARTS
36 static int arts = 0;
38 /**************************************************************************
39 * ARTS_drvOpen [internal]
41 static DWORD ARTS_drvOpen(LPSTR str)
43 if (arts)
44 return 0;
46 /* I know, this is ugly, but who cares... */
47 arts = 1;
48 return 1;
51 /**************************************************************************
52 * ARTS_drvClose [internal]
54 static DWORD ARTS_drvClose(DWORD dwDevID)
56 if (arts) {
57 arts = 0;
58 return 1;
60 return 0;
62 #endif /* #ifdef HAVE_ARTS */
65 /**************************************************************************
66 * DriverProc (WINEARTS.@)
68 LONG CALLBACK ARTS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
69 DWORD dwParam1, DWORD dwParam2)
71 /* EPP TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n", */
72 /* EPP dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
74 switch(wMsg) {
75 #ifdef HAVE_ARTS
76 case DRV_LOAD: ARTS_WaveInit();
77 /* ARTS_MidiInit(); FIXME: no midi
78 support in artsc so we don't have any in the arts driver */
79 return 1;
80 case DRV_FREE: return ARTS_WaveClose();
81 case DRV_OPEN: return ARTS_drvOpen((LPSTR)dwParam1);
82 case DRV_CLOSE: return ARTS_drvClose(dwDevID);
83 case DRV_ENABLE: return 1;
84 case DRV_DISABLE: return 1;
85 case DRV_QUERYCONFIGURE: return 1;
86 case DRV_CONFIGURE: MessageBoxA(0, "aRts MultiMedia Driver!", "aRts Driver", MB_OK); return 1;
87 case DRV_INSTALL: return DRVCNF_RESTART;
88 case DRV_REMOVE: return DRVCNF_RESTART;
89 #endif
90 default:
91 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);