Commit c11b167f authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Added support for MCI AVI driver

Added some fixes mixer functions Fixed MCI string comparison (thanks to Lionel ULMER) No longer using 16 bit USER functions (use their 32 bit counter part) Reindenting. Added function sndPlaySound32W
parent 6ccda0d5
......@@ -73,88 +73,90 @@
#define dbch_local 65
#define dbch_mci 66
#define dbch_mcianim 67
#define dbch_mcimidi 68
#define dbch_mciwave 69
#define dbch_mdi 70
#define dbch_menu 71
#define dbch_message 72
#define dbch_metafile 73
#define dbch_midi 74
#define dbch_mmaux 75
#define dbch_mmio 76
#define dbch_mmsys 77
#define dbch_mmtime 78
#define dbch_module 79
#define dbch_monthcal 80
#define dbch_mpr 81
#define dbch_msacm 82
#define dbch_msg 83
#define dbch_msvideo 84
#define dbch_nativefont 85
#define dbch_nonclient 86
#define dbch_ntdll 87
#define dbch_ole 88
#define dbch_pager 89
#define dbch_palette 90
#define dbch_pidl 91
#define dbch_print 92
#define dbch_process 93
#define dbch_profile 94
#define dbch_progress 95
#define dbch_prop 96
#define dbch_propsheet 97
#define dbch_psapi 98
#define dbch_psdrv 99
#define dbch_ras 100
#define dbch_rebar 101
#define dbch_reg 102
#define dbch_region 103
#define dbch_relay 104
#define dbch_resource 105
#define dbch_scroll 106
#define dbch_security 107
#define dbch_segment 108
#define dbch_selector 109
#define dbch_sem 110
#define dbch_sendmsg 111
#define dbch_server 112
#define dbch_shell 113
#define dbch_shm 114
#define dbch_snoop 115
#define dbch_sound 116
#define dbch_static 117
#define dbch_statusbar 118
#define dbch_stress 119
#define dbch_string 120
#define dbch_syscolor 121
#define dbch_system 122
#define dbch_tab 123
#define dbch_task 124
#define dbch_text 125
#define dbch_thread 126
#define dbch_thunk 127
#define dbch_timer 128
#define dbch_toolbar 129
#define dbch_toolhelp 130
#define dbch_tooltips 131
#define dbch_trackbar 132
#define dbch_treeview 133
#define dbch_ttydrv 134
#define dbch_tweak 135
#define dbch_uitools 136
#define dbch_updown 137
#define dbch_ver 138
#define dbch_virtual 139
#define dbch_vxd 140
#define dbch_wave 141
#define dbch_win 142
#define dbch_win16drv 143
#define dbch_win32 144
#define dbch_wing 145
#define dbch_winsock 146
#define dbch_wnet 147
#define dbch_x11 148
#define dbch_x11drv 149
#define dbch_mciavi 68
#define dbch_mcimidi 69
#define dbch_mciwave 70
#define dbch_mdi 71
#define dbch_menu 72
#define dbch_message 73
#define dbch_metafile 74
#define dbch_midi 75
#define dbch_mmaux 76
#define dbch_mmio 77
#define dbch_mmsys 78
#define dbch_mmtime 79
#define dbch_module 80
#define dbch_monthcal 81
#define dbch_mpr 82
#define dbch_msacm 83
#define dbch_msg 84
#define dbch_msvideo 85
#define dbch_nativefont 86
#define dbch_nonclient 87
#define dbch_ntdll 88
#define dbch_ole 89
#define dbch_pager 90
#define dbch_palette 91
#define dbch_pidl 92
#define dbch_print 93
#define dbch_process 94
#define dbch_profile 95
#define dbch_progress 96
#define dbch_prop 97
#define dbch_propsheet 98
#define dbch_psapi 99
#define dbch_psdrv 100
#define dbch_ras 101
#define dbch_rebar 102
#define dbch_reg 103
#define dbch_region 104
#define dbch_relay 105
#define dbch_resource 106
#define dbch_scroll 107
#define dbch_security 108
#define dbch_segment 109
#define dbch_selector 110
#define dbch_sem 111
#define dbch_sendmsg 112
#define dbch_server 113
#define dbch_shell 114
#define dbch_shm 115
#define dbch_snoop 116
#define dbch_sound 117
#define dbch_static 118
#define dbch_statusbar 119
#define dbch_stress 120
#define dbch_string 121
#define dbch_syscolor 122
#define dbch_system 123
#define dbch_tab 124
#define dbch_task 125
#define dbch_text 126
#define dbch_thread 127
#define dbch_thunk 128
#define dbch_timer 129
#define dbch_toolbar 130
#define dbch_toolhelp 131
#define dbch_tooltips 132
#define dbch_trackbar 133
#define dbch_treeview 134
#define dbch_ttydrv 135
#define dbch_tweak 136
#define dbch_uitools 137
#define dbch_unknown 138
#define dbch_updown 139
#define dbch_ver 140
#define dbch_virtual 141
#define dbch_vxd 142
#define dbch_wave 143
#define dbch_win 144
#define dbch_win16drv 145
#define dbch_win32 146
#define dbch_wing 147
#define dbch_winsock 148
#define dbch_wnet 149
#define dbch_x11 150
#define dbch_x11drv 151
/* Definitions for classes identifiers */
#define dbcl_fixme 0
#define dbcl_err 1
......
......@@ -4,7 +4,7 @@
#include "debugtools.h"
#endif
#define DEBUG_CHANNEL_COUNT 150
#define DEBUG_CHANNEL_COUNT 152
#ifdef DEBUG_RUNTIME
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
......@@ -157,6 +157,8 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
};
const char* debug_ch_name[] = {
"accel",
......@@ -227,6 +229,7 @@ const char* debug_ch_name[] = {
"local",
"mci",
"mcianim",
"mciavi",
"mcimidi",
"mciwave",
"mdi",
......@@ -296,6 +299,7 @@ const char* debug_ch_name[] = {
"ttydrv",
"tweak",
"uitools",
"unknown",
"updown",
"ver",
"virtual",
......
......@@ -18,7 +18,6 @@
* a good way to do so.
*/
#define MAX_MIDIOUTDRV (16)
#define MAX_MCIMIDIDRV (1)
#if defined(HAVE_SYS_SOUNDCARD_H)
# include <sys/soundcard.h>
......@@ -81,5 +80,7 @@ LONG MCICDAUDIO_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIANIM_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIAVI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
#endif /* __WINE_MULTIMEDIA_H */
......@@ -12,6 +12,7 @@ C_SRCS = \
init.c \
joystick.c \
mcianim.c \
mciavi.c \
mcicda.c \
mcimidi.c \
mcistring.c \
......
......@@ -597,7 +597,7 @@ LONG MCIANIM_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBox16(0, "Sample MultiMedia Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_CONFIGURE: MessageBox32A(0, "Sample MultiMedia Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART;
......
......@@ -65,6 +65,7 @@ typedef struct {
DWORD dwStartTicks;
} WINE_MCIMIDI;
#define MAX_MCIMIDIDRV (1)
static WINE_MCIMIDI MCIMidiDev[MAX_MCIMIDIDRV];
/*======================================================================*
......@@ -1470,7 +1471,7 @@ static DWORD MIDI_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms
/**************************************************************************
* MCIMIDI_DriverProc32 [sample driver]
*/
LONG MCIMIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
LONG WINAPI MCIMIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2)
{
switch (wMsg) {
......@@ -1481,7 +1482,7 @@ LONG MCIMIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBox16(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_CONFIGURE: MessageBox32A(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART;
#ifdef SNDCTL_MIDI_INFO
......@@ -1540,4 +1541,4 @@ LONG MCIMIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
return MCIERR_UNRECOGNIZED_COMMAND;
}
/*-----------------------------------------------------------------------*/
......@@ -178,9 +178,13 @@ static DWORD WAVE_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS32A
TRACE(mciwave, "wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID);
if (dwFlags & MCI_OPEN_ELEMENT) {
LPCSTR lpstrElementName;
lpstrElementName = lpOpenParms->lpstrElementName;
if (dwFlags & MCI_OPEN_ELEMENT_ID) {
/* could it be that (DWORD)lpOpenParms->lpstrElementName
* contains the hFile value ?
*/
dwRet = MCIERR_UNRECOGNIZED_COMMAND;
} else {
LPCSTR lpstrElementName = lpOpenParms->lpstrElementName;
/*FIXME : what should be done id wmw->hFile is already != 0, or the driver is playin' */
TRACE(mciwave,"MCI_OPEN_ELEMENT '%s' !\n", lpstrElementName);
......@@ -189,12 +193,13 @@ static DWORD WAVE_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS32A
MMIO_ALLOCBUF | MMIO_READWRITE | MMIO_EXCLUSIVE);
if (wmw->hFile == 0) {
WARN(mciwave, "can't find file='%s' !\n", lpstrElementName);
return MCIERR_FILE_NOT_FOUND;
dwRet = MCIERR_FILE_NOT_FOUND;
}
} else {
wmw->hFile = 0;
}
}
}
TRACE(mciwave,"hFile=%u\n", wmw->hFile);
memcpy(&wmw->openParms, lpOpenParms, sizeof(MCI_WAVE_OPEN_PARMS32A));
......@@ -203,7 +208,7 @@ static DWORD WAVE_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS32A
wmw->waveDesc.hWave = 0;
if (wmw->hFile != 0) {
if (dwRet == 0 && wmw->hFile != 0) {
MMCKINFO ckMainRIFF;
if (mmioDescend(wmw->hFile, &ckMainRIFF, NULL, 0) != 0) {
......@@ -757,8 +762,7 @@ static DWORD WAVE_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpP
TRACE(mciwave,"MCI_WAVE_STATUS_CHANNELS => %lu!\n", lpParms->dwReturn);
break;
case MCI_WAVE_STATUS_FORMATTAG:
lpParms->dwReturn = wmw->WaveFormat.wf.
wFormatTag;
lpParms->dwReturn = wmw->WaveFormat.wf.wFormatTag;
TRACE(mciwave,"MCI_WAVE_FORMATTAG => %lu!\n", lpParms->dwReturn);
break;
case MCI_WAVE_STATUS_LEVEL:
......@@ -871,7 +875,7 @@ static DWORD WAVE_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpPar
break;
default:
WARN(mciwave, "Don't know this info command (%lu)\n", dwFlags);
return MCIERR_UNRECOGNIZED_COMMAND;
ret = MCIERR_UNRECOGNIZED_COMMAND;
}
}
if (str) {
......@@ -904,7 +908,7 @@ LONG MCIWAVE_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBox16(0, "Sample MultiMedia Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_CONFIGURE: MessageBox32A(0, "Sample MultiMedia Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART;
case MCI_OPEN_DRIVER: return WAVE_mciOpen (dwDevID, dwParam1, (LPMCI_WAVE_OPEN_PARMS32A)dwParam2);
......
......@@ -1541,12 +1541,12 @@ LONG MIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBox16(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_CONFIGURE: MessageBox32A(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART;
default:
TRACE(midi, "Sending msg=%lu to default driver proc\n", wMsg);
return DefDriverProc32(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
return DefDriverProc16(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
}
}
......@@ -1564,7 +1564,7 @@ LONG MIDI_DriverProc16(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBox16(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_CONFIGURE: MessageBox32A(0, "Sample Midi Linux Driver !", "MMLinux Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART;
default:
......
......@@ -24,8 +24,8 @@ static DWORD MIX_GetDevCaps(WORD wDevID, LPMIXERCAPS16 lpCaps, DWORD dwSize)
#ifdef HAVE_OSS
int mixer,mask;
TRACE(mmaux,"(%04X, %p, %lu);\n", wDevID, lpCaps, dwSize);
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
TRACE(mmaux, "(%04X, %p, %lu);\n", wDevID, lpCaps, dwSize);
if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
WARN(mmaux, "mixer device not available !\n");
return MMSYSERR_NOTENABLED;
......@@ -33,7 +33,7 @@ static DWORD MIX_GetDevCaps(WORD wDevID, LPMIXERCAPS16 lpCaps, DWORD dwSize)
lpCaps->wMid = 0xAA;
lpCaps->wPid = 0x55;
lpCaps->vDriverVersion = 0x0100;
strcpy(lpCaps->szPname,"WINE Generic Mixer");
strcpy(lpCaps->szPname, "WINE Generic Mixer");
if (ioctl(mixer, SOUND_MIXER_READ_DEVMASK, &mask) == -1) {
close(mixer);
perror("ioctl mixer SOUND_MIXER_DEVMASK");
......@@ -53,6 +53,41 @@ static DWORD MIX_GetDevCaps(WORD wDevID, LPMIXERCAPS16 lpCaps, DWORD dwSize)
#ifdef HAVE_OSS
static char *sdlabels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
static char *sdnames[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES;
static void MIX_GetLineInfoFromIndex(LPMIXERLINE16 lpml, int devmask, DWORD idx)
{
strcpy(lpml->szShortName, sdlabels[idx]);
strcpy(lpml->szName, sdnames[idx]);
lpml->dwLineID = idx;
lpml->dwDestination = 0; /* index for speakers */
lpml->cConnections = 1;
lpml->cControls = 1;
switch (idx) {
case SOUND_MIXER_SYNTH:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
break;
case SOUND_MIXER_CD:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
break;
case SOUND_MIXER_LINE:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_LINE;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
break;
case SOUND_MIXER_MIC:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
break;
case SOUND_MIXER_PCM:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
break;
default:
ERR(mmaux, "Index %ld not handled.\n", idx);
break;
}
}
#endif
/**************************************************************************
......@@ -61,10 +96,12 @@ static char *sdnames[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES;
static DWORD MIX_GetLineInfo(WORD wDevID, LPMIXERLINE16 lpml, DWORD fdwInfo)
{
#ifdef HAVE_OSS
int mixer,i,j,devmask,recsrc,recmask;
int mixer, i, j, devmask, recsrc, recmask;
DWORD ret = MMSYSERR_NOERROR;
TRACE(mmaux,"(%04X, %p, %lu);\n", wDevID, lpml, fdwInfo);
if (lpml == NULL) return MMSYSERR_NOTENABLED;
TRACE(mmaux, "(%04X, %p, %lu);\n", wDevID, lpml, fdwInfo);
if (lpml == NULL || lpml->cbStruct != sizeof(*lpml))
return MMSYSERR_INVALPARAM;
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0)
return MMSYSERR_NOTENABLED;
......@@ -83,7 +120,7 @@ static DWORD MIX_GetLineInfo(WORD wDevID, LPMIXERLINE16 lpml, DWORD fdwInfo)
perror("ioctl mixer SOUND_MIXER_RECMASK");
return MMSYSERR_NOTENABLED;
}
lpml->cbStruct = sizeof(MIXERLINE16);
/* FIXME: set all the variables correctly... the lines below
* are very wrong...
*/
......@@ -103,55 +140,63 @@ static DWORD MIX_GetLineInfo(WORD wDevID, LPMIXERLINE16 lpml, DWORD fdwInfo)
lpml->cConnections++;
break;
case MIXER_GETLINEINFOF_SOURCE:
for (i=j=0;j<31;j++) {
if (devmask & (1<<j)) {
for (i = j = 0; j < 31; j++) {
if (devmask & (1 << j)) {
if (lpml->dwSource == i)
break;
i++;
}
}
strcpy(lpml->szShortName,sdlabels[i]);
strcpy(lpml->szName,sdnames[i]);
lpml->dwLineID = i;
switch (i) {
case SOUND_MIXER_SYNTH:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
MIX_GetLineInfoFromIndex(lpml, devmask, i);
break;
case SOUND_MIXER_CD:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
case MIXER_GETLINEINFOF_LINEID:
MIX_GetLineInfoFromIndex(lpml, devmask, lpml->dwLineID);
break;
case SOUND_MIXER_LINE:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_LINE;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
case MIXER_GETLINEINFOF_COMPONENTTYPE:
TRACE(mmaux, "Getting component type (%08lx)\n", lpml->dwComponentType);
switch (lpml->dwComponentType) {
case MIXERLINE_COMPONENTTYPE_DST_SPEAKERS:
i = -1;
break;
case SOUND_MIXER_MIC:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
case MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER:
i = SOUND_MIXER_SYNTH;
break;
case SOUND_MIXER_PCM:
lpml->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT;
lpml->fdwLine |= MIXERLINE_LINEF_SOURCE;
case MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC:
i = SOUND_MIXER_CD;
break;
default:
ERR(mmaux,"Mixertype %d not handle.\n",i);
case MIXERLINE_COMPONENTTYPE_SRC_LINE:
i = SOUND_MIXER_LINE;
break;
}
case MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE:
i = SOUND_MIXER_MIC;
break;
case MIXER_GETLINEINFOF_LINEID:
FIXME(mmaux,"_LINEID (%ld) not implemented yet.\n",lpml->dwLineID);
case MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT:
i = SOUND_MIXER_PCM;
break;
case MIXER_GETLINEINFOF_COMPONENTTYPE:
FIXME(mmaux," _COMPONENTTYPE not implemented yet.\n");
default:
FIXME(mmaux, "Unhandled component type (%08lx)\n", lpml->dwComponentType);
return MMSYSERR_INVALPARAM;
}
if (i != -1 && (devmask & (1 << i))) {
strcpy(lpml->szShortName, sdlabels[i]);
strcpy(lpml->szName, sdnames[i]);
lpml->dwLineID = i;
lpml->fdwLine = MIXERLINE_LINEF_SOURCE;
} else {
lpml->cConnections = 0;
for (j=0;j<31;j++)
if (devmask & (1<<j))
lpml->cConnections++;
lpml->dwLineID = 32;
}
break;
case MIXER_GETLINEINFOF_TARGETTYPE:
FIXME(mmaux,"_TARGETTYPE not implemented yet.\n");
FIXME(mmaux, "_TARGETTYPE not implemented yet.\n");
break;
}
lpml->Target.dwType = MIXERLINE_TARGETTYPE_AUX;
close(mixer);
return MMSYSERR_NOERROR;
return ret;
#else
return MMSYSERR_NOTENABLED;
#endif
......@@ -164,8 +209,8 @@ static DWORD MIX_Open(WORD wDevID, LPMIXEROPENDESC lpmod, DWORD flags)
{
#ifdef HAVE_OSS
TRACE(mmaux,"(%04X, %p, %lu);\n",wDevID,lpmod,flags);
if (lpmod == NULL) return MMSYSERR_NOTENABLED;
TRACE(mmaux, "(%04X, %p, %lu);\n", wDevID,lpmod,flags);
if (lpmod == NULL) return MMSYSERR_INVALPARAM;
/* hmm. We don't keep the mixer device open. So just pretend it works */
return MMSYSERR_NOERROR;
#else
......@@ -179,20 +224,23 @@ static DWORD MIX_Open(WORD wDevID, LPMIXEROPENDESC lpmod, DWORD flags)
DWORD WINAPI mixMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
TRACE(mmaux,"(%04X, %04X, %08lX, %08lX, %08lX);\n",
TRACE(mmaux, "(%04X, %04X, %08lX, %08lX, %08lX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch(wMsg) {
case MXDM_GETDEVCAPS:
return MIX_GetDevCaps(wDevID,(LPMIXERCAPS16)dwParam1,dwParam2);
return MIX_GetDevCaps(wDevID, (LPMIXERCAPS16)dwParam1, dwParam2);
case MXDM_GETLINEINFO:
return MIX_GetLineInfo(wDevID,(LPMIXERLINE16)dwParam1,dwParam2);
return MIX_GetLineInfo(wDevID, (LPMIXERLINE16)dwParam1, dwParam2);
case MXDM_GETNUMDEVS:
TRACE(mmsys,"return 1;\n");
TRACE(mmaux, "return 1;\n");
return 1;
case MXDM_OPEN:
return MIX_Open(wDevID,(LPMIXEROPENDESC)dwParam1,dwParam2);
return MIX_Open(wDevID, (LPMIXEROPENDESC)dwParam1, dwParam2);
case MXDM_CLOSE:
return MMSYSERR_NOERROR;
default:
WARN(mmaux,"unknown message %d!\n",wMsg);
WARN(mmaux, "unknown message %d!\n", wMsg);
}
return MMSYSERR_NOTSUPPORTED;
}
......
......@@ -136,7 +136,7 @@ type win32
133 stdcall mmioWrite(long ptr long) mmioWrite32
134 stdcall mmsystemGetVersion() mmsystemGetVersion32
135 stdcall sndPlaySoundA(ptr long) sndPlaySound
136 stub sndPlaySoundW
136 stdcall sndPlaySoundW(ptr long) sndPlaySound32W
137 stdcall timeBeginPeriod(long) timeBeginPeriod32
138 stdcall timeEndPeriod(long) timeEndPeriod32
139 stdcall timeGetDevCaps(ptr long) timeGetDevCaps32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment