87 TRACE(
"In thread before async command (%08x,%08lx,%08lx)\n",
90 TRACE(
"In thread after async command (%08x,%08lx,%08lx)\n",
124 WARN(
"Couldn't allocate thread for async command handling, sending synchronously\n");
154 if (modp ==
NULL)
return 0xFFFFFFFF;
189 return (dwDevID == 0xFFFFFFFF) ? 1 : 0;
287 TRACE(
"Chunk Found ckid=%.4s fccType=%.4s cksize=%08X\n",
316 TRACE(
"can't find data chunk\n");
319 TRACE(
"Chunk Found ckid=%.4s fccType=%.4s cksize=%08X\n",
371 WARN(
"Incorrect nBlockAlign (%d), setting it to %d\n",
379 WARN(
"Incorrect nAvgBytesPerSec (%d), setting it to %d\n",
430 WARN(
"can't retrieve temp path!\n");
431 *pszTmpFileName =
NULL;
439 WARN(
"can't retrieve temp file name!\n");
446 if (*pszTmpFileName && (*pszTmpFileName)[0]) {
479 if (wmw->
hFile == 0) {
494 TRACE(
"ParentChunk ckid=%.4s fccType=%.4s cksize=%08X\n",
677 if (wmw->
hFile != 0) {
716 ERR(
"Unknown uMsg=%d\n", uMsg);
755 if (wmw->
hFile == 0) {
774 if (dwRet)
return dwRet;
780 WARN(
"Incorrect nBlockAlign (%d), setting it to %d\n",
790 WARN(
"Incorrect nAvgBytesPerSec (%d), setting it to %d\n",
833#define WAVE_ALIGN_ON_BLOCK(wmw,v) \
834((((v) + (wmw)->lpWaveFormat->nBlockAlign - 1) / (wmw)->lpWaveFormat->nBlockAlign) * (wmw)->lpWaveFormat->nBlockAlign)
848 TRACE(
"Can't open low level audio device %d\n", dwRet);
891 waveHdr[whidx].
dwFlags &= ~WHDR_DONE;
892 TRACE(
"before WODM_WRITE lpWaveHdr=%p dwBufferLength=%u\n",
893 &waveHdr[whidx], waveHdr[whidx].dwBufferLength);
896 ERR(
"Aborting play loop, WODM_WRITE error %d\n", dwRet);
960 lpWaveHdr->
dwFlags &= ~WHDR_DONE;
977 ERR(
"Unknown uMsg=%d\n", uMsg);
1043 if (dwRet != 0)
return dwRet;
1047 if (dwRet != 0)
return dwRet;
1051 }
else end = 0xFFFFFFFF;
1069#define WAVE_ALIGN_ON_BLOCK(wmw,v) \
1070((((v) + (wmw)->lpWaveFormat->nBlockAlign - 1) / (wmw)->lpWaveFormat->nBlockAlign) * (wmw)->lpWaveFormat->nBlockAlign)
1086 TRACE(
"Can't open low level audio device %d\n", dwRet);
1180 ERR(
"waveOutPause error %d\n",dwRet);
1188 ERR(
"waveInStop error %d\n",dwRet);
1222 ERR(
"waveInStart error %d\n",dwRet);
1229 ERR(
"waveOutRestart error %d\n",dwRet);
1252 DWORD position, dwRet;
1282 TRACE(
"Seeking to position=%u bytes\n", position);
1305 TRACE(
"MCI_FORMAT_MILLISECONDS !\n");
1309 TRACE(
"MCI_FORMAT_BYTES !\n");
1313 TRACE(
"MCI_FORMAT_SAMPLES !\n");
1322 TRACE(
"No support for video !\n");
1326 TRACE(
"No support for door open !\n");
1330 TRACE(
"No support for door close !\n");
1335 TRACE(
"MCI_SET_ON audio !\n");
1337 TRACE(
"MCI_SET_OFF audio !\n");
1339 WARN(
"MCI_SET_AUDIO without SET_ON or SET_OFF\n");
1348 default:
WARN(
"Unknown audio channel %u\n", lpParms->
dwAudio);
break;
1368 TRACE(
"MCI_WAVE_SET_ANYINPUT\n");
1374 TRACE(
"MCI_WAVE_SET_ANYOUTPUT\n");
1430 FIXME(
"MCI_WAIT not implemented\n");
1482 switch (lpParms->
dwItem) {
1485 TRACE(
"MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->
dwReturn);
1502 TRACE(
"MCI_STATUS_MEDIA_PRESENT => TRUE!\n");
1509 TRACE(
"MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->
dwReturn);
1519 TRACE(
"MCI_STATUS_POSITION %s => %lu\n",
1530 TRACE(
"MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->
dwReturn);
1540 TRACE(
"MCI_WAVE_INPUT => %d\n", (
signed)wmw->
wInput);
1549 TRACE(
"MCI_WAVE_OUTPUT => %d\n", (
signed)wmw->
wOutput);
1564 TRACE(
"MCI_WAVE_STATUS_AVGBYTESPERSEC => %lu\n", lpParms->
dwReturn);
1568 TRACE(
"MCI_WAVE_STATUS_BITSPERSAMPLE => %lu\n", lpParms->
dwReturn);
1572 TRACE(
"MCI_WAVE_STATUS_BLOCKALIGN => %lu\n", lpParms->
dwReturn);
1576 TRACE(
"MCI_WAVE_STATUS_CHANNELS => %lu\n", lpParms->
dwReturn);
1580 TRACE(
"MCI_WAVE_STATUS_SAMPLESPERSEC => %lu\n", lpParms->
dwReturn);
1583 TRACE(
"MCI_WAVE_STATUS_LEVEL !\n");
1587 WARN(
"unknown command %08X !\n", lpParms->
dwItem);
1611 switch(lpParms->
dwItem) {
1655 FIXME(
"Unknown capability (%08x) !\n", lpParms->
dwItem);
1659 WARN(
"No GetDevCaps-Item !\n");
1686 static const WCHAR wszAudio [] = {
'W',
'i',
'n',
'e',
'\'',
's',
' ',
'a',
'u',
'd',
'i',
'o',
' ',
'p',
'l',
'a',
'y',
'e',
'r',0};
1687 static const WCHAR wszWaveIn [] = {
'W',
'i',
'n',
'e',
' ',
'W',
'a',
'v',
'e',
' ',
'I',
'n',0};
1688 static const WCHAR wszWaveOut[] = {
'W',
'i',
'n',
'e',
' ',
'W',
'a',
'v',
'e',
' ',
'O',
'u',
't',0};
1696 WARN(
"Don't know this info command (%u)\n",
dwFlags);
1719 TRACE(
"(%08lX, %p, %08X, %08lX, %08lX)\n",
1767 FIXME(
"Unsupported command [%u]\n", wMsg);
1770 TRACE(
"Unsupported command [%u]\n", wMsg);
1777 ERR(
"Shouldn't receive a MCI_OPEN or CLOSE message\n");
1780 FIXME(
"is probably wrong msg [%u]\n", wMsg);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
#define MCI_NO_COMMAND_TABLE
#define MCI_FORMAT_RETURN_BASE
#define MAKEMCIRESOURCE(wRet, wRes)
BOOL WINAPI mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus)
#define MCI_RESOURCE_RETURNED
#define WAVE_FORMAT_PCM_S
BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD dwData)
DWORD WINAPI mciGetDriverData(UINT uDeviceID)
LRESULT WINAPI DefDriverProc(DWORD_PTR dwDriverIdentifier, HDRVR hDrv, UINT Msg, LPARAM lParam1, LPARAM lParam2)
MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT uFlags)
LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck, const MMCKINFO *lpckParent, UINT uFlags)
LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO *lpck, UINT uFlags)
HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO *lpmmioinfo, DWORD dwOpenFlags)
MMRESULT WINAPI mmioRenameW(LPCWSTR szFileName, LPCWSTR szNewFileName, const MMIOINFO *lpmmioinfo, DWORD dwFlags)
#define InterlockedExchangePointer(Target, Value)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLenum GLuint GLsizei bufsize
static LRESULT WAVE_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp)
static DWORD create_tmp_file(HMMIO *hFile, LPWSTR *pszTmpFileName)
#define WAVE_ALIGN_ON_BLOCK(wmw, v)
static DWORD WAVE_mciStatus(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
static DWORD WAVE_mciReadFmt(WINE_MCIWAVE *wmw, const MMCKINFO *pckMainRIFF)
static DWORD WAVE_mciGetDevCaps(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms)
static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt, HANDLE hEvent)
static void WAVE_mciPlayWaitDone(WINE_MCIWAVE *wmw)
static void WAVE_mciDefaultFmt(WINE_MCIWAVE *wmw)
static DWORD WAVE_mciPause(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
static DWORD WAVE_mciCreateRIFFSkeleton(WINE_MCIWAVE *wmw)
static WINE_MCIWAVE * WAVE_mciGetOpenDev(MCIDEVICEID wDevID)
static void CALLBACK WAVE_mciPlayCallback(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, LPARAM dwParam1, LPARAM dwParam2)
static DWORD WAVE_mciSet(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_WAVE_SET_PARMS lpParms)
static void WAVE_mciRecordWaitDone(WINE_MCIWAVE *wmw)
static DWORD MCI_SendCommandAsync(UINT wDevID, async_cmd cmd, DWORD_PTR dwParam1, DWORD_PTR dwParam2, UINT size)
static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE *wmw, DWORD val)
LRESULT CALLBACK MCIWAVE_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LPARAM dwParam1, LPARAM dwParam2)
static void CALLBACK WAVE_mciRecordCallback(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, LPARAM dwParam1, LPARAM dwParam2)
static DWORD WAVE_mciClose(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
static void WAVE_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIWAVE *wmw, UINT wStatus)
static DWORD WAVE_mciCue(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
static LRESULT WAVE_drvClose(MCIDEVICEID dwDevID)
static LRESULT WAVE_mciOpen(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMSW lpOpenParms)
static DWORD WAVE_ConvertTimeFormatToByte(WINE_MCIWAVE *wmw, DWORD val)
DWORD(* async_cmd)(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt, HANDLE evt)
static DWORD WAVE_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
static LRESULT WAVE_mciOpenFile(WINE_MCIWAVE *wmw, LPCWSTR filename)
static DWORD WAVE_mciSeek(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
static DWORD WAVE_mciRecord(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt, HANDLE hEvent)
static DWORD CALLBACK MCI_SCAStarter(LPVOID arg)
static DWORD WAVE_mciSave(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_SAVE_PARMSW lpParms)
static DWORD WAVE_mciInfo(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW lpParms)
static DWORD WAVE_mciStop(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
#define memcpy(s1, s2, n)
#define MCIERR_FLAGS_NOT_COMPATIBLE
#define MCI_OPEN_SHAREABLE
#define MCI_NOTIFY_SUPERSEDED
struct wavehdr_tag * LPWAVEHDR
#define MCI_GETDEVCAPS_CAN_SAVE
#define MCI_WAVE_SET_SAMPLESPERSEC
#define MCI_WAVE_STATUS_BITSPERSAMPLE
#define MCI_GETDEVCAPS_HAS_VIDEO
#define MCI_STATUS_POSITION
#define DRV_QUERYCONFIGURE
#define MCI_WAVE_STATUS_LEVEL
#define MCI_OPEN_ELEMENT_ID
#define MCI_GETDEVCAPS_CAN_RECORD
#define MCI_FORMAT_SAMPLES
#define MCI_FORMAT_MILLISECONDS
#define MCIERR_FILE_NOT_FOUND
#define MCI_GETDEVCAPS_DEVICE_TYPE
#define MCI_WAVE_GETDEVCAPS_OUTPUTS
#define MCIERR_UNRECOGNIZED_COMMAND
#define MCI_WAVE_STATUS_BLOCKALIGN
#define MCI_WAVE_SET_AVGBYTESPERSEC
#define MCI_GETDEVCAPS_COMPOUND_DEVICE
#define MCI_WAVE_SET_ANYINPUT
#define MCIERR_BAD_INTEGER
#define MCI_SET_DOOR_OPEN
#define MCI_GETDEVCAPS_USES_FILES
#define MCI_GETDEVCAPS_CAN_PLAY
#define MCI_WAVE_STATUS_SAMPLESPERSEC
#define MCI_WAVE_GETDEVCAPS_INPUTS
#define MCIERR_PARAM_OVERFLOW
#define MCIERR_INVALID_DEVICE_ID
#define MCI_SET_TIME_FORMAT
#define MCIERR_INVALID_FILE
#define MCI_GETDEVCAPS_CAN_EJECT
#define MCIERR_DEVICE_OPEN
#define MCIERR_MISSING_PARAMETER
struct pcmwaveformat_tag PCMWAVEFORMAT
#define MCI_SET_AUDIO_RIGHT
#define MCIERR_NULL_PARAMETER_BLOCK
#define MCI_NOTIFY_ABORTED
#define MCI_SET_AUDIO_ALL
#define MCIERR_FILE_NOT_SAVED
#define MCIERR_OUTOFRANGE
#define MCI_WAVE_SET_FORMATTAG
#define MCI_WAVE_STATUS_FORMATTAG
#define MCI_STATUS_CURRENT_TRACK
#define MCI_STATUS_NUMBER_OF_TRACKS
#define MCIERR_OUT_OF_MEMORY
#define MCI_SET_DOOR_CLOSED
#define MCI_WAVE_SET_CHANNELS
#define MCI_GETDEVCAPS_ITEM
#define MCI_WAVE_STATUS_AVGBYTESPERSEC
#define MCI_STATUS_LENGTH
#define MCI_SET_AUDIO_LEFT
#define MCIERR_UNRECOGNIZED_KEYWORD
#define mmioFOURCC(c0, c1, c2, c3)
#define MCI_WAVE_SET_BITSPERSAMPLE
#define MCI_DEVTYPE_WAVEFORM_AUDIO
#define MCI_WAVE_SET_BLOCKALIGN
#define MCI_SEEK_TO_START
#define MCI_NOTIFY_SUCCESSFUL
#define CALLBACK_FUNCTION
#define MCI_NOTIFY_FAILURE
#define MCI_WAVE_SET_ANYOUTPUT
#define MCI_MODE_NOT_READY
#define MCI_STATUS_MEDIA_PRESENT
#define MCIERR_BAD_TIME_FORMAT
#define MCIERR_NONAPPLICABLE_FUNCTION
#define MCIERR_UNSUPPORTED_FUNCTION
#define MCI_STATUS_TIME_FORMAT
#define MCI_WAVE_STATUS_CHANNELS
#define MCI_GETDEVCAPS_HAS_AUDIO
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
MCIDEVICEID wNotifyDeviceID
LPWAVEFORMATEX lpWaveFormat
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
static EFI_HANDLE * handles
static GLenum _GLUfuncptr fn
DWORD WINAPI GetLastError(void)
#define THREAD_PRIORITY_TIME_CRITICAL
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
UINT WINAPI waveOutReset(HWAVEOUT hWaveOut)
UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn, WAVEHDR *lpWaveInHdr, UINT uSize)
UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR *lpWaveInHdr, UINT uSize)
UINT WINAPI waveInStop(HWAVEIN hWaveIn)
UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR *lpWaveInHdr, UINT uSize)
UINT WINAPI waveOutGetNumDevs(void)
UINT WINAPI waveInReset(HWAVEIN hWaveIn)
UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, LPWAVEHDR lpWaveOutHdr, UINT uSize)
UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut, LPWAVEHDR lpWaveOutHdr, UINT uSize)
MMRESULT WINAPI waveOutOpen(LPHWAVEOUT lphWaveOut, UINT uDeviceID, LPCWAVEFORMATEX lpFormat, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut)
MMRESULT WINAPI waveInOpen(HWAVEIN *lphWaveIn, UINT uDeviceID, LPCWAVEFORMATEX lpFormat, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
UINT WINAPI waveInGetNumDevs(void)
UINT WINAPI waveInClose(HWAVEIN hWaveIn)
UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut, WAVEHDR *lpWaveOutHdr, UINT uSize)
UINT WINAPI waveInStart(HWAVEIN hWaveIn)
UINT WINAPI waveOutPause(HWAVEOUT hWaveOut)
UINT WINAPI waveOutClose(HWAVEOUT hWaveOut)
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)