2 * PROJECT: ReactOS Sound System "MME Buddy" Library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/drivers/sound/mmebuddy/wave/wodMessage.c
6 * PURPOSE: Provides the wodMessage exported function, as required by
7 * the MME API, for wave output device support.
9 * PROGRAMMERS: Andrew Greenwood (silverblade@reactos.org)
21 MMRESULT
HelloWorld(PSOUND_DEVICE_INSTANCE Instance
, PVOID String
)
23 PWSTR WString
= (PWSTR
) String
;
25 return MMSYSERR_NOTSUPPORTED
;
30 Standard MME driver entry-point for messages relating to wave audio
41 MMRESULT Result
= MMSYSERR_NOTSUPPORTED
;
43 AcquireEntrypointMutex(WAVE_OUT_DEVICE_TYPE
);
45 SND_TRACE(L
"wodMessage - Message type %d\n", Message
);
49 case WODM_GETNUMDEVS
:
51 Result
= GetSoundDeviceCount(WAVE_OUT_DEVICE_TYPE
);
55 case WODM_GETDEVCAPS
:
57 Result
= MmeGetSoundDeviceCapabilities(WAVE_OUT_DEVICE_TYPE
,
66 Result
= MmeOpenWaveDevice(WAVE_OUT_DEVICE_TYPE
,
68 (LPWAVEOPENDESC
) Parameter1
,
70 (DWORD
*) PrivateHandle
);
76 Result
= MmeCloseDevice(PrivateHandle
);
83 /* TODO: Do we need to pass 2nd parameter? */
84 Result
= MmePrepareWaveHeader(PrivateHandle
, Parameter1
);
90 Result
= MmeUnprepareWaveHeader(PrivateHandle
, Parameter1
);
96 Result
= MmeSubmitWaveHeader(PrivateHandle
, Parameter1
);
103 /* Hacky code to test the threading */
104 PSOUND_DEVICE_INSTANCE Instance
= (PSOUND_DEVICE_INSTANCE
)PrivateHandle
;
105 CallSoundThread(Instance
->Thread
, HelloWorld
, Instance
, L
"Hello World!");
106 CallSoundThread(Instance
->Thread
, HelloWorld
, Instance
, L
"Hello Universe!");
112 SND_TRACE(L
"wodMessage returning MMRESULT %d\n", Result
);
114 ReleaseEntrypointMutex(WAVE_OUT_DEVICE_TYPE
);