Documentation fixes.
[wine] / dlls / winmm / wineoss / oss.c
1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
2 /*                                 
3  * Wine Driver for Open Sound System
4  *
5  * Copyright    1999 Eric Pouech
6  */
7
8 #include "config.h"
9
10 #include "windef.h"
11 #include "winbase.h"
12 #include "wingdi.h"
13 #include "winuser.h"
14 #include "mmddk.h"
15 #include "oss.h"
16
17 #ifdef HAVE_OSS
18
19 static  struct WINE_OSS* oss = NULL;
20
21 /**************************************************************************
22  *                              OSS_drvOpen                     [internal]      
23  */
24 static  DWORD   OSS_drvOpen(LPSTR str)
25 {
26     if (oss)
27         return 0;
28     
29     /* I know, this is ugly, but who cares... */
30     oss = (struct WINE_OSS*)1;
31     return 1;
32 }
33
34 /**************************************************************************
35  *                              OSS_drvClose                    [internal]      
36  */
37 static  DWORD   OSS_drvClose(DWORD dwDevID)
38 {
39     if (oss) {
40         oss = NULL;
41         return 1;
42     }
43     return 0;
44 }
45
46 #endif
47
48
49 /**************************************************************************
50  *                              DriverProc (WINEOSS.1)
51  */
52 LONG CALLBACK   OSS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
53                                DWORD dwParam1, DWORD dwParam2)
54 {
55 /* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
56 /* EPP    dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
57     
58     switch(wMsg) {
59 #ifdef HAVE_OSS
60     case DRV_LOAD:              OSS_WaveInit(); 
61 #ifdef HAVE_OSS_MIDI
62                                 OSS_MidiInit(); 
63 #endif
64                                 return 1;
65     case DRV_FREE:              return 1;
66     case DRV_OPEN:              return OSS_drvOpen((LPSTR)dwParam1);
67     case DRV_CLOSE:             return OSS_drvClose(dwDevID);
68     case DRV_ENABLE:            return 1;
69     case DRV_DISABLE:           return 1;
70     case DRV_QUERYCONFIGURE:    return 1;
71     case DRV_CONFIGURE:         MessageBoxA(0, "OSS MultiMedia Driver !", "OSS Driver", MB_OK); return 1;
72     case DRV_INSTALL:           return DRVCNF_RESTART;
73     case DRV_REMOVE:            return DRVCNF_RESTART;
74 #endif
75     default:
76         return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
77     }
78 }
79
80