Add support for Jack audio server.

This commit is contained in:
Chris Morgan 2002-12-13 02:26:18 +00:00 committed by Alexandre Julliard
parent a522385e7d
commit 4691b18520
12 changed files with 1937 additions and 2 deletions

View File

@ -89,6 +89,7 @@ DLLs:
midimap/- midi mapper midimap/- midi mapper
wavemap/- audio mapper wavemap/- audio mapper
winearts/ - ARTS audio driver winearts/ - ARTS audio driver
winejack/ - jack audio server driver
wineoss/- MM driver for OSS systems wineoss/- MM driver for OSS systems
winnls/ - National Language Support winnls/ - National Language Support
winsock/ winsock/

65
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -847,6 +847,7 @@ then
WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS]) WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS]) WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
WINE_GET_SONAME(cups,cupsGetDefault) WINE_GET_SONAME(cups,cupsGetDefault)
WINE_GET_SONAME(jack,jack_client_new)
fi fi
@ -973,6 +974,7 @@ AC_CHECK_HEADERS(\
getopt.h \ getopt.h \
ieeefp.h \ ieeefp.h \
io.h \ io.h \
jack/jack.h \
libio.h \ libio.h \
libutil.h \ libutil.h \
link.h \ link.h \
@ -1455,6 +1457,7 @@ dlls/winmm/winealsa/Makefile
dlls/winmm/winearts/Makefile dlls/winmm/winearts/Makefile
dlls/winmm/wineaudioio/Makefile dlls/winmm/wineaudioio/Makefile
dlls/winmm/winenas/Makefile dlls/winmm/winenas/Makefile
dlls/winmm/winejack/Makefile
dlls/winmm/wineoss/Makefile dlls/winmm/wineoss/Makefile
dlls/winnls/Makefile dlls/winnls/Makefile
dlls/winsock/Makefile dlls/winsock/Makefile

View File

@ -99,6 +99,7 @@ BASEDIRS = \
winmm/winealsa \ winmm/winealsa \
winmm/winearts \ winmm/winearts \
winmm/wineaudioio \ winmm/wineaudioio \
winmm/winejack \
winmm/winenas \ winmm/winenas \
winmm/wineoss \ winmm/wineoss \
winnls \ winnls \
@ -254,6 +255,7 @@ all: \
winearts.drv$(DLLEXT) \ winearts.drv$(DLLEXT) \
wineaudioio.drv$(DLLEXT) \ wineaudioio.drv$(DLLEXT) \
winedos.dll$(DLLEXT) \ winedos.dll$(DLLEXT) \
winejack.drv$(DLLEXT) \
winemp3.acm$(DLLEXT) \ winemp3.acm$(DLLEXT) \
winenas.drv$(DLLEXT) \ winenas.drv$(DLLEXT) \
wineoss.drv$(DLLEXT) \ wineoss.drv$(DLLEXT) \
@ -525,6 +527,9 @@ wineaudioio.drv$(DLLEXT): winmm/wineaudioio/wineaudioio.drv$(DLLEXT)
winedos.dll$(DLLEXT) winedos16.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT) winedos.dll$(DLLEXT) winedos16.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT)
$(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@
winejack.drv$(DLLEXT): winmm/winejack/winejack.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/winejack/winejack.drv$(DLLEXT) $@
winemp3.acm$(DLLEXT): msacm/winemp3/winemp3.acm$(DLLEXT) winemp3.acm$(DLLEXT): msacm/winemp3/winemp3.acm$(DLLEXT)
$(RM) $@ && $(LN_S) msacm/winemp3/winemp3.acm$(DLLEXT) $@ $(RM) $@ && $(LN_S) msacm/winemp3/winemp3.acm$(DLLEXT) $@
@ -1213,6 +1218,7 @@ winmm/winealsa/winealsa.drv$(DLLEXT): winmm/winealsa
winmm/winearts/winearts.drv$(DLLEXT): winmm/winearts winmm/winearts/winearts.drv$(DLLEXT): winmm/winearts
winmm/wineaudioio/wineaudioio.drv$(DLLEXT): winmm/wineaudioio winmm/wineaudioio/wineaudioio.drv$(DLLEXT): winmm/wineaudioio
winedos/winedos.dll$(DLLEXT): winedos winedos/winedos.dll$(DLLEXT): winedos
winmm/winejack/winejack.drv$(DLLEXT): winmm/winejack
msacm/winemp3/winemp3.acm$(DLLEXT): msacm/winemp3 msacm/winemp3/winemp3.acm$(DLLEXT): msacm/winemp3
winmm/winenas/winenas.drv$(DLLEXT): winmm/winenas winmm/winenas/winenas.drv$(DLLEXT): winmm/winenas
winmm/wineoss/wineoss.drv$(DLLEXT): winmm/wineoss winmm/wineoss/wineoss.drv$(DLLEXT): winmm/wineoss
@ -1313,6 +1319,7 @@ winmm/winealsa/__install__: winealsa.drv$(DLLEXT)
winmm/winearts/__install__: winearts.drv$(DLLEXT) winmm/winearts/__install__: winearts.drv$(DLLEXT)
winmm/wineaudioio/__install__: wineaudioio.drv$(DLLEXT) winmm/wineaudioio/__install__: wineaudioio.drv$(DLLEXT)
winedos/__install__: winedos.dll$(DLLEXT) winedos/__install__: winedos.dll$(DLLEXT)
winmm/winejack/__install__: winejack.drv$(DLLEXT)
msacm/winemp3/__install__: winemp3.acm$(DLLEXT) msacm/winemp3/__install__: winemp3.acm$(DLLEXT)
winmm/winenas/__install__: winenas.drv$(DLLEXT) winmm/winenas/__install__: winenas.drv$(DLLEXT)
winmm/wineoss/__install__: wineoss.drv$(DLLEXT) winmm/wineoss/__install__: wineoss.drv$(DLLEXT)

View File

@ -0,0 +1,3 @@
Makefile
winejack.drv.dbg.c
winejack.drv.spec.c

View File

@ -0,0 +1,17 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winejack.drv
IMPORTS = winmm user32 kernel32
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
audio.c \
jack.c
@MAKE_DLL_RULES@
### Dependencies:

1626
dlls/winmm/winejack/audio.c Normal file

File diff suppressed because it is too large Load Diff

178
dlls/winmm/winejack/jack.c Normal file
View File

@ -0,0 +1,178 @@
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
* Wine Driver for jack Sound Server
* http://jackit.sourceforge.net
*
* Copyright 2002 Chris Morgan
*
* 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 "wine/port.h"
#include "wine/library.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "jack.h"
#ifdef HAVE_JACK_JACK_H
static int jack = 0;
/* set this to zero or one to enable or disable tracing in here */
#define TRACING 0
#if TRACING
#define PRINTF(...) printf(...)
#else
#define PRINTF(...)
#endif
#ifndef JACK_SONAME
#define JACK_SONAME "libjack.so"
#endif
void *jackhandle = NULL;
/**************************************************************************
* JACK_drvLoad [internal]
*/
static DWORD JACK_drvLoad(void)
{
PRINTF("JACK_drvLoad()\n");
/* dynamically load the jack library if not already loaded */
if(!jackhandle)
{
jackhandle = wine_dlopen(JACK_SONAME, RTLD_NOW, NULL, 0);
PRINTF("JACK_drvLoad: JACK_SONAME == %s\n", JACK_SONAME);
PRINTF("JACK_drvLoad: jackhandle == 0x%x\n", jackhandle);
if(!jackhandle)
{
PRINTF("JACK_drvLoad: error loading the jack library %s, please install this library to use jack\n", JACK_SONAME);
jackhandle = (void*)-1;
return 0;
}
}
return 1;
}
/**************************************************************************
* JACK_drvFree [internal]
*/
/* unload the jack library on driver free */
static DWORD JACK_drvFree(void)
{
PRINTF("JACK_drvFree()\n");
if(jackhandle && (jackhandle != (void*)-1))
{
PRINTF("JACK_drvFree: calling wine_dlclose() on jackhandle\n");
wine_dlclose(jackhandle, NULL, 0);
jackhandle = NULL;
}
return 1;
}
/**************************************************************************
* JACK_drvOpen [internal]
*/
static DWORD JACK_drvOpen(LPSTR str)
{
/* if we were unable to load the jack library then fail the */
/* driver open */
if(!jackhandle)
{
PRINTF("JACK_drvOpen: unable to open the jack library, returning 0\n");
return 0;
}
if (jack)
{
PRINTF("JACK_drvOpen: jack != 0 (already open), returning 0\n");
return 0;
}
/* I know, this is ugly, but who cares... */
PRINTF("JACK_drvOpen: opened jack(set jack = 1), returning 1\n");
jack = 1;
return 1;
}
/**************************************************************************
* JACK_drvClose [internal]
*/
static DWORD JACK_drvClose(DWORD dwDevID)
{
if (jack)
{
PRINTF("JACK_drvClose: jack is nonzero, setting jack to 0 and returning 1\n");
jack = 0;
return 1;
}
PRINTF("JACK_drvClose: jack is zero(closed), returning 0\n");
return 0;
}
#endif /* #ifdef HAVE_JACK_JACK_H */
/**************************************************************************
* DriverProc (WINEJACK.1)
*/
LONG CALLBACK JACK_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_JACK_JACK_H
case DRV_LOAD:
PRINTF("JACK_DriverProc: DRV_LOAD\n");
return JACK_drvLoad();
case DRV_FREE:
PRINTF("JACK_DriverProc: DRV_FREE\n");
return JACK_drvFree();
case DRV_OPEN:
PRINTF("JACK_DriverProc: DRV_OPEN\n");
return JACK_drvOpen((LPSTR)dwParam1);
case DRV_CLOSE:
PRINTF("JACK_DriverProc: DRV_CLOSE\n");
return JACK_drvClose(dwDevID);
case DRV_ENABLE:
PRINTF("JACK_DriverProc: DRV_ENABLE\n");
return 1;
case DRV_DISABLE:
PRINTF("JACK_DriverProc: DRV_DISABLE\n");
return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBoxA(0, "jack audio driver!", "jack driver", MB_OK); return 1;
case DRV_INSTALL:
PRINTF("JACK_DriverProc: DRV_INSTALL\n");
return DRVCNF_RESTART;
case DRV_REMOVE:
PRINTF("JACK_DriverProc: DRV_REMOVE\n");
return DRVCNF_RESTART;
#endif
default:
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
}
}

