wine/include/multimedia.h
Todd Vierling ecc7669dfc - add -lossaudio if needed, and a check for <soundcard.h>, to configure.in
(run autoconf after this).  Note that the check has been altered to break
  out of the AC_CHECK_HEADERS after the first match - this is so
  <sys/soundcard.h>, if found on NetBSD (a `real' OSS), will not conflict
  with the emulated ossaudio.
- check for <soundcard.h> along with the other two in a mutually-exclusive
  manner in the various *.c files that need it; change include of
  "mmsystem.h" to "multimedia.h" so this logic is all in one place
- change mcicda.c to allow for CD audio manipulation on NetBSD.  This
  includes:
  * changing ioctl() calls to be NON-SPLIT with exactly 3 args; on NetBSD
    ossaudio, ioctl() is #defined to be _oss_ioctl by <soundcard.h>, and
    neither splitting with #-directives nor a two-arg ioctl work;
  * changing the #if logic to allow both FreeBSD and NetBSD to share the
    appropriate code blocks
- block out MIDI code for NetBSD (init.c) and/or missing SNDCTL_MIDI_INFO
  (midi.c, mcimidi.c).  NetBSD's OSS emulation does not (yet) support MIDI.
Thanks go to mycroft@netbsd.org for the 99% bulk of this work.
1998-12-15 17:49:02 +00:00

84 lines
2.5 KiB
C

/*****************************************************************************
* Copyright 1998, Luiz Otavio L. Zorzella
*
* File: multimedia.h
* Purpose: multimedia declarations
*
*****************************************************************************
*/
#ifndef __WINE_MULTIMEDIA_H
#define __WINE_MULTIMEDIA_H
#include "mmsystem.h"
#define MAX_MIDIINDRV (16)
/* For now I'm making 16 the maximum number of midi devices one can
* have. This should be more than enough for everybody. But as a purist,
* I intend to make it unbounded in the future, as soon as I figure
* a good way to do so.
*/
#define MAX_MIDIOUTDRV (16)
#define MAX_MCIMIDIDRV (1)
#if defined(HAVE_SYS_SOUNDCARD_H)
# include <sys/soundcard.h>
#elif defined(HAVE_MACHINE_SOUNDCARD_H)
# include <machine/soundcard.h>
#elif defined(HAVE_SOUNDCARD_H)
# include <soundcard.h>
#endif
#include <sys/errno.h>
#ifdef HAVE_OSS
#define MIDI_SEQ "/dev/sequencer"
#else
#define MIDI_DEV "/dev/midi"
#endif
#ifdef SOUND_VERSION
#define IOCTL(a,b,c) ioctl(a,b,&c)
#else
#define IOCTL(a,b,c) (c = ioctl(a,b,c))
#endif
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 int MCI_DevIDToIndex(UINT16 wDevID);
extern UINT16 MCI_FirstDevID(void);
extern UINT16 MCI_NextDevID(UINT16 wDevID);
extern BOOL32 MCI_DevIDValid(UINT16 wDevID);
extern int MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam);
extern int MCI_UnMapMsg16To32A(WORD uDevTyp, WORD wMsg, DWORD lParam);
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
typedef LONG (*MCIPROC32)(DWORD, HDRVR16, DWORD, DWORD, DWORD);
extern MCIPROC32 MCI_GetProc32(UINT16 uDevType);
extern WORD MCI_GetDevType(LPCSTR str);
extern DWORD MCI_WriteString(LPSTR lpDstStr, DWORD dstSize, LPCSTR lpSrcStr);
extern const char* MCI_CommandToString(UINT16 wMsg);
extern DWORD MCI_SendCommandAsync32(UINT32 wDevID, UINT32 wMsg, DWORD dwParam1, DWORD dwParam2);
LONG MCIWAVE_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
LONG MCIMIDI_DriverProc32(DWORD dwDevID, HDRVR16 hDriv, DWORD wMsg,
DWORD dwParam1, DWORD dwParam2);
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);
#endif /* __WINE_MULTIMEDIA_H */