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)
22 MMRESULT
HelloWorld(PSOUND_DEVICE_INSTANCE Instance
, PVOID String
)
24 PWSTR WString
= (PWSTR
) String
;
26 return MMSYSERR_NOTSUPPORTED
;
31 Standard MME driver entry-point for messages relating to wave audio
42 MMRESULT Result
= MMSYSERR_NOTSUPPORTED
;
44 AcquireEntrypointMutex(WAVE_OUT_DEVICE_TYPE
);
46 SND_TRACE(L
"wodMessage - Message type %d\n", Message
);
50 case WODM_GETNUMDEVS
:
52 Result
= GetSoundDeviceCount(WAVE_OUT_DEVICE_TYPE
);
56 case WODM_GETDEVCAPS
:
58 Result
= MmeGetSoundDeviceCapabilities(WAVE_OUT_DEVICE_TYPE
,
67 Result
= MmeOpenWaveDevice(WAVE_OUT_DEVICE_TYPE
,
69 (LPWAVEOPENDESC
) Parameter1
,
71 (DWORD
*) PrivateHandle
);
77 Result
= MmeCloseDevice(PrivateHandle
);
84 /* TODO: Do we need to pass 2nd parameter? */
85 Result
= MmePrepareWaveHeader(PrivateHandle
, Parameter1
);
91 Result
= MmeUnprepareWaveHeader(PrivateHandle
, Parameter1
);
97 Result
= MmeSubmitWaveHeader(PrivateHandle
, Parameter1
);
104 /* Hacky code to test the threading */
105 PSOUND_DEVICE_INSTANCE Instance
= (PSOUND_DEVICE_INSTANCE
)PrivateHandle
;
106 CallSoundThread(Instance
->Thread
, HelloWorld
, Instance
, L
"Hello World!");
107 CallSoundThread(Instance
->Thread
, HelloWorld
, Instance
, L
"Hello Universe!");
113 SND_TRACE(L
"wodMessage returning MMRESULT %d\n", Result
);
115 ReleaseEntrypointMutex(WAVE_OUT_DEVICE_TYPE
);