View File

@ -0,0 +1,28 @@
/* Definition for jack driver : wine multimedia system
*
* Copyright 2002 Chris Morgan
*
* 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_JACK_H
#define __WINE_JACK_H
extern void *jackhandle; /* pointer to the libjack library */
extern LONG JACK_WaveInit(void);
extern LONG JACK_WaveRelease(void);
#endif /* __WINE_JACK_H */

View File

@ -0,0 +1,2 @@
@ stdcall DriverProc(long long long long long) JACK_DriverProc
@ stdcall wodMessage(long long long long long) JACK_wodMessage

View File

@ -253,8 +253,9 @@ WINE REGISTRY Version 2
"4" = "/usr/X11R6/lib/X11/fonts/Type1" "4" = "/usr/X11R6/lib/X11/fonts/Type1"
[WinMM] [WinMM]
"Drivers" = "wineoss.drv"
#"Drivers" = "winearts.drv" #"Drivers" = "winearts.drv"
#"Drivers" = "winejack.drv"
"Drivers" = "wineoss.drv"
"WaveMapper" = "msacm.drv" "WaveMapper" = "msacm.drv"
"MidiMapper" = "midimap.drv" "MidiMapper" = "midimap.drv"

View File

@ -197,6 +197,9 @@
/* Define to 1 if you have the `iswalnum' function. */ /* Define to 1 if you have the `iswalnum' function. */
#undef HAVE_ISWALNUM #undef HAVE_ISWALNUM
/* Define to 1 if you have the <jack/jack.h> header file. */
#undef HAVE_JACK_JACK_H
/* Define to 1 if you have the <jpeglib.h> header file. */ /* Define to 1 if you have the <jpeglib.h> header file. */
#undef HAVE_JPEGLIB_H #undef HAVE_JPEGLIB_H
@ -713,6 +716,9 @@
/* Define to the soname of the libGL library. */ /* Define to the soname of the libGL library. */
#undef SONAME_LIBGL #undef SONAME_LIBGL
/* Define to the soname of the libjack library. */
#undef SONAME_LIBJACK
/* Define to the soname of the libX11 library. */ /* Define to the soname of the libX11 library. */
#undef SONAME_LIBX11 #undef SONAME_LIBX11