Author: janderwald
Date: Sat Jan 2 02:53:22 2010
New Revision: 44873
URL:
http://svn.reactos.org/svn/reactos?rev=44873&view=rev
Log:
[WDMAUD.DRV]
- Implement AllocEventData, FreeEventData for mmixer library
Modified:
trunk/reactos/dll/win32/wdmaud.drv/mmixer.c
trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild
Modified: trunk/reactos/dll/win32/wdmaud.drv/mmixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/mmixe…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] Sat Jan 2 02:53:22 2010
@@ -20,6 +20,8 @@
MIXER_STATUS OpenKey(IN HANDLE hKey, IN LPWSTR SubKey, IN ULONG DesiredAccess, OUT
PHANDLE OutKey);
MIXER_STATUS CloseKey(IN HANDLE hKey);
MIXER_STATUS QueryKeyValue(IN HANDLE hKey, IN LPWSTR KeyName, OUT PVOID * ResultBuffer,
OUT PULONG ResultLength, OUT PULONG KeyType);
+PVOID AllocEventData(IN ULONG ExtraSize);
+VOID FreeEventData(IN PVOID EventData);
MIXER_CONTEXT MixerContext =
{
@@ -33,7 +35,9 @@
Copy,
OpenKey,
QueryKeyValue,
- CloseKey
+ CloseKey,
+ AllocEventData,
+ FreeEventData
};
GUID CategoryGuid = {STATIC_KSCATEGORY_AUDIO};
@@ -284,6 +288,35 @@
return Status;
}
+
+PVOID
+AllocEventData(
+ IN ULONG ExtraSize)
+{
+ PKSEVENTDATA Data = (PKSEVENTDATA)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(KSEVENTDATA) + ExtraSize);
+ if (!Data)
+ return NULL;
+
+ Data->EventHandle.Event = CreateEventW(NULL, FALSE, FALSE, NULL);
+ if (!Data->EventHandle.Event)
+ {
+ HeapFree(GetProcessHeap(), 0, Data);
+ return NULL;
+ }
+
+ Data->NotificationType = KSEVENTF_EVENT_HANDLE;
+ return Data;
+}
+
+VOID
+FreeEventData(IN PVOID EventData)
+{
+ PKSEVENTDATA Data = (PKSEVENTDATA)EventData;
+
+ CloseHandle(Data->EventHandle.Event);
+ HeapFree(GetProcessHeap(), 0, Data);
+}
+
BOOL
WdmAudInitUserModeMixer()
Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmau…
==============================================================================
--- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild [iso-8859-1] Sat Jan 2 02:53:22
2010
@@ -5,7 +5,7 @@
<include base="wdmaud_kernel">.</include>
<include base="mmixer">.</include>
<include base="libsamplerate">.</include>
- <!-- <define name="USE_MMIXER_LIB">1</define> Enable this line
to bypass wdmaud + sysaudio -->
+ <define name="USE_MMIXER_LIB">1</define>
<!-- <define name="USERMODE_MIXER">1</define> Enable this line
to for usermode mixing support -->
<library>mmebuddy</library>
<library>ntdll</library>