2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2009-12-07 10:28:49 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
MM_STATUS_SUCCESS = 0,
|
|
|
|
MM_STATUS_NOTINITIALIZED,
|
|
|
|
MM_STATUS_NOT_IMPLEMENTED,
|
|
|
|
MM_STATUS_NO_MORE_DEVICES,
|
|
|
|
MM_STATUS_MORE_ENTRIES,
|
|
|
|
MM_STATUS_INVALID_PARAMETER,
|
|
|
|
MM_STATUS_UNSUCCESSFUL,
|
|
|
|
MM_STATUS_NO_MEMORY
|
|
|
|
|
|
|
|
|
|
|
|
}MIXER_STATUS;
|
|
|
|
|
|
|
|
|
|
|
|
typedef PVOID (*PMIXER_ALLOC)(
|
|
|
|
IN ULONG NumberOfBytes);
|
|
|
|
|
|
|
|
typedef VOID (*PMIXER_FREE)(
|
|
|
|
IN PVOID Block);
|
|
|
|
|
|
|
|
typedef MIXER_STATUS (*PMIXER_ENUM)(
|
|
|
|
IN PVOID EnumContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
OUT LPWSTR * DeviceName,
|
2009-12-18 10:25:41 +00:00
|
|
|
OUT PHANDLE OutHandle,
|
|
|
|
OUT PHANDLE OutDevInterfaceKey);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
|
|
|
typedef MIXER_STATUS(*PMIXER_DEVICE_CONTROL)(
|
|
|
|
IN HANDLE hMixer,
|
|
|
|
IN ULONG dwIoControlCode,
|
|
|
|
IN PVOID lpInBuffer,
|
|
|
|
IN ULONG nInBufferSize,
|
|
|
|
OUT PVOID lpOutBuffer,
|
|
|
|
ULONG nOutBufferSize,
|
|
|
|
PULONG lpBytesReturned);
|
|
|
|
|
2009-12-08 21:10:02 +00:00
|
|
|
typedef MIXER_STATUS(*PMIXER_OPEN)(
|
2009-12-10 12:27:16 +00:00
|
|
|
IN LPWSTR DevicePath,
|
2009-12-08 21:10:02 +00:00
|
|
|
OUT PHANDLE hDevice);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
2009-12-08 21:10:02 +00:00
|
|
|
typedef MIXER_STATUS(*PMIXER_CLOSE)(
|
|
|
|
IN HANDLE hDevice);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
2009-12-18 10:25:41 +00:00
|
|
|
typedef MIXER_STATUS(*PMIXER_CLOSEKEY)(
|
|
|
|
IN HANDLE hKey);
|
|
|
|
|
2009-12-07 10:28:49 +00:00
|
|
|
typedef VOID (*PMIXER_EVENT)(
|
2010-10-15 02:24:35 +00:00
|
|
|
IN PVOID MixerEventContext,
|
|
|
|
IN HANDLE hMixer,
|
|
|
|
IN ULONG NotificationType,
|
|
|
|
IN ULONG Value);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
2009-12-09 16:00:28 +00:00
|
|
|
typedef VOID (*PMIXER_COPY)(
|
|
|
|
IN PVOID Dst,
|
|
|
|
IN PVOID Src,
|
|
|
|
IN ULONG Length);
|
|
|
|
|
2009-12-18 10:25:41 +00:00
|
|
|
typedef MIXER_STATUS(*PMIXER_QUERY_KEY_VALUE)(
|
|
|
|
IN HANDLE hKey,
|
|
|
|
IN LPWSTR KeyName,
|
|
|
|
OUT PVOID * ResultBuffer,
|
|
|
|
OUT PULONG ResultLength,
|
|
|
|
OUT PULONG KeyType);
|
|
|
|
|
|
|
|
typedef MIXER_STATUS(*PMIXER_OPEN_KEY)(
|
|
|
|
IN HANDLE hKey,
|
|
|
|
IN LPWSTR SubKey,
|
|
|
|
IN ULONG DesiredAccess,
|
|
|
|
OUT PHANDLE OutKey);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
2010-01-02 01:52:12 +00:00
|
|
|
typedef PVOID (*PMIXER_ALLOC_EVENT_DATA)(
|
|
|
|
IN ULONG ExtraBytes);
|
|
|
|
|
|
|
|
typedef VOID (*PMIXER_FREE_EVENT_DATA)(
|
|
|
|
IN PVOID EventData);
|
|
|
|
|
2010-02-11 21:04:57 +00:00
|
|
|
typedef MIXER_STATUS (*PIN_CREATE_CALLBACK)(
|
|
|
|
IN PVOID Context,
|
|
|
|
IN ULONG DeviceId,
|
|
|
|
IN ULONG PinId,
|
|
|
|
IN HANDLE hFilter,
|
|
|
|
IN PKSPIN_CONNECT PinConnect,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PHANDLE PinHandle);
|
|
|
|
|
2009-12-07 10:28:49 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
ULONG SizeOfStruct;
|
|
|
|
PVOID MixerContext;
|
|
|
|
|
|
|
|
PMIXER_ALLOC Alloc;
|
|
|
|
PMIXER_DEVICE_CONTROL Control;
|
|
|
|
PMIXER_FREE Free;
|
2009-12-08 21:10:02 +00:00
|
|
|
PMIXER_OPEN Open;
|
|
|
|
PMIXER_CLOSE Close;
|
2009-12-09 16:00:28 +00:00
|
|
|
PMIXER_COPY Copy;
|
2009-12-18 10:25:41 +00:00
|
|
|
PMIXER_OPEN_KEY OpenKey;
|
|
|
|
PMIXER_QUERY_KEY_VALUE QueryKeyValue;
|
|
|
|
PMIXER_CLOSEKEY CloseKey;
|
2010-01-02 01:52:12 +00:00
|
|
|
PMIXER_ALLOC_EVENT_DATA AllocEventData;
|
|
|
|
PMIXER_FREE_EVENT_DATA FreeEventData;
|
2009-12-07 10:28:49 +00:00
|
|
|
}MIXER_CONTEXT, *PMIXER_CONTEXT;
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerInitialize(
|
2009-12-09 09:51:39 +00:00
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
2009-12-07 10:28:49 +00:00
|
|
|
IN PMIXER_ENUM EnumFunction,
|
|
|
|
IN PVOID EnumContext);
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
MMixerGetCount(
|
|
|
|
IN PMIXER_CONTEXT MixerContext);
|
|
|
|
|
2009-12-20 00:55:55 +00:00
|
|
|
ULONG
|
|
|
|
MMixerGetWaveInCount(
|
|
|
|
IN PMIXER_CONTEXT MixerContext);
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
MMixerGetWaveOutCount(
|
|
|
|
IN PMIXER_CONTEXT MixerContext);
|
|
|
|
|
2010-10-31 14:34:41 +00:00
|
|
|
ULONG
|
|
|
|
MMixerGetMidiInCount(
|
|
|
|
IN PMIXER_CONTEXT MixerContext);
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
MMixerGetMidiOutCount(
|
|
|
|
IN PMIXER_CONTEXT MixerContext);
|
|
|
|
|
|
|
|
|
2009-12-20 00:55:55 +00:00
|
|
|
|
2009-12-07 10:28:49 +00:00
|
|
|
MIXER_STATUS
|
|
|
|
MMixerGetCapabilities(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG MixerIndex,
|
2009-12-09 09:51:39 +00:00
|
|
|
OUT LPMIXERCAPSW MixerCaps);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerOpen(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
2009-12-09 16:00:28 +00:00
|
|
|
IN ULONG MixerId,
|
2010-10-15 02:24:35 +00:00
|
|
|
IN PVOID MixerEventContext,
|
2009-12-07 10:28:49 +00:00
|
|
|
IN PMIXER_EVENT MixerEventRoutine,
|
|
|
|
OUT PHANDLE MixerHandle);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerGetLineInfo(
|
2009-12-09 09:51:39 +00:00
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
2009-12-07 10:28:49 +00:00
|
|
|
IN HANDLE MixerHandle,
|
|
|
|
IN ULONG Flags,
|
|
|
|
OUT LPMIXERLINEW MixerLine);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerGetLineControls(
|
2009-12-09 09:51:39 +00:00
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
2009-12-07 10:28:49 +00:00
|
|
|
IN HANDLE MixerHandle,
|
|
|
|
IN ULONG Flags,
|
2009-12-20 00:55:55 +00:00
|
|
|
OUT LPMIXERLINECONTROLSW MixerLineControls);
|
2009-12-07 10:28:49 +00:00
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerSetControlDetails(
|
2009-12-09 09:51:39 +00:00
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
2009-12-07 10:28:49 +00:00
|
|
|
IN HANDLE MixerHandle,
|
|
|
|
IN ULONG Flags,
|
|
|
|
OUT LPMIXERCONTROLDETAILS MixerControlDetails);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerGetControlDetails(
|
2009-12-09 09:51:39 +00:00
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
2009-12-07 10:28:49 +00:00
|
|
|
IN HANDLE MixerHandle,
|
|
|
|
IN ULONG Flags,
|
|
|
|
OUT LPMIXERCONTROLDETAILS MixerControlDetails);
|
|
|
|
|
2009-12-20 00:55:55 +00:00
|
|
|
MIXER_STATUS
|
|
|
|
MMixerWaveOutCapabilities(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
OUT LPWAVEOUTCAPSW Caps);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerWaveInCapabilities(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
OUT LPWAVEINCAPSW Caps);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerOpenWave(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
IN ULONG bWaveIn,
|
|
|
|
IN LPWAVEFORMATEX WaveFormat,
|
2010-02-11 21:04:57 +00:00
|
|
|
IN PIN_CREATE_CALLBACK CreateCallback,
|
|
|
|
IN PVOID Context,
|
2009-12-20 00:55:55 +00:00
|
|
|
OUT PHANDLE PinHandle);
|
|
|
|
|
2009-12-23 02:49:18 +00:00
|
|
|
MIXER_STATUS
|
|
|
|
MMixerSetWaveStatus(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN HANDLE PinHandle,
|
|
|
|
IN KSSTATE State);
|
|
|
|
|
2010-02-12 06:18:31 +00:00
|
|
|
MIXER_STATUS
|
|
|
|
MMixerGetWaveDevicePath(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG bWaveIn,
|
|
|
|
IN ULONG DeviceId,
|
|
|
|
OUT LPWSTR * DevicePath);
|
2010-10-31 14:34:41 +00:00
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerMidiOutCapabilities(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
OUT LPMIDIOUTCAPSW Caps);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerMidiInCapabilities(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
OUT LPMIDIINCAPSW Caps);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerGetMidiDevicePath(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG bMidiIn,
|
|
|
|
IN ULONG DeviceId,
|
|
|
|
OUT LPWSTR * DevicePath);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerSetMidiStatus(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN HANDLE PinHandle,
|
|
|
|
IN KSSTATE State);
|
|
|
|
|
|
|
|
MIXER_STATUS
|
|
|
|
MMixerOpenMidi(
|
|
|
|
IN PMIXER_CONTEXT MixerContext,
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
IN ULONG bMidiIn,
|
|
|
|
IN PIN_CREATE_CALLBACK CreateCallback,
|
|
|
|
IN PVOID Context,
|
|
|
|
OUT PHANDLE PinHandle);
|