Commit 1644b258 authored by Alexandre Julliard's avatar Alexandre Julliard

wineoss.drv: Remove unnecessary ifdefs.

parent 255cc210
......@@ -8,7 +8,6 @@ C_SRCS = \
midi.c \
midipatch.c \
mixer.c \
mmaux.c \
oss.c
mmaux.c
@MAKE_DLL_RULES@
......@@ -55,6 +55,16 @@
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#include "windef.h"
#include "winbase.h"
......@@ -70,7 +80,6 @@
#include "ksmedia.h"
#include "initguid.h"
#include "dsdriver.h"
#include "oss.h"
#include "wine/debug.h"
#include "audio.h"
......@@ -80,8 +89,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave);
/* Allow 1% deviation for sample rates (some ES137x cards) */
#define NEAR_MATCH(rate1,rate2) (((100*((int)(rate1)-(int)(rate2)))/(rate1))==0)
#ifdef HAVE_OSS
WINE_WAVEOUT WOutDev[MAX_WAVEDRV];
WINE_WAVEIN WInDev[MAX_WAVEDRV];
unsigned numOutDev;
......@@ -3166,26 +3173,29 @@ DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD_PTR dwUser,
return MMSYSERR_NOTSUPPORTED;
}
#else /* !HAVE_OSS */
/**************************************************************************
* wodMessage (WINEOSS.7)
*/
DWORD WINAPI OSS_wodMessage(WORD wDevID, WORD wMsg, DWORD_PTR dwUser,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
return MMSYSERR_NOTENABLED;
}
/**************************************************************************
* widMessage (WINEOSS.6)
* DriverProc (WINEOSS.1)
*/
DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD_PTR dwUser,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
return MMSYSERR_NOTENABLED;
LRESULT CALLBACK OSS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
LPARAM dwParam1, LPARAM dwParam2)
{
TRACE("(%08lX, %p, %08X, %08lX, %08lX)\n",
dwDevID, hDriv, wMsg, dwParam1, dwParam2);
switch(wMsg) {
case DRV_LOAD:
case DRV_FREE:
case DRV_OPEN:
case DRV_CLOSE:
case DRV_ENABLE:
case DRV_DISABLE:
case DRV_QUERYCONFIGURE:
return 1;
case DRV_CONFIGURE: MessageBoxA(0, "OSS MultiMedia Driver !", "OSS Driver", MB_OK); return 1;
case DRV_INSTALL:
case DRV_REMOVE:
return DRV_SUCCESS;
default:
return 0;
}
}
#endif /* HAVE_OSS */
......@@ -25,8 +25,6 @@
# error You must include config.h to use this header
#endif
#ifdef HAVE_OSS
/* unless someone makes a wineserver kernel module, Unix pipes are faster than win32 events */
#define USE_PIPE_SYNC
......@@ -183,5 +181,3 @@ extern DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc);
/* dsrender.c */
extern DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
extern DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc);
#endif /* HAVE_OSS */
......@@ -42,6 +42,16 @@
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#include "windef.h"
#include "winbase.h"
......@@ -52,15 +62,12 @@
#include "mmreg.h"
#include "dsound.h"
#include "dsdriver.h"
#include "oss.h"
#include "wine/debug.h"
#include "audio.h"
WINE_DEFAULT_DEBUG_CHANNEL(dscapture);
#ifdef HAVE_OSS
/*======================================================================*
* Low level DSOUND capture definitions *
*======================================================================*/
......@@ -1327,5 +1334,3 @@ DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
memcpy(desc, &(WInDev[wDevID].ossdev.ds_desc), sizeof(DSDRIVERDESC));
return MMSYSERR_NOERROR;
}
#endif /* HAVE_OSS */
......@@ -45,6 +45,16 @@
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#include "windef.h"
#include "winbase.h"
......@@ -55,15 +65,12 @@
#include "mmreg.h"
#include "dsound.h"
#include "dsdriver.h"
#include "oss.h"
#include "wine/debug.h"
#include "audio.h"
WINE_DEFAULT_DEBUG_CHANNEL(wave);
#ifdef HAVE_OSS
/*======================================================================*
* Low level DSOUND definitions *
*======================================================================*/
......@@ -963,5 +970,3 @@ DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
*desc = WOutDev[wDevID].ossdev.ds_desc;
return MMSYSERR_NOERROR;
}
#endif /* HAVE_OSS */
......@@ -60,6 +60,16 @@
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#include "windef.h"
#include "winbase.h"
......@@ -67,7 +77,6 @@
#include "winuser.h"
#include "winnls.h"
#include "mmddk.h"
#include "oss.h"
#include "wine/unicode.h"
#include "wine/debug.h"
......
......@@ -41,6 +41,16 @@
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
......@@ -48,14 +58,11 @@
#include "winbase.h"
#include "winnls.h"
#include "mmddk.h"
#include "oss.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mixer);
#ifdef HAVE_OSS
#define MAX_MIXERDRV (6)
#define WINE_MIXER_MANUF_ID 0xAA
......@@ -1509,15 +1516,12 @@ static DWORD MIX_GetNumDevs(void)
return MIX_NumMixers;
}
#endif /* HAVE_OSS */
/**************************************************************************
* mxdMessage (WINEOSS.3)
*/
DWORD WINAPI OSS_mxdMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
#ifdef HAVE_OSS
TRACE("(%04X, %s, %08lX, %08lX, %08lX);\n", wDevID, getMessage(wMsg),
dwUser, dwParam1, dwParam2);
......@@ -1552,10 +1556,4 @@ DWORD WINAPI OSS_mxdMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
WARN("unknown message %d!\n", wMsg);
return MMSYSERR_NOTSUPPORTED;
}
#else
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg,
dwUser, dwParam1, dwParam2);
return MMSYSERR_NOTENABLED;
#endif
}
......@@ -31,18 +31,25 @@
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#include "windef.h"
#include "winbase.h"
#include "mmddk.h"
#include "oss.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mmaux);
#ifdef HAVE_OSS
#define MIXER_DEV "/dev/mixer"
static int NumDev = 6;
......@@ -220,8 +227,6 @@ static DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
return MMSYSERR_NOERROR;
}
#endif
/**************************************************************************
* auxMessage (WINEOSS.2)
*/
......@@ -231,7 +236,6 @@ DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
#ifdef HAVE_OSS
switch (wMsg) {
case DRVM_INIT:
return OSS_AuxInit();
......@@ -254,7 +258,4 @@ DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
WARN("unknown message !\n");
}
return MMSYSERR_NOTSUPPORTED;
#else
return MMSYSERR_NOTENABLED;
#endif
}
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
* Wine Driver for Open Sound System
*
* Copyright 1999 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "oss.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wave);
/**************************************************************************
* DriverProc (WINEOSS.1)
*/
LRESULT CALLBACK OSS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
LPARAM dwParam1, LPARAM dwParam2)
{
TRACE("(%08lX, %p, %08X, %08lX, %08lX)\n",
dwDevID, hDriv, wMsg, dwParam1, dwParam2);
switch(wMsg) {
#ifdef HAVE_OSS
case DRV_LOAD:
case DRV_FREE:
case DRV_OPEN:
case DRV_CLOSE:
case DRV_ENABLE:
case DRV_DISABLE:
case DRV_QUERYCONFIGURE:
return 1;
case DRV_CONFIGURE: MessageBoxA(0, "OSS MultiMedia Driver !", "OSS Driver", MB_OK); return 1;
case DRV_INSTALL:
case DRV_REMOVE:
return DRV_SUCCESS;
#endif
default:
return 0;
}
}
/* Definition for OSS drivers : wine multimedia system
*
* Copyright 1999 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
#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
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
/* check for one of the Open Sound System specific SNDCTL_ defines */
#ifdef SNDCTL_DSP_STEREO
# define HAVE_OSS
#endif
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