Created an ALSA driver (with the help of David Hammerton and Marco

Pietrobono).
This commit is contained in:
Eric Pouech 2002-06-28 17:40:16 +00:00 committed by Alexandre Julliard
parent 5dcd27c94f
commit a120ce015c
10 changed files with 4016 additions and 1 deletions

3
configure vendored
View File

@ -13131,7 +13131,7 @@ MAKE_DLL_RULES=dlls/Makedll.rules
MAKE_PROG_RULES=programs/Makeprog.rules MAKE_PROG_RULES=programs/Makeprog.rules
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/d3d8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile" ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/d3d8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
@ -13698,6 +13698,7 @@ do
"dlls/winmm/mciwave/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/mciwave/Makefile" ;; "dlls/winmm/mciwave/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/mciwave/Makefile" ;;
"dlls/winmm/midimap/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/midimap/Makefile" ;; "dlls/winmm/midimap/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/midimap/Makefile" ;;
"dlls/winmm/wavemap/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/wavemap/Makefile" ;; "dlls/winmm/wavemap/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/wavemap/Makefile" ;;
"dlls/winmm/winealsa/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/winealsa/Makefile" ;;
"dlls/winmm/winearts/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/winearts/Makefile" ;; "dlls/winmm/winearts/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/winearts/Makefile" ;;
"dlls/winmm/wineoss/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/wineoss/Makefile" ;; "dlls/winmm/wineoss/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/wineoss/Makefile" ;;
"dlls/winnls/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winnls/Makefile" ;; "dlls/winnls/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winnls/Makefile" ;;

View File

@ -1322,6 +1322,7 @@ dlls/winmm/mciseq/Makefile
dlls/winmm/mciwave/Makefile dlls/winmm/mciwave/Makefile
dlls/winmm/midimap/Makefile dlls/winmm/midimap/Makefile
dlls/winmm/wavemap/Makefile dlls/winmm/wavemap/Makefile
dlls/winmm/winealsa/Makefile
dlls/winmm/winearts/Makefile dlls/winmm/winearts/Makefile
dlls/winmm/wineoss/Makefile dlls/winmm/wineoss/Makefile
dlls/winnls/Makefile dlls/winnls/Makefile

View File

@ -96,6 +96,7 @@ BASEDIRS = \
winmm/mciwave \ winmm/mciwave \
winmm/midimap \ winmm/midimap \
winmm/wavemap \ winmm/wavemap \
winmm/winealsa \
winmm/winearts \ winmm/winearts \
winmm/wineoss \ winmm/wineoss \
winnls \ winnls \
@ -237,6 +238,7 @@ all: \
win87em.dll$(DLLEXT) \ win87em.dll$(DLLEXT) \
winaspi.dll$(DLLEXT) \ winaspi.dll$(DLLEXT) \
windebug.dll$(DLLEXT) \ windebug.dll$(DLLEXT) \
winealsa.drv$(DLLEXT) \
winearts.drv$(DLLEXT) \ winearts.drv$(DLLEXT) \
winedos.dll$(DLLEXT) \ winedos.dll$(DLLEXT) \
winemp3.acm$(DLLEXT) \ winemp3.acm$(DLLEXT) \
@ -499,6 +501,9 @@ version.dll$(DLLEXT) ver.dll$(DLLEXT): version/version.dll$(DLLEXT)
w32skrnl.dll$(DLLEXT) w32sys.dll$(DLLEXT) win32s16.dll$(DLLEXT): win32s/w32skrnl.dll$(DLLEXT) w32skrnl.dll$(DLLEXT) w32sys.dll$(DLLEXT) win32s16.dll$(DLLEXT): win32s/w32skrnl.dll$(DLLEXT)
$(RM) $@ && $(LN_S) win32s/w32skrnl.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) win32s/w32skrnl.dll$(DLLEXT) $@
winealsa.drv$(DLLEXT): winmm/winealsa/winealsa.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/winealsa/winealsa.drv$(DLLEXT) $@
winearts.drv$(DLLEXT): winmm/winearts/winearts.drv$(DLLEXT) winearts.drv$(DLLEXT): winmm/winearts/winearts.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/winearts/winearts.drv$(DLLEXT) $@ $(RM) $@ && $(LN_S) winmm/winearts/winearts.drv$(DLLEXT) $@
@ -624,6 +629,7 @@ urlmon/urlmon.dll$(DLLEXT): urlmon
user/user32.dll$(DLLEXT): user user/user32.dll$(DLLEXT): user
version/version.dll$(DLLEXT): version version/version.dll$(DLLEXT): version
win32s/w32skrnl.dll$(DLLEXT): win32s win32s/w32skrnl.dll$(DLLEXT): win32s
winmm/winealsa/winealsa.drv$(DLLEXT): winmm/winealsa
winmm/winearts/winearts.drv$(DLLEXT): winmm/winearts winmm/winearts/winearts.drv$(DLLEXT): winmm/winearts
winedos/winedos.dll$(DLLEXT): winedos winedos/winedos.dll$(DLLEXT): winedos
msacm/winemp3/winemp3.acm$(DLLEXT): msacm/winemp3 msacm/winemp3/winemp3.acm$(DLLEXT): msacm/winemp3
@ -832,6 +838,7 @@ winmm/mciseq: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/mciwave: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) winmm/mciwave: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/midimap: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) winmm/midimap: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/wavemap: msacm32.dll$(DLLEXT) winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) 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/winearts: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
winmm/wineoss: 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) winmm: user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)

View File

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

View File

@ -0,0 +1,20 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winealsa.drv
IMPORTS = winmm user32 kernel32 ntdll
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
EXTRALIBS = -lasound
C_SRCS = \
audio.c \
audio_05.c \
alsa.c
@MAKE_DLL_RULES@
### Dependencies:

View File

@ -0,0 +1,89 @@
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
* Wine Driver for ALSA
*
* Copyright 2002 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., 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 "alsa.h"
#ifdef HAVE_ALSA
static struct WINE_ALSA* alsa = NULL;
/**************************************************************************
* ALSA_drvOpen [internal]
*/
static DWORD ALSA_drvOpen(LPSTR str)
{
if (alsa)
return 0;
/* I know, this is ugly, but who cares... */
alsa = (struct WINE_ALSA*)1;
return 1;
}
/**************************************************************************
* ALSA_drvClose [internal]
*/
static DWORD ALSA_drvClose(DWORD dwDevID)
{
if (alsa) {
alsa = NULL;
return 1;
}
return 0;
}
#endif
/**************************************************************************
* DriverProc (WINEALSA.1)
*/
LONG CALLBACK ALSA_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_ALSA
case DRV_LOAD: ALSA_WaveInit();
return 1;
case DRV_FREE: return 1;
case DRV_OPEN: return ALSA_drvOpen((LPSTR)dwParam1);
case DRV_CLOSE: return ALSA_drvClose(dwDevID);
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBoxA(0, "ALSA MultiMedia Driver !", "ALSA 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);
}
}

View File

@ -0,0 +1,27 @@
/* Definition for ALSA drivers : wine multimedia system
*
* 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_CONFIG_H
# error You must include config.h to use this header
#endif
#include <sys/asoundlib.h>
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
extern LONG ALSA_WaveInit(void);

2103
dlls/winmm/winealsa/audio.c Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
@ stdcall DriverProc(long long long long long) ALSA_DriverProc
@ stdcall wodMessage(long long long long long) ALSA_wodMessage