Only use Alsa if 1.0 is detected.
This commit is contained in:
parent
ed3ad8852d
commit
151015fa02
|
@ -11391,9 +11391,9 @@ done
|
||||||
|
|
||||||
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
|
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
|
||||||
then
|
then
|
||||||
echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5
|
echo "$as_me:$LINENO: checking for snd_pcm_hw_params_get_access in -lasound" >&5
|
||||||
echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6
|
echo $ECHO_N "checking for snd_pcm_hw_params_get_access in -lasound... $ECHO_C" >&6
|
||||||
if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then
|
if test "${ac_cv_lib_asound_snd_pcm_hw_params_get_access+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
@ -11411,11 +11411,11 @@ extern "C"
|
||||||
#endif
|
#endif
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
builtin and then its argument prototype would still apply. */
|
builtin and then its argument prototype would still apply. */
|
||||||
char snd_pcm_open ();
|
char snd_pcm_hw_params_get_access ();
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
snd_pcm_open ();
|
snd_pcm_hw_params_get_access ();
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -11441,26 +11441,72 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_lib_asound_snd_pcm_open=yes
|
ac_cv_lib_asound_snd_pcm_hw_params_get_access=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_lib_asound_snd_pcm_open=no
|
ac_cv_lib_asound_snd_pcm_hw_params_get_access=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext \
|
rm -f conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
fi
|
fi
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5
|
echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_hw_params_get_access" >&5
|
||||||
echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6
|
echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_hw_params_get_access" >&6
|
||||||
if test $ac_cv_lib_asound_snd_pcm_open = yes; then
|
if test $ac_cv_lib_asound_snd_pcm_hw_params_get_access = yes; then
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#ifdef HAVE_ALSA_ASOUNDLIB_H
|
||||||
|
#include <alsa/asoundlib.h>
|
||||||
|
#elif defined(HAVE_SYS_ASOUNDLIB_H)
|
||||||
|
#include <sys/asoundlib.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int ret = snd_pcm_hw_params_get_access(NULL, NULL)
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define HAVE_ALSA 1
|
#define HAVE_ALSA 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
ALSALIBS="-lasound"
|
ALSALIBS="-lasound"
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
14
configure.ac
14
configure.ac
|
@ -676,14 +676,20 @@ then
|
||||||
CFLAGS="$save_CFLAGS"
|
CFLAGS="$save_CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **** Check for ALSA ****
|
dnl **** Check for ALSA 1.x ****
|
||||||
AC_SUBST(ALSALIBS,"")
|
AC_SUBST(ALSALIBS,"")
|
||||||
AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break)
|
AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break)
|
||||||
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
|
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
|
||||||
then
|
then
|
||||||
AC_CHECK_LIB(asound,snd_pcm_open,
|
AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
|
||||||
AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA including devel headers])
|
[AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
|
||||||
ALSALIBS="-lasound")
|
#include <alsa/asoundlib.h>
|
||||||
|
#elif defined(HAVE_SYS_ASOUNDLIB_H)
|
||||||
|
#include <sys/asoundlib.h>
|
||||||
|
#endif],
|
||||||
|
[int ret = snd_pcm_hw_params_get_access(NULL, NULL)],
|
||||||
|
[AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers])
|
||||||
|
ALSALIBS="-lasound"])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
|
dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
|
||||||
|
|
|
@ -8,7 +8,6 @@ EXTRALIBS = -ldxguid -luuid @ALSALIBS@
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
audio.c \
|
audio.c \
|
||||||
audio_05.c \
|
|
||||||
alsa.c \
|
alsa.c \
|
||||||
midi.c
|
midi.c
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
|
#ifdef HAVE_ALSA
|
||||||
|
|
||||||
/* internal ALSALIB functions */
|
/* internal ALSALIB functions */
|
||||||
snd_pcm_uframes_t _snd_pcm_mmap_hw_ptr(snd_pcm_t *pcm);
|
snd_pcm_uframes_t _snd_pcm_mmap_hw_ptr(snd_pcm_t *pcm);
|
||||||
|
@ -3580,9 +3580,7 @@ DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
||||||
return MMSYSERR_NOTSUPPORTED;
|
return MMSYSERR_NOTSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
#if !(defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1))
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* widMessage (WINEALSA.@)
|
* widMessage (WINEALSA.@)
|
||||||
|
@ -3594,10 +3592,6 @@ DWORD WINAPI ALSA_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||||
return MMSYSERR_NOTENABLED;
|
return MMSYSERR_NOTENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_ALSA
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* wodMessage (WINEALSA.@)
|
* wodMessage (WINEALSA.@)
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -48,14 +48,12 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "mmddk.h"
|
#include "mmddk.h"
|
||||||
#ifdef HAVE_ALSA
|
#include "alsa.h"
|
||||||
# include "alsa.h"
|
|
||||||
#endif
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(midi);
|
WINE_DEFAULT_DEBUG_CHANNEL(midi);
|
||||||
|
|
||||||
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
|
#ifdef HAVE_ALSA
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int state; /* -1 disabled, 0 is no recording started, 1 in recording, bit 2 set if in sys exclusive recording */
|
int state; /* -1 disabled, 0 is no recording started, 1 in recording, bit 2 set if in sys exclusive recording */
|
||||||
|
@ -1186,7 +1184,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1) */
|
#endif /* HAVE_ALSA */
|
||||||
|
|
||||||
|
|
||||||
/*======================================================================*
|
/*======================================================================*
|
||||||
|
@ -1200,7 +1198,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
|
||||||
*/
|
*/
|
||||||
LONG ALSA_MidiInit(void)
|
LONG ALSA_MidiInit(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
|
#ifdef HAVE_ALSA
|
||||||
static BOOL bInitDone = FALSE;
|
static BOOL bInitDone = FALSE;
|
||||||
snd_seq_client_info_t *cinfo;
|
snd_seq_client_info_t *cinfo;
|
||||||
snd_seq_port_info_t *pinfo;
|
snd_seq_port_info_t *pinfo;
|
||||||
|
@ -1266,7 +1264,7 @@ DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
||||||
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
|
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
|
||||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||||
switch (wMsg) {
|
switch (wMsg) {
|
||||||
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
|
#ifdef HAVE_ALSA
|
||||||
case DRVM_INIT:
|
case DRVM_INIT:
|
||||||
case DRVM_EXIT:
|
case DRVM_EXIT:
|
||||||
case DRVM_ENABLE:
|
case DRVM_ENABLE:
|
||||||
|
@ -1310,7 +1308,7 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
|
||||||
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
wDevID, wMsg, dwUser, dwParam1, dwParam2);
|
||||||
|
|
||||||
switch (wMsg) {
|
switch (wMsg) {
|
||||||
#if defined(HAVE_ALSA) && ((SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9) || SND_LIB_MAJOR >= 1)
|
#ifdef HAVE_ALSA
|
||||||
case DRVM_INIT:
|
case DRVM_INIT:
|
||||||
case DRVM_EXIT:
|
case DRVM_EXIT:
|
||||||
case DRVM_ENABLE:
|
case DRVM_ENABLE:
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#undef HAVE_ALLOCA_H
|
#undef HAVE_ALLOCA_H
|
||||||
|
|
||||||
/* Define if you have ALSA including devel headers */
|
/* Define if you have ALSA 1.x including devel headers */
|
||||||
#undef HAVE_ALSA
|
#undef HAVE_ALSA
|
||||||
|
|
||||||
/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
|
/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
|
||||||
|
|
Loading…
Reference in New Issue