Added lolvldrv.c and oss.c.
Thunks to 16 bit are now generated for the MMSYSTEM module.
This commit is contained in:
parent
6fea55f1e7
commit
4853b6d0d2
|
@ -1,2 +1,4 @@
|
|||
Makefile
|
||||
winmm.s
|
||||
lolvldrv.glue.c
|
||||
mmsystem.glue.c
|
||||
|
|
|
@ -11,6 +11,7 @@ C_SRCS = \
|
|||
dplay.c \
|
||||
dsound.c \
|
||||
joystick.c \
|
||||
lolvldrv.c \
|
||||
mci.c \
|
||||
mcianim.c \
|
||||
mciavi.c \
|
||||
|
@ -23,8 +24,12 @@ C_SRCS = \
|
|||
mmaux.c \
|
||||
mmio.c \
|
||||
mmsystem.c \
|
||||
oss.c \
|
||||
time.c
|
||||
|
||||
GLUE = lolvldrv.c \
|
||||
mmsystem.c
|
||||
|
||||
RC_SRCS= \
|
||||
winmm.rc
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,65 @@
|
|||
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* Wine Driver for Open Sound System
|
||||
*
|
||||
* Copyright 1999 Eric Pouech
|
||||
*/
|
||||
|
||||
#include "winuser.h"
|
||||
#include "driver.h"
|
||||
#include "mmddk.h"
|
||||
#include "oss.h"
|
||||
|
||||
static struct WINE_OSS* oss = NULL;
|
||||
|
||||
/**************************************************************************
|
||||
* OSS_drvOpen [internal]
|
||||
*/
|
||||
static DWORD OSS_drvOpen(LPSTR str)
|
||||
{
|
||||
if (oss)
|
||||
return 0;
|
||||
|
||||
/* I know, this is ugly, but who cares... */
|
||||
oss = (struct WINE_OSS*)1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* OSS_drvClose [internal]
|
||||
*/
|
||||
static DWORD OSS_drvClose(DWORD dwDevID)
|
||||
{
|
||||
if (oss) {
|
||||
oss = NULL;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* OSS_DriverProc [internal]
|
||||
*/
|
||||
LONG CALLBACK OSS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
/* EPP TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n", */
|
||||
/* EPP dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
|
||||
|
||||
switch(wMsg) {
|
||||
case DRV_LOAD: return 1;
|
||||
case DRV_FREE: return 1;
|
||||
case DRV_OPEN: return OSS_drvOpen((LPSTR)dwParam1);
|
||||
case DRV_CLOSE: return OSS_drvClose(dwDevID);
|
||||
case DRV_ENABLE: return 1;
|
||||
case DRV_DISABLE: return 1;
|
||||
case DRV_QUERYCONFIGURE: return 1;
|
||||
case DRV_CONFIGURE: MessageBoxA(0, "OSS MultiMedia Driver !", "OSS Driver", MB_OK); return 1;
|
||||
case DRV_INSTALL: return DRVCNF_RESTART;
|
||||
case DRV_REMOVE: return DRVCNF_RESTART;
|
||||
default:
|
||||
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* Definition for OSS drivers : wine multimedia sub system */
|
||||
/* Definition for OSS drivers : wine multimedia system */
|
||||
|
||||
#if defined(HAVE_SYS_SOUNDCARD_H)
|
||||
# include <sys/soundcard.h>
|
||||
|
@ -19,4 +19,3 @@
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,15 +5,62 @@
|
|||
* 1999, Eric Pouech
|
||||
*
|
||||
* File: winemm.h
|
||||
* Purpose: multimedia declarations (internal to MMSYSTEM and WINMM DLL)
|
||||
* Purpose: multimedia declarations (internal to WINMM & MMSYSTEM DLLs)
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
#ifndef __WINE_MULTIMEDIA_H
|
||||
#define __WINE_MULTIMEDIA_H
|
||||
|
||||
#include "mmddk.h"
|
||||
|
||||
typedef DWORD WINAPI (*MessageProc16)(UINT16 wDevID, UINT16 wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
|
||||
typedef DWORD WINAPI (*MessageProc32)(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
typedef struct tagWINE_MLD {
|
||||
/* EPP struct tagWINE_MLD* lpNext; */ /* not used so far */
|
||||
UINT uDeviceID;
|
||||
UINT type;
|
||||
UINT mmdIndex; /* index to low-level driver in MMDrvs table */
|
||||
DWORD dwDriverInstance; /* this value is driver related, as opposed to
|
||||
* opendesc.dwInstance which is client (callback) related */
|
||||
WORD bFrom32;
|
||||
WORD dwFlags;
|
||||
DWORD dwCallback;
|
||||
DWORD dwClientInstance;
|
||||
} WINE_MLD, *LPWINE_MLD;
|
||||
|
||||
typedef struct {
|
||||
WINE_MLD mld;
|
||||
} WINE_WAVE, *LPWINE_WAVE;
|
||||
|
||||
typedef struct {
|
||||
WINE_MLD mld;
|
||||
MIDIOPENDESC mod; /* FIXME: should be removed */
|
||||
} WINE_MIDI, *LPWINE_MIDI;
|
||||
|
||||
typedef struct {
|
||||
WINE_MLD mld;
|
||||
} WINE_MIXER, *LPWINE_MIXER;
|
||||
|
||||
extern BOOL MMDRV_Init(void);
|
||||
extern UINT MMDRV_GetNum(UINT);
|
||||
extern LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
|
||||
DWORD* dwCallback, DWORD* dwInstance, BOOL bFrom32);
|
||||
extern void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld);
|
||||
extern DWORD MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD dwParam1, DWORD dwParam2);
|
||||
extern DWORD MMDRV_Close(LPWINE_MLD mld, UINT wMsg);
|
||||
extern LPWINE_MLD MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID);
|
||||
extern LPWINE_MLD MMDRV_GetRelated(HANDLE hndl, UINT srcType, BOOL bSrcCanBeID, UINT dstTyped);
|
||||
extern DWORD MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1, DWORD dwParam2, BOOL bFrom32);
|
||||
extern UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
#define MMDRV_AUX 0
|
||||
#define MMDRV_MIXER 1
|
||||
#define MMDRV_MIDIIN 2
|
||||
#define MMDRV_MIDIOUT 3
|
||||
#define MMDRV_WAVEIN 4
|
||||
#define MMDRV_WAVEOUT 5
|
||||
#define MMDRV_MAX 6
|
||||
|
||||
#define WINE_MMTHREAD_CREATED 0x4153494C /* "BSIL" */
|
||||
#define WINE_MMTHREAD_DELETED 0xDEADDEAD
|
||||
|
||||
|
@ -47,17 +94,9 @@ typedef struct tagWINE_MCIDRIVER {
|
|||
HTASK16 hCreatorTask;
|
||||
UINT uTypeCmdTable;
|
||||
UINT uSpecificCmdTable;
|
||||
struct tagWINE_MCIDRIVER* lpNext;
|
||||
struct tagWINE_MCIDRIVER*lpNext;
|
||||
} WINE_MCIDRIVER, *LPWINE_MCIDRIVER;
|
||||
|
||||
typedef enum {
|
||||
MCI_MAP_NOMEM, /* ko, memory problem */
|
||||
MCI_MAP_MSGERROR, /* ko, unknown message */
|
||||
MCI_MAP_OK, /* ok, no memory allocated. to be sent to 16 bit proc. */
|
||||
MCI_MAP_OKMEM, /* ok, some memory allocated, need to call MCI_UnMapMsg32ATo16. to be sent to 16 bit proc. */
|
||||
MCI_MAP_PASS /* ok, no memory allocated. to be sent to 32 bit proc */
|
||||
} MCI_MapType;
|
||||
|
||||
#define WINE_TIMER_IS32 0x80
|
||||
|
||||
typedef struct tagTIMERENTRY {
|
||||
|
@ -87,7 +126,11 @@ typedef struct tagWINE_MM_IDATA {
|
|||
int nSizeLpTimers;
|
||||
LPWINE_TIMERENTRY lpTimers;
|
||||
/* mci part */
|
||||
LPWINE_MCIDRIVER lpMciDrv;
|
||||
LPWINE_MCIDRIVER lpMciDrvs;
|
||||
/* low level drivers (unused yet) */
|
||||
/* LPWINE_WAVE lpWave; */
|
||||
/* LPWINE_MIDI lpMidi; */
|
||||
/* LPWINE_MIXER lpMixer; */
|
||||
} WINE_MM_IDATA, *LPWINE_MM_IDATA;
|
||||
|
||||
/* function prototypes */
|
||||
|
@ -109,33 +152,11 @@ extern DWORD MCI_SendCommandFrom32(UINT wDevID, UINT16 wMsg, DWORD dwParam1,
|
|||
extern DWORD MCI_SendCommandFrom16(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2);
|
||||
extern DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2, UINT size);
|
||||
|
||||
void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt);
|
||||
void CALLBACK WINE_mmThreadEntryPoint(DWORD _pmt);
|
||||
|
||||
void MMSYSTEM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16);
|
||||
void MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32);
|
||||
|
||||
BOOL MULTIMEDIA_MciInit(void);
|
||||
LPWINE_MM_IDATA MULTIMEDIA_GetIData(void);
|
||||
|
||||
/* the following definitions shall be removed ASAP (when low level drivers are available) */
|
||||
DWORD WINAPI auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD WINAPI mixMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD WINAPI midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD WINAPI modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD WINAPI widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD WINAPI wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
#define DCB_FUNC32 0x0007 /* (ugly hack) 32-bit FARPROC */
|
||||
#define CALLBACK_FUNC32 0x00070000l /* (ugly hack) 32-bit FARPROC */
|
||||
#define CALLBACK32CONV(x) ((((x)&CALLBACK_TYPEMASK)==CALLBACK_FUNCTION) ? \
|
||||
(((x)&~CALLBACK_TYPEMASK)|CALLBACK_FUNC32) : (x))
|
||||
|
||||
extern BOOL OSS_MidiInit(void);
|
||||
|
||||
/* end of ugly definitions */
|
||||
|
||||
#endif /* __WINE_MULTIMEDIA_H */
|
||||
|
||||
|
|
Loading…
Reference in New Issue