Commit 9f65a719 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Started coding 32 bit MCI handling.

Added Open/Close to low-level MCI drivers (audio, midi, anim, cda). Wrote MCI MIDI support.
parent 8077f109
......@@ -2766,27 +2766,27 @@ typedef struct {
} MIDIOPENDESC, *LPMIDIOPENDESC;
typedef struct {
UINT16 wDelay;
UINT16 wResolution;
UINT16 wDelay;
UINT16 wResolution;
LPTIMECALLBACK16 lpFunction;
DWORD dwUser;
UINT16 wFlags;
DWORD dwUser;
UINT16 wFlags;
} TIMEREVENT, *LPTIMEREVENT;
typedef struct tMIXEROPENDESC
{
HMIXEROBJ16 hmx;
DWORD dwCallback;
DWORD dwInstance;
DWORD dwCallback;
DWORD dwInstance;
UINT16 uDeviceID;
} MIXEROPENDESC,*LPMIXEROPENDESC;
typedef struct {
UINT16 wDeviceID; /* device ID */
LPSTR lpstrParams; /* parameter string for entry in SYSTEM.INI */
UINT16 wDeviceID; /* device ID */
LPSTR lpstrParams; /* parameter string for entry in SYSTEM.INI */
UINT16 wCustomCommandTable; /* custom command table (0xFFFF if none)
* filled in by the driver */
UINT16 wType; /* driver type (filled in by the driver) */
* filled in by the driver */
UINT16 wType; /* driver type (filled in by the driver) */
} MCI_OPEN_DRIVER_PARMS, *LPMCI_OPEN_DRIVER_PARMS;
DWORD WINAPI mciGetDriverData(UINT16 uDeviceID);
......@@ -2811,14 +2811,6 @@ BOOL16 WINAPI DriverCallback(DWORD dwCallBack, UINT16 uFlags, HANDLE16 hDev,
DWORD WINAPI auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
struct LINUX_MCIDRIVER {
HDRVR16 hdrv;
DRIVERPROC16 driverproc;
MCI_OPEN_DRIVER_PARMS modp;
MCI_OPEN_PARMS16 mop;
DWORD private;
};
#pragma pack(4)
DWORD WINAPI mixMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
......@@ -2832,4 +2824,21 @@ DWORD WINAPI wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2);
#pragma pack(4)
LONG WAVE_DriverProc16(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG WAVE_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MIDI_DriverProc16(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG CDAUDIO_DriverProc16(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG CDAUDIO_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG ANIM_DriverProc16(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG ANIM_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
#endif /* __WINE_MMSYSTEM_H */
......@@ -38,60 +38,19 @@
#ifdef SOUND_VERSION
#define IOCTL(a,b,c) ioctl(a,b,&c)
#else
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
#define IOCTL(a,b,c) (c = ioctl(a,b,c))
#endif
typedef struct {
#ifndef HAVE_OSS
int unixdev;
#endif
int state;
DWORD bufsize;
LPMIDIOPENDESC midiDesc;
WORD wFlags;
LPMIDIHDR lpQueueHdr;
DWORD dwTotalPlayed;
#ifdef HAVE_OSS
unsigned char incoming[3];
unsigned char incPrev;
char incLen;
DWORD startTime;
#endif
} LINUX_MIDIIN;
typedef struct {
#ifndef HAVE_OSS
int unixdev;
#endif
int state;
DWORD bufsize;
LPMIDIOPENDESC midiDesc;
WORD wFlags;
LPMIDIHDR lpQueueHdr;
DWORD dwTotalPlayed;
#ifdef HAVE_OSS
void* lpExtra; /* according to port type (MIDI, FM...), extra data when needed */
#endif
} LINUX_MIDIOUT;
typedef struct {
int nUseCount; /* Incremented for each shared open */
BOOL16 fShareable; /* TRUE if first open was shareable */
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
HANDLE16 hCallback; /* Callback handle for pending notification */
HMMIO16 hFile; /* mmio file handle open as Element */
DWORD dwBeginData;
DWORD dwTotalLen;
WORD wFormat;
WORD nTracks;
WORD nTempo;
MCI_OPEN_PARMS16 openParms;
/* MIDIHDR MidiHdr; */
HLOCAL16 hMidiHdr;
WORD dwStatus;
} LINUX_MCIMIDI;
struct WINE_MCIDRIVER {
HDRVR16 hDrv;
DRIVERPROC16 driverProc;
MCI_OPEN_DRIVER_PARMS modp;
MCI_OPEN_PARMS16 mop;
DWORD dwPrivate;
};
/* function prototypes */
extern BOOL32 MULTIMEDIA_Init( void );
extern BOOL32 MULTIMEDIA_Init(void);
extern DWORD mciSendCommandAsync32(UINT32 wDevID, UINT32 wMsg, DWORD dwParam1, DWORD dwParam2);
#endif /* __WINE_MULTIMEDIA_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -59,12 +59,12 @@ int unixToWindowsDeviceType(int type)
#endif
/**************************************************************************
* MultimediaInit [internal]
* MULTIMEDIA_MidiInit [internal]
*
* Initializes the MIDI devices information variables
*
*/
BOOL32 MULTIMEDIA_Init(void)
BOOL32 MULTIMEDIA_MidiInit(void)
{
#ifdef HAVE_OSS
int i, status, numsynthdevs = 255, nummididevs = 255;
......@@ -90,7 +90,7 @@ BOOL32 MULTIMEDIA_Init(void)
close(fd);
return TRUE;
}
if (numsynthdevs > MAX_MIDIOUTDRV) {
ERR(midi, "MAX_MIDIOUTDRV (%d) was enough for the number of devices (%d). "
"Some FM devices will not be available.\n",MAX_MIDIOUTDRV,numsynthdevs);
......@@ -247,3 +247,39 @@ BOOL32 MULTIMEDIA_Init(void)
return TRUE;
}
extern int mciInstalledCount;
extern int mciInstalledListLen;
extern LPSTR lpmciInstallNames;
BOOL32 MULTIMEDIA_MciInit(void)
{
int len;
LPSTR ptr;
LPSTR SysFile = "SYSTEM.INI";
mciInstalledCount = 0;
mciInstalledListLen = 0;
ptr = lpmciInstallNames = xmalloc(2048);
/* FIXME: should do also some registry diving here */
GetPrivateProfileString32A("mci", NULL, "", lpmciInstallNames, 2000, SysFile);
while (strlen(ptr) > 0) {
TRACE(mci, "---> '%s' \n", ptr);
len = strlen(ptr) + 1;
ptr += len;
mciInstalledListLen += len;
mciInstalledCount++;
}
return TRUE;
}
/**************************************************************************
* MULTIMEDIA_Init [internal]
*
* Initializes the multimedia information variables
*
*/
BOOL32 MULTIMEDIA_Init(void)
{
return MULTIMEDIA_MidiInit() && MULTIMEDIA_MciInit();
}
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