Sync to trunk head (r42241)
[reactos.git] / reactos / include / reactos / libs / sound / mmebuddy.h
index 071077b..35b7407 100644 (file)
@@ -156,11 +156,12 @@ struct _SOUND_DEVICE_INSTANCE;
 #define DEFINE_GETCAPS_FUNCTYPE(func_typename, caps_type) \
     typedef MMRESULT (*func_typename)( \
         IN  struct _SOUND_DEVICE* SoundDevice, \
+        IN  DWORD DeviceId, \
         OUT caps_type Capabilities, \
         IN  DWORD CapabilitiesSize);
 
 /* This one is for those of us who don't care */
-DEFINE_GETCAPS_FUNCTYPE(MMGETCAPS_FUNC, DWORD_PTR);
+DEFINE_GETCAPS_FUNCTYPE(MMGETCAPS_FUNC, PVOID);
 
 /* These are for those of us that do */
 DEFINE_GETCAPS_FUNCTYPE(MMGETWAVEOUTCAPS_FUNC, LPWAVEOUTCAPS);
@@ -201,6 +202,7 @@ typedef MMRESULT (*MMWAVEQUERYFORMATSUPPORT_FUNC)(
 
 typedef MMRESULT (*MMWAVESETFORMAT_FUNC)(
     IN  struct _SOUND_DEVICE_INSTANCE* Instance,
+    IN  DWORD DeviceId,
     IN  PWAVEFORMATEX WaveFormat,
     IN  DWORD WaveFormatSize);
 
@@ -221,6 +223,10 @@ typedef MMRESULT (*MMBUFFER_FUNC)(
     IN  PVOID Buffer,
     IN  DWORD Length);
 
+typedef MMRESULT(*MMGETPOS_FUNC)(
+    IN  struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
+    IN  MMTIME* Time);
+
 typedef struct _MMFUNCTION_TABLE
 {
     union
@@ -240,6 +246,8 @@ typedef struct _MMFUNCTION_TABLE
 
     WAVE_COMMIT_FUNC                CommitWaveBuffer;
 
+    MMGETPOS_FUNC                   GetPos;
+
     // Redundant
     //MMWAVEHEADER_FUNC               PrepareWaveHeader;
     //MMWAVEHEADER_FUNC               UnprepareWaveHeader;
@@ -319,6 +327,8 @@ typedef struct _SOUND_DEVICE_INSTANCE
     //PWAVEHDR CurrentWaveHeader;
     DWORD OutstandingBuffers;
     DWORD LoopsRemaining;
+    DWORD FrameSize;
+    DWORD BufferCount;
 } SOUND_DEVICE_INSTANCE, *PSOUND_DEVICE_INSTANCE;
 
 /* This lives in WAVEHDR.reserved */
@@ -377,6 +387,15 @@ MMRESULT
 MmeCloseDevice(
     IN  DWORD_PTR PrivateHandle);
 
+MMRESULT
+MmeGetPosition(
+    IN  MMDEVICE_TYPE DeviceType,
+    IN  DWORD DeviceId,
+    IN  DWORD PrivateHandle,
+    IN  MMTIME* Time,
+    IN  DWORD Size);
+
+
 #define MmePrepareWaveHeader(private_handle, header) \
     PrepareWaveHeader((PSOUND_DEVICE_INSTANCE)private_handle, (PWAVEHDR)header)
 
@@ -398,7 +417,8 @@ MmeResetWavePlayback(
 MMRESULT
 GetSoundDeviceCapabilities(
     IN  PSOUND_DEVICE SoundDevice,
-    OUT DWORD_PTR Capabilities,
+    IN  DWORD DeviceId,
+    OUT PVOID Capabilities,
     IN  DWORD CapabilitiesSize);
 
 
@@ -564,6 +584,7 @@ QueryWaveDeviceFormatSupport(
 MMRESULT
 SetWaveDeviceFormat(
     IN  PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
+    IN  DWORD DeviceId,
     IN  LPWAVEFORMATEX Format,
     IN  DWORD FormatSize);