ref: 8099559f373645b98fa4cc800fbed0aec0a0705f
parent: abac63d3ccfead74482979f80faad2d4e32f961d
author: robs <robs>
date: Sat Sep 12 06:31:30 EDT 2009
bit-rot detection files
--- /dev/null
+++ b/src/mmsystem.h
@@ -1,0 +1,75 @@
+/*
+ * SoX bit-rot detection file; cobbled together
+ */
+#define HWAVEIN HANDLE
+#define HWAVEOUT HANDLE
+#define MMRESULT UINT
+#define MMVERSION UINT
+
+enum {
+ MMSYSERR_NOERROR,
+ MAXPNAMELEN,
+ WAVE_FORMAT_PCM,
+ WAVE_MAPPER,
+ WAVERR_STILLPLAYING,
+ WHDR_DONE,
+ WHDR_INQUEUE
+};
+
+typedef struct wavehdr_tag {
+ LPSTR lpData;
+ DWORD dwBufferLength;
+ DWORD dwBytesRecorded;
+ DWORD dwUser;
+ DWORD dwFlags;
+ DWORD dwLoops;
+ struct wavehdr_tag *lpNext;
+ DWORD reserved;
+} WAVEHDR,*PWAVEHDR,*LPWAVEHDR;
+
+typedef struct _WAVEFORMATEX {
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
+} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
+
+typedef struct tagWAVEINCAPSA {
+ WORD wMid;
+ WORD wPid;
+ MMVERSION vDriverVersion;
+ CHAR szPname[MAXPNAMELEN];
+ DWORD dwFormats;
+ WORD wChannels;
+ WORD wReserved1;
+} WAVEINCAPSA,*PWAVEINCAPSA,*LPWAVEINCAPSA;
+
+typedef struct tagWAVEOUTCAPSA {
+ WORD wMid;
+ WORD wPid;
+ MMVERSION vDriverVersion;
+ CHAR szPname[MAXPNAMELEN];
+ DWORD dwFormats;
+ WORD wChannels;
+ WORD wReserved1;
+ DWORD dwSupport;
+} WAVEOUTCAPSA,*PWAVEOUTCAPSA,*LPWAVEOUTCAPSA;
+
+MMRESULT WINAPI waveInAddBuffer(HWAVEIN,LPWAVEHDR,UINT);
+MMRESULT WINAPI waveInClose(HWAVEIN);
+MMRESULT WINAPI waveInGetDevCapsA(UINT,LPWAVEINCAPSA,UINT);
+MMRESULT WINAPI waveInGetNumDevs(void);
+MMRESULT WINAPI waveInOpen(HWAVEIN*,UINT,WAVEFORMATEX*,DWORD*,DWORD*,DWORD);
+MMRESULT WINAPI waveInPrepareHeader(HWAVEIN,LPWAVEHDR,UINT);
+MMRESULT WINAPI waveInReset(HWAVEIN);
+MMRESULT WINAPI waveInStart(HWAVEIN);
+MMRESULT WINAPI waveOutClose(HWAVEOUT);
+MMRESULT WINAPI waveOutGetDevCapsA(UINT,LPWAVEOUTCAPSA,UINT);
+MMRESULT WINAPI waveOutGetNumDevs(void);
+MMRESULT WINAPI waveOutOpen(HWAVEOUT*,UINT,WAVEFORMATEX*,DWORD*,DWORD*,DWORD);
+MMRESULT WINAPI waveOutPrepareHeader(HWAVEOUT,LPWAVEHDR,UINT);
+MMRESULT WINAPI waveOutReset(HWAVEOUT);
+MMRESULT WINAPI waveOutWrite(HWAVEOUT,LPWAVEHDR,UINT);
--- /dev/null
+++ b/src/windows.h
@@ -1,0 +1,33 @@
+/*
+ * SoX bit-rot detection file; cobbled together
+ */
+
+#define BYTE uint8_t
+#define CHAR char
+#define DWORD_PTR DWORD *
+#define DWORD uint32_t
+#define HANDLE void *
+#define LPCSTR char *
+#define LPCVOID void *
+#define LPDWORD DWORD *
+#define LPSTR char const *
+#define UINT DWORD
+#define WCHAR int16_t
+#define WINAPI
+#define WIN_BOOL int
+#define WORD uint16_t
+
+enum {
+ FALSE,
+ TRUE,
+ FORMAT_MESSAGE_FROM_SYSTEM,
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ INFINITE,
+ CALLBACK_EVENT
+};
+
+DWORD CloseHandle(HANDLE);
+DWORD FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR, DWORD,LPDWORD);
+DWORD GetLastError(void);
+DWORD WaitForSingleObject(HANDLE, DWORD);
+HANDLE CreateEventA(LPCVOID,WIN_BOOL,WIN_BOOL,LPCSTR);