Closing of wave output devices is functional and terminates the sound thread
[reactos.git] / reactos / lib / drivers / sound / mmebuddy / mixer / mxdMessage.c
1 /*
2 * PROJECT: ReactOS Sound System "MME Buddy" Library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/sound/mmebuddy/mixer/mxdMessage.c
5 *
6 * PURPOSE: Provides the mxdMessage exported function, as required by
7 * the MME API, for mixer device support.
8 *
9 * PROGRAMMERS: Andrew Greenwood (silverblade@reactos.org)
10 */
11
12 #include <windows.h>
13 #include <mmsystem.h>
14 #include <mmddk.h>
15
16 #include <ntddsnd.h>
17 #include <sndtypes.h>
18
19 #include <mmebuddy.h>
20
21 /*
22 Standard MME driver entry-point for messages relating to mixers.
23 */
24 APIENTRY DWORD
25 mxdMessage(
26 DWORD DeviceId,
27 DWORD Message,
28 DWORD PrivateHandle,
29 DWORD Parameter1,
30 DWORD Parameter2)
31 {
32 MMRESULT Result = MMSYSERR_NOTSUPPORTED;
33
34 AcquireEntrypointMutex(MIXER_DEVICE_TYPE);
35
36 SND_TRACE(L"mxdMessage - Message type %d\n", Message);
37
38 switch ( Message )
39 {
40 case MXDM_GETNUMDEVS :
41 {
42 Result = GetSoundDeviceCount(MIXER_DEVICE_TYPE);
43 break;
44 }
45
46 case MXDM_GETDEVCAPS :
47 {
48 Result = MmeGetSoundDeviceCapabilities(MIXER_DEVICE_TYPE,
49 DeviceId,
50 (PVOID) Parameter1,
51 Parameter2);
52 break;
53 }
54
55 case MXDM_INIT :
56 {
57 break;
58 }
59
60 case MXDM_OPEN :
61 {
62 break;
63 }
64
65 case MXDM_CLOSE :
66 {
67 break;
68 }
69
70 case MXDM_GETCONTROLDETAILS :
71 {
72 break;
73 }
74
75 case MXDM_SETCONTROLDETAILS :
76 {
77 break;
78 }
79
80 case MXDM_GETLINECONTROLS :
81 {
82 break;
83 }
84
85 case MXDM_GETLINEINFO :
86 {
87 break;
88 }
89 }
90
91 SND_TRACE(L"mxdMessage returning MMRESULT %d\n", Result);
92
93 ReleaseEntrypointMutex(MIXER_DEVICE_TYPE);
94
95 return Result;
96 }