[MMIXER] Cleanup mixer notifications opened by an application when it is closed.
[reactos.git] / reactos / drivers / wdm / audio / legacy / wdmaud / wdmaud.h
index d1d2bcc..04d8975 100644 (file)
@@ -1,16 +1,8 @@
-#include <pseh/pseh2.h>
-#include <ntddk.h>
+#ifndef _WDMAUD_PCH_
+#define _WDMAUD_PCH_
+
 #include <portcls.h>
-#include <ks.h>
-#define NDEBUG
-#include <debug.h>
-#include <ksmedia.h>
-#include <mmreg.h>
 #include <mmsystem.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "mmixer.h"
 
 #include "interface.h"
 
@@ -19,6 +11,7 @@ typedef struct
     PMDL Mdl;
     ULONG Length;
     ULONG Function;
+    PFILE_OBJECT FileObject;
 }WDMAUD_COMPLETION_CONTEXT, *PWDMAUD_COMPLETION_CONTEXT;
 
 
@@ -67,8 +60,14 @@ typedef struct
     LIST_ENTRY SysAudioDeviceList;
     HANDLE hSysAudio;
     PFILE_OBJECT FileObject;
-
     LIST_ENTRY WdmAudClientList;
+
+    ULONG SysAudioDeviceCount;
+    PIO_WORKITEM WorkItem;
+    KEVENT InitializationCompletionEvent;
+    ULONG WorkItemActive;
+
+    PDEVICE_OBJECT NextDeviceObject;
 }WDMAUD_DEVICE_EXTENSION, *PWDMAUD_DEVICE_EXTENSION;
 
 typedef struct
@@ -129,6 +128,14 @@ WdmAudControlOpenMixer(
     IN  PWDMAUD_DEVICE_INFO DeviceInfo,
     IN  PWDMAUD_CLIENT ClientInfo);
 
+NTSTATUS
+WdmAudControlCloseMixer(
+    IN  PDEVICE_OBJECT DeviceObject,
+    IN  PIRP Irp,
+    IN  PWDMAUD_DEVICE_INFO DeviceInfo,
+    IN  PWDMAUD_CLIENT ClientInfo,
+    IN  ULONG Index);
+
 NTSTATUS
 WdmAudControlOpenWave(
     IN  PDEVICE_OBJECT DeviceObject,
@@ -315,3 +322,4 @@ VOID
 FreeItem(
     IN PVOID Item);
 
+#endif /* _WDMAUD_PCH_ */