Commit 04b5a86c authored by Alexandre Julliard's avatar Alexandre Julliard

Merged the NAS driver written by Nicolas

Escuder <n.escuder@alineanet.com>.
parent 72a7369e
......@@ -568,6 +568,15 @@ then
ALSALIBS="-lasound")
fi
dnl **** Check for NAS ****
AC_SUBST(NASLIBS,"")
AC_CHECK_HEADERS(audio/audiolib.h,
[AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
AC_CHECK_LIB(audio,AuCreateFlow,
[AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
NASLIBS="-laudio -lXt \$(X_LIBS) \$(XLIB)"],,
[-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
dnl **** Check for broken glibc mmap64 ****
AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
......@@ -1403,6 +1412,7 @@ dlls/winmm/mciwave/Makefile
dlls/winmm/midimap/Makefile
dlls/winmm/wavemap/Makefile
dlls/winmm/winealsa/Makefile
dlls/winmm/winenas/Makefile
dlls/winmm/winearts/Makefile
dlls/winmm/wineoss/Makefile
dlls/winnls/Makefile
......
......@@ -98,6 +98,7 @@ BASEDIRS = \
winmm/wavemap \
winmm/winealsa \
winmm/winearts \
winmm/winenas \
winmm/wineoss \
winnls \
winsock \
......@@ -242,6 +243,7 @@ all: \
winearts.drv$(DLLEXT) \
winedos.dll$(DLLEXT) \
winemp3.acm$(DLLEXT) \
winenas.drv$(DLLEXT) \
wineoss.drv$(DLLEXT) \
wineps.dll$(DLLEXT) \
wineps16.dll$(DLLEXT) \
......@@ -513,6 +515,9 @@ winedos.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT)
winemp3.acm$(DLLEXT): msacm/winemp3/winemp3.acm$(DLLEXT)
$(RM) $@ && $(LN_S) msacm/winemp3/winemp3.acm$(DLLEXT) $@
winenas.drv$(DLLEXT): winmm/winenas/winenas.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/winenas/winenas.drv$(DLLEXT) $@
wineoss.drv$(DLLEXT): winmm/wineoss/wineoss.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/wineoss/wineoss.drv$(DLLEXT) $@
......@@ -633,6 +638,7 @@ winmm/winealsa/winealsa.drv$(DLLEXT): winmm/winealsa
winmm/winearts/winearts.drv$(DLLEXT): winmm/winearts
winedos/winedos.dll$(DLLEXT): winedos
msacm/winemp3/winemp3.acm$(DLLEXT): msacm/winemp3
winmm/winenas/winenas.drv$(DLLEXT): winmm/winenas
winmm/wineoss/wineoss.drv$(DLLEXT): winmm/wineoss
wineps/wineps.dll$(DLLEXT): wineps
wininet/wininet.dll$(DLLEXT): wininet
......@@ -730,6 +736,7 @@ winmm/winealsa/__install__: winealsa.drv$(DLLEXT)
winmm/winearts/__install__: winearts.drv$(DLLEXT)
winedos/__install__: winedos.dll$(DLLEXT)
msacm/winemp3/__install__: winemp3.acm$(DLLEXT)
winmm/winenas/__install__: winenas.drv$(DLLEXT)
winmm/wineoss/__install__: wineoss.drv$(DLLEXT)
wineps/__install__: wineps.dll$(DLLEXT)
wininet/__install__: wininet.dll$(DLLEXT)
......@@ -765,7 +772,7 @@ dinput: user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
dplay: dplayx.dll$(DLLEXT)
dplayx: winmm.dll$(DLLEXT) ole32.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) \
kernel32.dll$(DLLEXT)
dsound: winmm.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
dsound: winmm.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
gdi: advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) libkernel32.dll.$(LIBEXT) libntdll.dll.$(LIBEXT)
glu32: kernel32.dll$(DLLEXT)
icmp: kernel32.dll$(DLLEXT)
......@@ -842,6 +849,7 @@ winmm/midimap: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kern
winmm/wavemap: msacm32.dll$(DLLEXT) winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/winealsa: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
winmm/winearts: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/winenas: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/wineoss: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm: user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winnls: kernel32.dll$(DLLEXT)
......
Makefile
winenas.drv.dbg.c
winenas.drv.spec.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winenas.drv
IMPORTS = winmm user32 kernel32
EXTRALIBS = @NASLIBS@
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
audio.c \
nas.c
@MAKE_DLL_RULES@
### Dependencies:
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
*
* Wine Driver for NAS Network Audio System
* http://radscan.com/nas.html
*
* Copyright 2002 Nicolas Escuder <n.escuder@alineanet.com>
*
* Code massively copied from Eric Pouech's OSS driver
* and Chris Morgan aRts driver
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "nas.h"
#ifdef HAVE_NAS
static int nas = 0;
/**************************************************************************
* NAS_drvOpen [internal]
*/
static DWORD NAS_drvOpen(LPSTR str)
{
if (nas)
return 0;
/* I know, this is ugly, but who cares... */
nas = 1;
return 1;
}
/**************************************************************************
* NAS_drvClose [internal]
*/
static DWORD NAS_drvClose(DWORD dwDevID)
{
if (nas) {
nas = 0;
return 1;
}
return 0;
}
#endif /* #ifdef HAVE_NAS */
/**************************************************************************
* DriverProc (WINENAS.@)
*/
LONG CALLBACK NAS_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) {
#ifdef HAVE_NAS
case DRV_LOAD: NAS_WaveInit();
/* NAS_MidiInit(); FIXME: no midi */
return 1;
case DRV_FREE: return NAS_WaveClose();
case DRV_OPEN: return NAS_drvOpen((LPSTR)dwParam1);
case DRV_CLOSE: return NAS_drvClose(dwDevID);
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBoxA(0, "NAS MultiMedia Driver !", "NAS Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART;
#endif
default:
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
}
}
/* Definition for NAS driver : wine multimedia system
*
* Copyright 2002 Nicolas Escuder <n.escuder@alineanet.com>
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_NAS_H
#define __WINE_NAS_H
extern LONG NAS_WaveInit(void);
extern LONG NAS_WaveClose(void);
typedef unsigned int AFormat;
#endif /* __WINE_NAS_H */
@ stdcall DriverProc(long long long long long) NAS_DriverProc
@ stdcall wodMessage(long long long long long) NAS_wodMessage
......@@ -35,6 +35,12 @@
/* Define to use .string instead of .ascii */
#undef HAVE_ASM_STRING
/* Define to 1 if you have the <audio/audiolib.h> header file. */
#undef HAVE_AUDIO_AUDIOLIB_H
/* Define to 1 if you have the <audio/soundlib.h> header file. */
#undef HAVE_AUDIO_SOUNDLIB_H
/* Define to 1 if you have the `chsize' function. */
#undef HAVE_CHSIZE
......@@ -302,6 +308,9 @@
/* Define if struct msghdr contains msg_accrights */
#undef HAVE_MSGHDR_ACCRIGHTS
/* Define if you have NAS including devel headers */
#undef HAVE_NAS
/* Define to 1 if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
......
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