#ifdef _MSC_VER
#pragma once
#endif // _MSC_VER
#ifndef _MMEAPI_H_
#define _MMEAPI_H_
#include <apiset.h>
#include <apisetcconv.h>
#include <mmsyscom.h> // mm common definitions
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef MMNOWAVE
#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
DECLARE_HANDLE(HWAVE);
struct
{
int
;};
typedef
struct
*
;
DECLARE_HANDLE(HWAVEIN);
struct
{
int
;};
typedef
struct
*
;
DECLARE_HANDLE(HWAVEOUT);
struct
{
int
;};
typedef
struct
*
;
typedef HWAVEIN FAR *LPHWAVEIN;
typedef HWAVEOUT FAR *LPHWAVEOUT;
typedef
;
typedef WAVECALLBACK FAR *LPWAVECALLBACK;
#define WOM_OPEN MM_WOM_OPEN
#define WOM_CLOSE MM_WOM_CLOSE
#define WOM_DONE MM_WOM_DONE
#define WIM_OPEN MM_WIM_OPEN
#define WIM_CLOSE MM_WIM_CLOSE
#define WIM_DATA MM_WIM_DATA
#define WAVE_MAPPER ((UINT)-1)
#define WAVE_FORMAT_QUERY 0x0001
#define WAVE_ALLOWSYNC 0x0002
#if (WINVER >= 0x0400)
#define WAVE_MAPPED 0x0004
#define WAVE_FORMAT_DIRECT 0x0008
#define WAVE_FORMAT_DIRECT_QUERY (WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT)
#define WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE 0x0010
#endif /* (WINVER >= 0x0400) */
typedef
struct
{
;
;
;
;
;
;
struct wavehdr_tag FAR *lpNext; /* reserved for driver */
;
} WAVEHDR, *PWAVEHDR, NEAR *NPWAVEHDR, FAR *LPWAVEHDR;
#define WHDR_DONE 0x00000001 /* done bit */
#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
#define WHDR_BEGINLOOP 0x00000004 /* loop start block */
#define WHDR_ENDLOOP 0x00000008 /* loop end block */
#define WHDR_INQUEUE 0x00000010 /* reserved for driver */
#ifdef _WIN32
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef WAVEOUTCAPSA WAVEOUTCAPS;
typedef PWAVEOUTCAPSA PWAVEOUTCAPS;
typedef NPWAVEOUTCAPSA NPWAVEOUTCAPS;
typedef LPWAVEOUTCAPSA LPWAVEOUTCAPS;
#endif // UNICODE
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef WAVEOUTCAPS2A WAVEOUTCAPS2;
typedef PWAVEOUTCAPS2A PWAVEOUTCAPS2;
typedef NPWAVEOUTCAPS2A NPWAVEOUTCAPS2;
typedef LPWAVEOUTCAPS2A LPWAVEOUTCAPS2;
#endif // UNICODE
#else
typedef struct waveoutcaps_tag {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
DWORD dwFormats; /* formats supported */
WORD wChannels; /* number of sources supported */
DWORD dwSupport; /* functionality supported by driver */
} WAVEOUTCAPS, *PWAVEOUTCAPS, NEAR *NPWAVEOUTCAPS, FAR *LPWAVEOUTCAPS;
#endif
#define WAVECAPS_PITCH 0x0001 /* supports pitch control */
#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
#define WAVECAPS_VOLUME 0x0004 /* supports volume control */
#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
#define WAVECAPS_SYNC 0x0010
#define WAVECAPS_SAMPLEACCURATE 0x0020
#ifdef _WIN32
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef WAVEINCAPSA WAVEINCAPS;
typedef PWAVEINCAPSA PWAVEINCAPS;
typedef NPWAVEINCAPSA NPWAVEINCAPS;
typedef LPWAVEINCAPSA LPWAVEINCAPS;
#endif // UNICODE
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef WAVEINCAPS2A WAVEINCAPS2;
typedef PWAVEINCAPS2A PWAVEINCAPS2;
typedef NPWAVEINCAPS2A NPWAVEINCAPS2;
typedef LPWAVEINCAPS2A LPWAVEINCAPS2;
#endif // UNICODE
#else
typedef struct waveincaps_tag {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
DWORD dwFormats; /* formats supported */
WORD wChannels; /* number of channels supported */
} WAVEINCAPS, *PWAVEINCAPS, NEAR *NPWAVEINCAPS, FAR *LPWAVEINCAPS;
#endif
#define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
#define WAVE_FORMAT_44M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
#define WAVE_FORMAT_44S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
#define WAVE_FORMAT_44M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
#define WAVE_FORMAT_44S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
#define WAVE_FORMAT_48M08 0x00001000 /* 48 kHz, Mono, 8-bit */
#define WAVE_FORMAT_48S08 0x00002000 /* 48 kHz, Stereo, 8-bit */
#define WAVE_FORMAT_48M16 0x00004000 /* 48 kHz, Mono, 16-bit */
#define WAVE_FORMAT_48S16 0x00008000 /* 48 kHz, Stereo, 16-bit */
#define WAVE_FORMAT_96M08 0x00010000 /* 96 kHz, Mono, 8-bit */
#define WAVE_FORMAT_96S08 0x00020000 /* 96 kHz, Stereo, 8-bit */
#define WAVE_FORMAT_96M16 0x00040000 /* 96 kHz, Mono, 16-bit */
#define WAVE_FORMAT_96S16 0x00080000 /* 96 kHz, Stereo, 16-bit */
#ifndef WAVE_FORMAT_PCM
typedef
struct
{
;
;
;
;
;
} WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT;
#define WAVE_FORMAT_PCM 1
typedef
struct
{
;
;
} PCMWAVEFORMAT, *PPCMWAVEFORMAT, NEAR *NPPCMWAVEFORMAT, FAR *LPPCMWAVEFORMAT;
#endif /* WAVE_FORMAT_PCM */
#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
typedef
struct
{
;
;
;
;
;
;
;
} WAVEFORMATEX, *PWAVEFORMATEX, NEAR *NPWAVEFORMATEX, FAR *LPWAVEFORMATEX;
#endif /* _WAVEFORMATEX_ */
typedef const WAVEFORMATEX FAR *LPCWAVEFORMATEX;
(
void
);
#ifdef _WIN32
(
_Out_ LPWAVEOUTCAPSA pwoc,
);
(
_Out_ LPWAVEOUTCAPSW pwoc,
);
#ifdef UNICODE
#define waveOutGetDevCaps waveOutGetDevCapsW
#else
#define waveOutGetDevCaps waveOutGetDevCapsA
#endif // !UNICODE
#else
WINMMAPI MMRESULT WINAPI waveOutGetDevCaps( UINT uDeviceID, LPWAVEOUTCAPS pwoc, UINT cbwoc);
#endif
#if (WINVER >= 0x0400)
(
);
(
);
#else
WINMMAPI MMRESULT WINAPI waveOutGetVolume(UINT uId, LPDWORD pdwVolume);
WINMMAPI MMRESULT WINAPI waveOutSetVolume(UINT uId, DWORD dwVolume);
#endif
#ifdef _WIN32
(
_Out_writes_(cchText) LPSTR pszText,
);
(
_Out_writes_(cchText) LPWSTR pszText,
);
#ifdef UNICODE
#define waveOutGetErrorText waveOutGetErrorTextW
#else
#define waveOutGetErrorText waveOutGetErrorTextA
#endif // !UNICODE
#else
MMRESULT WINAPI waveOutGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
#endif
(
_Out_opt_ LPHWAVEOUT phwo,
_In_ LPCWAVEFORMATEX pwfx,
_In_opt_ DWORD_PTR dwCallback,
_In_opt_ DWORD_PTR dwInstance,
);
(
);
(
_Inout_updates_bytes_(cbwh) LPWAVEHDR pwh,
);
(
_Inout_updates_bytes_(cbwh) LPWAVEHDR pwh,
);
(
_Inout_updates_bytes_(cbwh) LPWAVEHDR pwh,
);
(
);
(
);
(
);
(
);
(
_Inout_updates_bytes_(cbmmt) LPMMTIME pmmt,
);
(
);
(
);
(
);
(
);
(
);
#if (WINVER >= 0x030a)
#ifdef _WIN32
(
);
#else
DWORD WINAPI waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2);
#endif
#endif /* ifdef WINVER >= 0x030a */
(
void
);
#ifdef _WIN32
(
_Out_writes_bytes_(cbwic) LPWAVEINCAPSA pwic,
);
(
_Out_writes_bytes_(cbwic) LPWAVEINCAPSW pwic,
);
#ifdef UNICODE
#define waveInGetDevCaps waveInGetDevCapsW
#else
#define waveInGetDevCaps waveInGetDevCapsA
#endif // !UNICODE
#else
MMRESULT WINAPI waveInGetDevCaps(UINT uDeviceID, LPWAVEINCAPS pwic, UINT cbwic);
#endif
#ifdef _WIN32
(
_Out_writes_(cchText) LPSTR pszText,
);
(
_Out_writes_(cchText) LPWSTR pszText,
);
#ifdef UNICODE
#define waveInGetErrorText waveInGetErrorTextW
#else
#define waveInGetErrorText waveInGetErrorTextA
#endif // !UNICODE
#else
MMRESULT WINAPI waveInGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
#endif
(
_Out_opt_ LPHWAVEIN phwi,
_In_ LPCWAVEFORMATEX pwfx,
_In_opt_ DWORD_PTR dwCallback,
_In_opt_ DWORD_PTR dwInstance,
);
(
);
(
_Inout_updates_bytes_(cbwh) LPWAVEHDR pwh,
);
(
_Inout_updates_bytes_(cbwh) LPWAVEHDR pwh,
);
(
_Inout_updates_bytes_(cbwh) LPWAVEHDR pwh,
);
(
);
(
);
(
);
(
_Inout_updates_bytes_(cbmmt) LPMMTIME pmmt,
);
(
);
#if (WINVER >= 0x030a)
#ifdef _WIN32
(
);
#else
DWORD WINAPI waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2);
#endif
#endif /* ifdef WINVER >= 0x030a */
#endif /* ifndef MMNOWAVE */
#ifndef MMNOMIDI
#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
#define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no configured instruments */
#define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
#define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
#define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid MIF */
#define MIDIERR_BADOPENMODE (MIDIERR_BASE + 6) /* operation unsupported w/ open mode */
#define MIDIERR_DONT_CONTINUE (MIDIERR_BASE + 7) /* thru device 'eating' a message */
#define MIDIERR_LASTERROR (MIDIERR_BASE + 7) /* last error in range */
DECLARE_HANDLE(HMIDI);
struct
{
int
;};
typedef
struct
*
;
DECLARE_HANDLE(HMIDIIN);
struct
{
int
;};
typedef
struct
*
;
DECLARE_HANDLE(HMIDIOUT);
struct
{
int
;};
typedef
struct
*
;
DECLARE_HANDLE(HMIDISTRM);
struct
{
int
;};
typedef
struct
*
;
typedef HMIDI FAR *LPHMIDI;
typedef HMIDIIN FAR *LPHMIDIIN;
typedef HMIDIOUT FAR *LPHMIDIOUT;
typedef HMIDISTRM FAR *LPHMIDISTRM;
typedef
;
typedef MIDICALLBACK FAR *LPMIDICALLBACK;
#define MIDIPATCHSIZE 128
typedef WORD PATCHARRAY[MIDIPATCHSIZE];
typedef WORD FAR *LPPATCHARRAY;
typedef WORD KEYARRAY[MIDIPATCHSIZE];
typedef WORD FAR *LPKEYARRAY;
#define MIM_OPEN MM_MIM_OPEN
#define MIM_CLOSE MM_MIM_CLOSE
#define MIM_DATA MM_MIM_DATA
#define MIM_LONGDATA MM_MIM_LONGDATA
#define MIM_ERROR MM_MIM_ERROR
#define MIM_LONGERROR MM_MIM_LONGERROR
#define MOM_OPEN MM_MOM_OPEN
#define MOM_CLOSE MM_MOM_CLOSE
#define MOM_DONE MM_MOM_DONE
#if (WINVER >= 0x0400)
#define MIM_MOREDATA MM_MIM_MOREDATA
#define MOM_POSITIONCB MM_MOM_POSITIONCB
#endif /* WINVER >= 0x0400 */
#define MIDIMAPPER ((UINT)-1)
#define MIDI_MAPPER ((UINT)-1)
#if (WINVER >= 0x0400)
#define MIDI_IO_STATUS 0x00000020L
#endif /* WINVER >= 0x0400 */
#define MIDI_CACHE_ALL 1
#define MIDI_CACHE_BESTFIT 2
#define MIDI_CACHE_QUERY 3
#define MIDI_UNCACHE 4
#ifdef _WIN32
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef MIDIOUTCAPSA MIDIOUTCAPS;
typedef PMIDIOUTCAPSA PMIDIOUTCAPS;
typedef NPMIDIOUTCAPSA NPMIDIOUTCAPS;
typedef LPMIDIOUTCAPSA LPMIDIOUTCAPS;
#endif // UNICODE
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
;
;
;
;
;
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef MIDIOUTCAPS2A MIDIOUTCAPS2;
typedef PMIDIOUTCAPS2A PMIDIOUTCAPS2;
typedef NPMIDIOUTCAPS2A NPMIDIOUTCAPS2;
typedef LPMIDIOUTCAPS2A LPMIDIOUTCAPS2;
#endif // UNICODE
#else
typedef struct midioutcaps_tag {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
WORD wTechnology; /* type of device */
WORD wVoices; /* # of voices (internal synth only) */
WORD wNotes; /* max # of notes (internal synth only) */
WORD wChannelMask; /* channels used (internal synth only) */
DWORD dwSupport; /* functionality supported by driver */
} MIDIOUTCAPS, *PMIDIOUTCAPS, NEAR *NPMIDIOUTCAPS, FAR *LPMIDIOUTCAPS;
#endif
#define MOD_MIDIPORT 1 /* output port */
#define MOD_SYNTH 2 /* generic internal synth */
#define MOD_SQSYNTH 3 /* square wave internal synth */
#define MOD_FMSYNTH 4 /* FM internal synth */
#define MOD_MAPPER 5 /* MIDI mapper */
#define MOD_WAVETABLE 6 /* hardware wavetable synth */
#define MOD_SWSYNTH 7 /* software synth */
#define MIDICAPS_VOLUME 0x0001 /* supports volume control */
#define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
#define MIDICAPS_CACHE 0x0004
#if (WINVER >= 0x0400)
#define MIDICAPS_STREAM 0x0008 /* driver supports midiStreamOut directly */
#endif /* WINVER >= 0x0400 */
#ifdef _WIN32
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
#if (WINVER >= 0x0400)
;
#endif
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
#if (WINVER >= 0x0400)
;
#endif
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef MIDIINCAPSA MIDIINCAPS;
typedef PMIDIINCAPSA PMIDIINCAPS;
typedef NPMIDIINCAPSA NPMIDIINCAPS;
typedef LPMIDIINCAPSA LPMIDIINCAPS;
#endif // UNICODE
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
#if (WINVER >= 0x0400)
;
#endif
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
#if (WINVER >= 0x0400)
;
#endif
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef MIDIINCAPS2A MIDIINCAPS2;
typedef PMIDIINCAPS2A PMIDIINCAPS2;
typedef NPMIDIINCAPS2A NPMIDIINCAPS2;
typedef LPMIDIINCAPS2A LPMIDIINCAPS2;
#endif // UNICODE
#else
typedef struct midiincaps_tag {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
#if (WINVER >= 0x0400)
DWORD dwSupport; /* functionality supported by driver */
#endif
} MIDIINCAPS, *PMIDIINCAPS, NEAR *NPMIDIINCAPS, FAR *LPMIDIINCAPS;
#endif
typedef
struct
{
;
;
;
;
;
struct midihdr_tag far *lpNext; /* reserved for driver */
;
#if (WINVER >= 0x0400)
;
[
8
];
#endif
} MIDIHDR, *PMIDIHDR, NEAR *NPMIDIHDR, FAR *LPMIDIHDR;
#if (WINVER >= 0x0400)
typedef
struct
{
;
;
;
[
1
];
}
;
typedef
struct
{
;
;
;
}
;
#endif /* WINVER >= 0x0400 */
#define MHDR_DONE 0x00000001 /* done bit */
#define MHDR_PREPARED 0x00000002 /* set if header prepared */
#define MHDR_INQUEUE 0x00000004 /* reserved for driver */
#define MHDR_ISSTRM 0x00000008 /* Buffer is stream buffer */
#if (WINVER >= 0x0400)
#define MEVT_F_SHORT 0x00000000L
#define MEVT_F_LONG 0x80000000L
#define MEVT_F_CALLBACK 0x40000000L
#define MEVT_EVENTTYPE(x) ((BYTE)(((x)>>24)&0xFF))
#define MEVT_EVENTPARM(x) ((DWORD)((x)&0x00FFFFFFL))
#define MEVT_SHORTMSG ((BYTE)0x00) /* parm = shortmsg for midiOutShortMsg */
#define MEVT_TEMPO ((BYTE)0x01) /* parm = new tempo in microsec/qn */
#define MEVT_NOP ((BYTE)0x02) /* parm = unused; does nothing */
#define MEVT_LONGMSG ((BYTE)0x80) /* parm = bytes to send verbatim */
#define MEVT_COMMENT ((BYTE)0x82) /* parm = comment data */
#define MEVT_VERSION ((BYTE)0x84) /* parm = MIDISTRMBUFFVER struct */
#define MIDISTRM_ERROR (-2)
#define MIDIPROP_SET 0x80000000L
#define MIDIPROP_GET 0x40000000L
#define MIDIPROP_TIMEDIV 0x00000001L
#define MIDIPROP_TEMPO 0x00000002L
typedef
struct
{
;
;
} MIDIPROPTIMEDIV, FAR *LPMIDIPROPTIMEDIV;
typedef
struct
{
;
;
} MIDIPROPTEMPO, FAR *LPMIDIPROPTEMPO;
#endif /* WINVER >= 0x0400 */
(
void
);
#if (WINVER >= 0x0400)
(
_Inout_updates_(cMidi) LPUINT puDeviceID,
_In_opt_ DWORD_PTR dwCallback,
_In_opt_ DWORD_PTR dwInstance,
);
(
);
(
_Inout_updates_bytes_(sizeof(DWORD) + sizeof(DWORD)) LPBYTE lppropdata,
);
(
_Out_writes_bytes_(cbmmt) LPMMTIME lpmmt,
);
(
_Out_writes_bytes_(cbmh) LPMIDIHDR pmh,
);
(
);
(
);
(
);
#ifdef _WIN32
(
_In_opt_ LPVOID pReserved
);
(
_In_opt_ LPVOID pReserved
);
#endif
#endif /* WINVER >= 0x0400 */
#ifdef _WIN32
(
_Out_writes_bytes_(cbmoc) LPMIDIOUTCAPSA pmoc,
);
(
_Out_writes_bytes_(cbmoc) LPMIDIOUTCAPSW pmoc,
);
#ifdef UNICODE
#define midiOutGetDevCaps midiOutGetDevCapsW
#else
#define midiOutGetDevCaps midiOutGetDevCapsA
#endif // !UNICODE
#else
MMRESULT WINAPI midiOutGetDevCaps(UINT uDeviceID, LPMIDIOUTCAPS pmoc, UINT cbmoc);
#endif
#if (WINVER >= 0x0400)
(
);
(
);
#else
WINMMAPI MMRESULT WINAPI midiOutGetVolume(UINT uId, LPDWORD pdwVolume);
WINMMAPI MMRESULT WINAPI midiOutSetVolume(UINT uId, DWORD dwVolume);
#endif
#ifdef _WIN32
(
_Out_writes_(cchText) LPSTR pszText,
);
(
_Out_writes_(cchText) LPWSTR pszText,
);
#ifdef UNICODE
#define midiOutGetErrorText midiOutGetErrorTextW
#else
#define midiOutGetErrorText midiOutGetErrorTextA
#endif // !UNICODE
#else
WINMMAPI MMRESULT WINAPI midiOutGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
#endif
(
_In_opt_ DWORD_PTR dwCallback,
_In_opt_ DWORD_PTR dwInstance,
);
(
);
(
_Inout_updates_bytes_(cbmh) LPMIDIHDR pmh,
);
(
_Inout_updates_bytes_(cbmh) LPMIDIHDR pmh,
);
(
);
(
_In_reads_bytes_(cbmh) LPMIDIHDR pmh,
);
(
);
(
_In_reads_(MIDIPATCHSIZE) LPWORD pwpa,
);
(
_In_reads_(MIDIPATCHSIZE) LPWORD pwkya,
);
(
);
#if (WINVER >= 0x030a)
#ifdef _WIN32
(
);
#else
DWORD WINAPI midiOutMessage(HMIDIOUT hmo, UINT uMsg, DWORD dw1, DWORD dw2);
#endif
#endif /* ifdef WINVER >= 0x030a */
(
void
);
#ifdef _WIN32
(
_Out_writes_bytes_(cbmic) LPMIDIINCAPSA pmic,
);
(
_Out_writes_bytes_(cbmic) LPMIDIINCAPSW pmic,
);
#ifdef UNICODE
#define midiInGetDevCaps midiInGetDevCapsW
#else
#define midiInGetDevCaps midiInGetDevCapsA
#endif // !UNICODE
(
_Out_writes_(cchText) LPSTR pszText,
);
(
_Out_writes_(cchText) LPWSTR pszText,
);
#ifdef UNICODE
#define midiInGetErrorText midiInGetErrorTextW
#else
#define midiInGetErrorText midiInGetErrorTextA
#endif // !UNICODE
#else
MMRESULT WINAPI midiInGetDevCaps(UINT uDeviceID, LPMIDIINCAPS pmic, UINT cbmic);
WINMMAPI MMRESULT WINAPI midiInGetErrorText(MMRESULT mmrError, _Out_writes_(cchText) LPSTR pszText, UINT cchText);
#endif
(
_In_opt_ DWORD_PTR dwCallback,
_In_opt_ DWORD_PTR dwInstance,
);
(
);
(
_Inout_updates_bytes_(cbmh) LPMIDIHDR pmh,
);
(
_Inout_updates_bytes_(cbmh) LPMIDIHDR pmh,
);
(
_Out_writes_bytes_(cbmh) LPMIDIHDR pmh,
);
(
);
(
);
(
);
(
);
#if (WINVER >= 0x030a)
#ifdef _WIN32
(
);
#else
DWORD WINAPI midiInMessage(HMIDIIN hmi, UINT uMsg, DWORD dw1, DWORD dw2);
#endif
#endif /* ifdef WINVER >= 0x030a */
#endif /* ifndef MMNOMIDI */
#ifndef MMNOAUX
#define AUX_MAPPER ((UINT)-1)
#ifdef _WIN32
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef AUXCAPSA AUXCAPS;
typedef PAUXCAPSA PAUXCAPS;
typedef NPAUXCAPSA NPAUXCAPS;
typedef LPAUXCAPSA LPAUXCAPS;
#endif // UNICODE
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
;
;
;
;
;
;
}
, *
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
;
;
;
;
;
;
}
, *
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
typedef
;
#else
typedef AUXCAPS2A AUXCAPS2;
typedef PAUXCAPS2A PAUXCAPS2;
typedef NPAUXCAPS2A NPAUXCAPS2;
typedef LPAUXCAPS2A LPAUXCAPS2;
#endif // UNICODE
#else
typedef struct auxcaps_tag {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
WORD wTechnology; /* type of device */
DWORD dwSupport; /* functionality supported by driver */
} AUXCAPS, *PAUXCAPS, NEAR *NPAUXCAPS, FAR *LPAUXCAPS;
#endif
#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
#define AUXCAPS_VOLUME 0x0001 /* supports volume control */
#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
(
void
);
#ifdef _WIN32
(
_Out_writes_bytes_(cbac) LPAUXCAPSA pac,
);
(
_Out_writes_bytes_(cbac) LPAUXCAPSW pac,
);
#ifdef UNICODE
#define auxGetDevCaps auxGetDevCapsW
#else
#define auxGetDevCaps auxGetDevCapsA
#endif // !UNICODE
#else
MMRESULT WINAPI auxGetDevCaps(UINT uDeviceID, LPAUXCAPS pac, UINT cbac);
#endif
(
);
(
);
#if (WINVER >= 0x030a)
#ifdef _WIN32
(
);
#else
DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dw1, DWORD dw2);
#endif
#endif /* ifdef WINVER >= 0x030a */
#endif /* ifndef MMNOAUX */
#ifndef MMNOMIXER
DECLARE_HANDLE(HMIXEROBJ);
struct
{
int
;};
typedef
struct
*
;
typedef HMIXEROBJ FAR *LPHMIXEROBJ;
DECLARE_HANDLE(HMIXER);
struct
{
int
;};
typedef
struct
*
;
typedef HMIXER FAR *LPHMIXER;
#define MIXER_SHORT_NAME_CHARS 16
#define MIXER_LONG_NAME_CHARS 64
#define MIXERR_INVALLINE (MIXERR_BASE + 0)
#define MIXERR_INVALCONTROL (MIXERR_BASE + 1)
#define MIXERR_INVALVALUE (MIXERR_BASE + 2)
#define MIXERR_LASTERROR (MIXERR_BASE + 2)
#define MIXER_OBJECTF_HANDLE 0x80000000L
#define MIXER_OBJECTF_MIXER 0x00000000L
#define MIXER_OBJECTF_HMIXER (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
#define MIXER_OBJECTF_WAVEOUT 0x10000000L
#define MIXER_OBJECTF_HWAVEOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
#define MIXER_OBJECTF_WAVEIN 0x20000000L
#define MIXER_OBJECTF_HWAVEIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
#define MIXER_OBJECTF_MIDIOUT 0x30000000L
#define MIXER_OBJECTF_HMIDIOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
#define MIXER_OBJECTF_MIDIIN 0x40000000L
#define MIXER_OBJECTF_HMIDIIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
#define MIXER_OBJECTF_AUX 0x50000000L
(
void
);
#ifdef _WIN32
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name */
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name */
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MIXERCAPSA MIXERCAPS;
typedef PMIXERCAPSA PMIXERCAPS;
typedef LPMIXERCAPSA LPMIXERCAPS;
#endif // UNICODE
typedef
struct
{
;
;
;
CHAR szPname[MAXPNAMELEN]; /* product name */
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* product name */
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MIXERCAPS2A MIXERCAPS2;
typedef PMIXERCAPS2A PMIXERCAPS2;
typedef LPMIXERCAPS2A LPMIXERCAPS2;
#endif // UNICODE
#else
typedef struct tMIXERCAPS {
WORD wMid; /* manufacturer id */
WORD wPid; /* product id */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name */
DWORD fdwSupport; /* misc. support bits */
DWORD cDestinations; /* count of destinations */
} MIXERCAPS, *PMIXERCAPS, FAR *LPMIXERCAPS;
#endif
#ifdef _WIN32
(
_Out_writes_bytes_(cbmxcaps) LPMIXERCAPSA pmxcaps,
);
(
_Out_writes_bytes_(cbmxcaps) LPMIXERCAPSW pmxcaps,
);
#ifdef UNICODE
#define mixerGetDevCaps mixerGetDevCapsW
#else
#define mixerGetDevCaps mixerGetDevCapsA
#endif // !UNICODE
#else
MMRESULT WINAPI mixerGetDevCaps(UINT uMxId, LPMIXERCAPS pmxcaps, UINT cbmxcaps);
#endif
(
_In_opt_ DWORD_PTR dwCallback,
_In_opt_ DWORD_PTR dwInstance,
);
(
);
(
_In_opt_ DWORD_PTR dwParam1,
_In_opt_ DWORD_PTR dwParam2
);
#ifdef _WIN32
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
CHAR szShortName[MIXER_SHORT_NAME_CHARS];
CHAR szName[MIXER_LONG_NAME_CHARS];
struct
{
;
;
;
;
;
CHAR szPname[MAXPNAMELEN]; /* " */
}
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
WCHAR szName[MIXER_LONG_NAME_CHARS];
struct
{
;
;
;
;
;
WCHAR szPname[MAXPNAMELEN]; /* " */
}
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MIXERLINEA MIXERLINE;
typedef PMIXERLINEA PMIXERLINE;
typedef LPMIXERLINEA LPMIXERLINE;
#endif // UNICODE
#else
typedef struct tMIXERLINE {
DWORD cbStruct; /* size of MIXERLINE structure */
DWORD dwDestination; /* zero based destination index */
DWORD dwSource; /* zero based source index (if source) */
DWORD dwLineID; /* unique line id for mixer device */
DWORD fdwLine; /* state/information about line */
DWORD dwUser; /* driver specific information */
DWORD dwComponentType; /* component type line connects to */
DWORD cChannels; /* number of channels line supports */
DWORD cConnections; /* number of connections [possible] */
DWORD cControls; /* number of controls at this line */
char szShortName[MIXER_SHORT_NAME_CHARS];
char szName[MIXER_LONG_NAME_CHARS];
struct {
DWORD dwType; /* MIXERLINE_TARGETTYPE_xxxx */
DWORD dwDeviceID; /* target device ID of device type */
WORD wMid; /* of target device */
WORD wPid; /* " */
VERSION vDriverVersion; /* " */
char szPname[MAXPNAMELEN]; /* " */
} Target;
} MIXERLINE, *PMIXERLINE, FAR *LPMIXERLINE;
#endif
#define MIXERLINE_LINEF_ACTIVE 0x00000001L
#define MIXERLINE_LINEF_DISCONNECTED 0x00008000L
#define MIXERLINE_LINEF_SOURCE 0x80000000L
#define MIXERLINE_COMPONENTTYPE_DST_FIRST 0x00000000L
#define MIXERLINE_COMPONENTTYPE_DST_UNDEFINED (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
#define MIXERLINE_COMPONENTTYPE_DST_DIGITAL (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
#define MIXERLINE_COMPONENTTYPE_DST_LINE (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
#define MIXERLINE_COMPONENTTYPE_DST_MONITOR (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
#define MIXERLINE_COMPONENTTYPE_DST_HEADPHONES (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
#define MIXERLINE_COMPONENTTYPE_DST_TELEPHONE (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
#define MIXERLINE_COMPONENTTYPE_DST_WAVEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
#define MIXERLINE_COMPONENTTYPE_DST_VOICEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
#define MIXERLINE_COMPONENTTYPE_DST_LAST (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
#define MIXERLINE_COMPONENTTYPE_SRC_FIRST 0x00001000L
#define MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
#define MIXERLINE_COMPONENTTYPE_SRC_DIGITAL (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
#define MIXERLINE_COMPONENTTYPE_SRC_LINE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
#define MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
#define MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
#define MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
#define MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
#define MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
#define MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
#define MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
#define MIXERLINE_COMPONENTTYPE_SRC_ANALOG (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
#define MIXERLINE_COMPONENTTYPE_SRC_LAST (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
#define MIXERLINE_TARGETTYPE_UNDEFINED 0
#define MIXERLINE_TARGETTYPE_WAVEOUT 1
#define MIXERLINE_TARGETTYPE_WAVEIN 2
#define MIXERLINE_TARGETTYPE_MIDIOUT 3
#define MIXERLINE_TARGETTYPE_MIDIIN 4
#define MIXERLINE_TARGETTYPE_AUX 5
#ifdef _WIN32
(
_In_opt_ HMIXEROBJ hmxobj,
_Inout_ LPMIXERLINEA pmxl,
);
(
_In_opt_ HMIXEROBJ hmxobj,
_Inout_ LPMIXERLINEW pmxl,
);
#ifdef UNICODE
#define mixerGetLineInfo mixerGetLineInfoW
#else
#define mixerGetLineInfo mixerGetLineInfoA
#endif // !UNICODE
#else
MMRESULT WINAPI mixerGetLineInfo(HMIXEROBJ hmxobj, LPMIXERLINE pmxl, DWORD fdwInfo);
#endif
#define MIXER_GETLINEINFOF_DESTINATION 0x00000000L
#define MIXER_GETLINEINFOF_SOURCE 0x00000001L
#define MIXER_GETLINEINFOF_LINEID 0x00000002L
#define MIXER_GETLINEINFOF_COMPONENTTYPE 0x00000003L
#define MIXER_GETLINEINFOF_TARGETTYPE 0x00000004L
#define MIXER_GETLINEINFOF_QUERYMASK 0x0000000FL
(
_In_opt_ HMIXEROBJ hmxobj,
);
#ifdef _WIN32
typedef
struct
{
;
;
;
;
;
CHAR szShortName[MIXER_SHORT_NAME_CHARS];
CHAR szName[MIXER_LONG_NAME_CHARS];
union
{
struct
{
;
;
struct
{
;
;
[
6
];
}
;
union
{
;
;
[
6
];
}
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
WCHAR szName[MIXER_LONG_NAME_CHARS];
union
{
struct
{
;
;
struct
{
;
;
[
6
];
}
;
union
{
;
;
[
6
];
}
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MIXERCONTROLA MIXERCONTROL;
typedef PMIXERCONTROLA PMIXERCONTROL;
typedef LPMIXERCONTROLA LPMIXERCONTROL;
#endif // UNICODE
#else
typedef struct tMIXERCONTROL {
DWORD cbStruct; /* size in bytes of MIXERCONTROL */
DWORD dwControlID; /* unique control id for mixer device */
DWORD dwControlType; /* MIXERCONTROL_CONTROLTYPE_xxx */
DWORD fdwControl; /* MIXERCONTROL_CONTROLF_xxx */
DWORD cMultipleItems; /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
char szShortName[MIXER_SHORT_NAME_CHARS];
char szName[MIXER_LONG_NAME_CHARS];
union {
struct {
LONG lMinimum; /* signed minimum for this control */
LONG lMaximum; /* signed maximum for this control */
} DUMMYSTRUCTNAME;
struct {
DWORD dwMinimum; /* unsigned minimum for this control */
DWORD dwMaximum; /* unsigned maximum for this control */
} DUMMYSTRUCTNAME2;
DWORD dwReserved[6];
} Bounds;
union {
DWORD cSteps; /* # of steps between min & max */
DWORD cbCustomData; /* size in bytes of custom data */
DWORD dwReserved[6]; /* !!! needed? we have cbStruct.... */
} Metrics;
} MIXERCONTROL, *PMIXERCONTROL, FAR *LPMIXERCONTROL;
#endif
#define MIXERCONTROL_CONTROLF_UNIFORM 0x00000001L
#define MIXERCONTROL_CONTROLF_MULTIPLE 0x00000002L
#define MIXERCONTROL_CONTROLF_DISABLED 0x80000000L
#define MIXERCONTROL_CT_CLASS_MASK 0xF0000000L
#define MIXERCONTROL_CT_CLASS_CUSTOM 0x00000000L
#define MIXERCONTROL_CT_CLASS_METER 0x10000000L
#define MIXERCONTROL_CT_CLASS_SWITCH 0x20000000L
#define MIXERCONTROL_CT_CLASS_NUMBER 0x30000000L
#define MIXERCONTROL_CT_CLASS_SLIDER 0x40000000L
#define MIXERCONTROL_CT_CLASS_FADER 0x50000000L
#define MIXERCONTROL_CT_CLASS_TIME 0x60000000L
#define MIXERCONTROL_CT_CLASS_LIST 0x70000000L
#define MIXERCONTROL_CT_SUBCLASS_MASK 0x0F000000L
#define MIXERCONTROL_CT_SC_SWITCH_BOOLEAN 0x00000000L
#define MIXERCONTROL_CT_SC_SWITCH_BUTTON 0x01000000L
#define MIXERCONTROL_CT_SC_METER_POLLED 0x00000000L
#define MIXERCONTROL_CT_SC_TIME_MICROSECS 0x00000000L
#define MIXERCONTROL_CT_SC_TIME_MILLISECS 0x01000000L
#define MIXERCONTROL_CT_SC_LIST_SINGLE 0x00000000L
#define MIXERCONTROL_CT_SC_LIST_MULTIPLE 0x01000000L
#define MIXERCONTROL_CT_UNITS_MASK 0x00FF0000L
#define MIXERCONTROL_CT_UNITS_CUSTOM 0x00000000L
#define MIXERCONTROL_CT_UNITS_BOOLEAN 0x00010000L
#define MIXERCONTROL_CT_UNITS_SIGNED 0x00020000L
#define MIXERCONTROL_CT_UNITS_UNSIGNED 0x00030000L
#define MIXERCONTROL_CT_UNITS_DECIBELS 0x00040000L /* in 10ths */
#define MIXERCONTROL_CT_UNITS_PERCENT 0x00050000L /* in 10ths */
#define MIXERCONTROL_CONTROLTYPE_CUSTOM (MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM)
#define MIXERCONTROL_CONTROLTYPE_BOOLEANMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN)
#define MIXERCONTROL_CONTROLTYPE_SIGNEDMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED)
#define MIXERCONTROL_CONTROLTYPE_PEAKMETER (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
#define MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED)
#define MIXERCONTROL_CONTROLTYPE_BOOLEAN (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN)
#define MIXERCONTROL_CONTROLTYPE_ONOFF (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
#define MIXERCONTROL_CONTROLTYPE_MUTE (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
#define MIXERCONTROL_CONTROLTYPE_MONO (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
#define MIXERCONTROL_CONTROLTYPE_LOUDNESS (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
#define MIXERCONTROL_CONTROLTYPE_STEREOENH (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
#define MIXERCONTROL_CONTROLTYPE_BASS_BOOST (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 0x00002277)
#define MIXERCONTROL_CONTROLTYPE_BUTTON (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN)
#define MIXERCONTROL_CONTROLTYPE_DECIBELS (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS)
#define MIXERCONTROL_CONTROLTYPE_SIGNED (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED)
#define MIXERCONTROL_CONTROLTYPE_UNSIGNED (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED)
#define MIXERCONTROL_CONTROLTYPE_PERCENT (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT)
#define MIXERCONTROL_CONTROLTYPE_SLIDER (MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED)
#define MIXERCONTROL_CONTROLTYPE_PAN (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
#define MIXERCONTROL_CONTROLTYPE_QSOUNDPAN (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
#define MIXERCONTROL_CONTROLTYPE_FADER (MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED)
#define MIXERCONTROL_CONTROLTYPE_VOLUME (MIXERCONTROL_CONTROLTYPE_FADER + 1)
#define MIXERCONTROL_CONTROLTYPE_BASS (MIXERCONTROL_CONTROLTYPE_FADER + 2)
#define MIXERCONTROL_CONTROLTYPE_TREBLE (MIXERCONTROL_CONTROLTYPE_FADER + 3)
#define MIXERCONTROL_CONTROLTYPE_EQUALIZER (MIXERCONTROL_CONTROLTYPE_FADER + 4)
#define MIXERCONTROL_CONTROLTYPE_SINGLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
#define MIXERCONTROL_CONTROLTYPE_MUX (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
#define MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
#define MIXERCONTROL_CONTROLTYPE_MIXER (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
#define MIXERCONTROL_CONTROLTYPE_MICROTIME (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
#define MIXERCONTROL_CONTROLTYPE_MILLITIME (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
#ifdef _WIN32
typedef
struct
{
;
;
union
{
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
union
{
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MIXERLINECONTROLSA MIXERLINECONTROLS;
typedef PMIXERLINECONTROLSA PMIXERLINECONTROLS;
typedef LPMIXERLINECONTROLSA LPMIXERLINECONTROLS;
#endif // UNICODE
#else
typedef struct tMIXERLINECONTROLS {
DWORD cbStruct; /* size in bytes of MIXERLINECONTROLS */
DWORD dwLineID; /* line id (from MIXERLINE.dwLineID) */
union {
DWORD dwControlID; /* MIXER_GETLINECONTROLSF_ONEBYID */
DWORD dwControlType; /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
};
DWORD cControls; /* count of controls pmxctrl points to */
DWORD cbmxctrl; /* size in bytes of _one_ MIXERCONTROL */
LPMIXERCONTROL pamxctrl; /* pointer to first MIXERCONTROL array */
} MIXERLINECONTROLS, *PMIXERLINECONTROLS, FAR *LPMIXERLINECONTROLS;
#endif
#ifdef _WIN32
(
_In_opt_ HMIXEROBJ hmxobj,
_Inout_ LPMIXERLINECONTROLSA pmxlc,
);
(
_In_opt_ HMIXEROBJ hmxobj,
_Inout_ LPMIXERLINECONTROLSW pmxlc,
);
#ifdef UNICODE
#define mixerGetLineControls mixerGetLineControlsW
#else
#define mixerGetLineControls mixerGetLineControlsA
#endif // !UNICODE
#else
MMRESULT WINAPI mixerGetLineControls(HMIXEROBJ hmxobj, LPMIXERLINECONTROLS pmxlc, DWORD fdwControls);
#endif
#define MIXER_GETLINECONTROLSF_ALL 0x00000000L
#define MIXER_GETLINECONTROLSF_ONEBYID 0x00000001L
#define MIXER_GETLINECONTROLSF_ONEBYTYPE 0x00000002L
#define MIXER_GETLINECONTROLSF_QUERYMASK 0x0000000FL
typedef
struct
{
;
;
;
union
{
;
;
;
;
} MIXERCONTROLDETAILS, *PMIXERCONTROLDETAILS, FAR *LPMIXERCONTROLDETAILS;
#ifdef _WIN32
typedef
struct
tagMIXERCONTROLDETAILS_LISTTEXTA
{
;
;
CHAR szName[MIXER_LONG_NAME_CHARS];
}
MIXERCONTROLDETAILS_LISTTEXTA
, *
PMIXERCONTROLDETAILS_LISTTEXTA
, *
LPMIXERCONTROLDETAILS_LISTTEXTA
;
typedef
struct
tagMIXERCONTROLDETAILS_LISTTEXTW
{
;
;
WCHAR szName[MIXER_LONG_NAME_CHARS];
}
MIXERCONTROLDETAILS_LISTTEXTW
, *
PMIXERCONTROLDETAILS_LISTTEXTW
, *
LPMIXERCONTROLDETAILS_LISTTEXTW
;
#ifdef UNICODE
typedef
MIXERCONTROLDETAILS_LISTTEXTW
MIXERCONTROLDETAILS_LISTTEXT
;
typedef
PMIXERCONTROLDETAILS_LISTTEXTW
PMIXERCONTROLDETAILS_LISTTEXT
;
typedef
LPMIXERCONTROLDETAILS_LISTTEXTW
LPMIXERCONTROLDETAILS_LISTTEXT
;
#else
typedef MIXERCONTROLDETAILS_LISTTEXTA MIXERCONTROLDETAILS_LISTTEXT;
typedef PMIXERCONTROLDETAILS_LISTTEXTA PMIXERCONTROLDETAILS_LISTTEXT;
typedef LPMIXERCONTROLDETAILS_LISTTEXTA LPMIXERCONTROLDETAILS_LISTTEXT;
#endif // UNICODE
#else
typedef struct tMIXERCONTROLDETAILS_LISTTEXT {
DWORD dwParam1;
DWORD dwParam2;
char szName[MIXER_LONG_NAME_CHARS];
} MIXERCONTROLDETAILS_LISTTEXT, *PMIXERCONTROLDETAILS_LISTTEXT, FAR *LPMIXERCONTROLDETAILS_LISTTEXT;
#endif
typedef
struct
tMIXERCONTROLDETAILS_BOOLEAN
{
;
}
MIXERCONTROLDETAILS_BOOLEAN
,
*
PMIXERCONTROLDETAILS_BOOLEAN
,
FAR *LPMIXERCONTROLDETAILS_BOOLEAN;
*
LPMIXERCONTROLDETAILS_BOOLEAN
;
typedef
struct
tMIXERCONTROLDETAILS_SIGNED
{
;
}
MIXERCONTROLDETAILS_SIGNED
,
*
PMIXERCONTROLDETAILS_SIGNED
,
FAR *LPMIXERCONTROLDETAILS_SIGNED;
*
LPMIXERCONTROLDETAILS_SIGNED
;
typedef
struct
tMIXERCONTROLDETAILS_UNSIGNED
{
;
}
MIXERCONTROLDETAILS_UNSIGNED
,
*
PMIXERCONTROLDETAILS_UNSIGNED
,
FAR *LPMIXERCONTROLDETAILS_UNSIGNED;
*
LPMIXERCONTROLDETAILS_UNSIGNED
;
#ifdef _WIN32
(
_In_opt_ HMIXEROBJ hmxobj,
_Inout_ LPMIXERCONTROLDETAILS pmxcd,
);
(
_In_opt_ HMIXEROBJ hmxobj,
_Inout_ LPMIXERCONTROLDETAILS pmxcd,
);
#ifdef UNICODE
#define mixerGetControlDetails mixerGetControlDetailsW
#else
#define mixerGetControlDetails mixerGetControlDetailsA
#endif // !UNICODE
#else
MMRESULT WINAPI mixerGetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
#endif
#define MIXER_GETCONTROLDETAILSF_VALUE 0x00000000L
#define MIXER_GETCONTROLDETAILSF_LISTTEXT 0x00000001L
#define MIXER_GETCONTROLDETAILSF_QUERYMASK 0x0000000FL
(
_In_opt_ HMIXEROBJ hmxobj,
_In_ LPMIXERCONTROLDETAILS pmxcd,
);
#define MIXER_SETCONTROLDETAILSF_VALUE 0x00000000L
#define MIXER_SETCONTROLDETAILSF_CUSTOM 0x00000001L
#define MIXER_SETCONTROLDETAILSF_QUERYMASK 0x0000000FL
#endif /* ifndef MMNOMIXER */
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#pragma endregion
#ifdef __cplusplus
}
#endif
#endif // _MMEAPI_H_