mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-01 19:28:00 +03:00
Rename alsa09 to alsa
This commit is contained in:
-12
@@ -3,12 +3,6 @@
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* alsa card no */
|
||||
#undef ALSACARD
|
||||
|
||||
/* aduio device */
|
||||
#undef AUDIODEV_ALSA
|
||||
|
||||
/* aduio device */
|
||||
#undef AUDIODEV_OSS
|
||||
|
||||
@@ -30,9 +24,6 @@
|
||||
/* Define this if you have Alsa (libasound) installed */
|
||||
#undef ENABLE_ALSA
|
||||
|
||||
/* Define this if you have alsa 0.9.x and more installed */
|
||||
#undef ENABLE_ALSA09
|
||||
|
||||
/* Define this if you use cdrom iotctl in *BSD */
|
||||
#undef ENABLE_CDROM_BSD
|
||||
|
||||
@@ -278,9 +269,6 @@
|
||||
/* midi player */
|
||||
#undef MIDI_PLAYER
|
||||
|
||||
/* mixer device */
|
||||
#undef MIXERDEV_ALSA
|
||||
|
||||
/* mixer device */
|
||||
#undef MIXERDEV_OSS
|
||||
|
||||
|
||||
@@ -887,9 +887,6 @@ enable_cdrom
|
||||
with_cdromdev
|
||||
with_locale
|
||||
enable_bgr
|
||||
with_alsa_card
|
||||
with_alsa_pcmdev
|
||||
with_alsa_mixerdev
|
||||
with_audiodev
|
||||
with_mixerdev
|
||||
enable_midi
|
||||
@@ -1631,9 +1628,6 @@ Optional Packages:
|
||||
default|oss|alsa|esd|sun
|
||||
--with-cdromdev=# CDROM Device Name. [default=/dev/cdrom]
|
||||
--with-locale=LOCALE locale name you want to use(ex. ja_JP.ujis)
|
||||
--with-alsa-card=# ALSA Card No.
|
||||
--with-alsa-pcmdev=# ALSA PCM device No.
|
||||
--with-alsa-mixerdev=# ALSA Mixer device No.
|
||||
--with-oss-audiodev=DEVFILE DSP DEVICE
|
||||
--with-oss-mixerdev=DEVFILE MIXER DEVICE
|
||||
--with-midi-player=xxx External Midi Player default=playmidi -4
|
||||
@@ -16261,7 +16255,7 @@ $as_echo "#define ENABLE_OSS 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
|
||||
have_alsa=no
|
||||
if test "x$enable_alsa" = xyes; then
|
||||
alsa_save_CFLAGS="$CFLAGS"
|
||||
alsa_save_LDFLAGS="$LDFLAGS"
|
||||
@@ -16452,16 +16446,17 @@ fi
|
||||
|
||||
if test "x$alsa_found" = "xyes" ; then
|
||||
|
||||
$as_echo "#define ENABLE_ALSA09 1" >>confdefs.h
|
||||
$as_echo "#define ENABLE_ALSA 1" >>confdefs.h
|
||||
|
||||
have_alsa09=yes
|
||||
have_alsa=yes
|
||||
|
||||
LIBS=`echo $LIBS | sed 's/-lasound//g'`
|
||||
LIBS=`echo $LIBS | sed 's/ //'`
|
||||
LIBS="-lasound $LIBS"
|
||||
fi
|
||||
if test "x$alsa_found" = "xno" ; then
|
||||
have_alsa09=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** All of ALSA dependent parts will be disabled ***" >&5
|
||||
$as_echo "*** All of ALSA dependent parts will be disabled ***" >&6; }
|
||||
CFLAGS="$alsa_save_CFLAGS"
|
||||
LDFLAGS="$alsa_save_LDFLAGS"
|
||||
LIBS="$alsa_save_LIBS"
|
||||
@@ -16472,14 +16467,6 @@ fi
|
||||
|
||||
|
||||
|
||||
if test "x$have_alsa09" = xno; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** All of ALSA dependent parts will be disabled ***" >&5
|
||||
$as_echo "*** All of ALSA dependent parts will be disabled ***" >&6; }
|
||||
else
|
||||
|
||||
$as_echo "#define ENABLE_ALSA 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -16781,11 +16768,6 @@ case ".$DEFAULT_PLAYMODE" in
|
||||
.sun) def_am=AUDIO_PCM_SUN ;;
|
||||
*) def_am= ;;
|
||||
esac
|
||||
if test "x$have_alsa09" = xyes; then
|
||||
if test "x$def_am" != x; then
|
||||
def_am="$def_am09"
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $def_am" >&5
|
||||
$as_echo "$def_am" >&6; }
|
||||
if test "x$def_am" != x; then
|
||||
@@ -16805,8 +16787,8 @@ fi
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_sun.c"
|
||||
fi
|
||||
if test "x$have_alsa09" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_alsa09.c"
|
||||
if test "x$have_alsa" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_alsa.c"
|
||||
fi
|
||||
if test "x$no_esd" != xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_esd.c"
|
||||
@@ -16958,51 +16940,6 @@ $as_echo "#define RGB_ORDER 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
if test "x$have_alsa" = xyes ; then
|
||||
|
||||
# Check whether --with-alsa-card was given.
|
||||
if test "${with_alsa_card+set}" = set; then :
|
||||
withval=$with_alsa_card; alsacard="$withval"
|
||||
else
|
||||
alsacard="0"
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-alsa-pcmdev was given.
|
||||
if test "${with_alsa_pcmdev+set}" = set; then :
|
||||
withval=$with_alsa_pcmdev; alsapcmdev="$withval"
|
||||
else
|
||||
alsapcmdev="0"
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-alsa-mixerdev was given.
|
||||
if test "${with_alsa_mixerdev+set}" = set; then :
|
||||
withval=$with_alsa_mixerdev; alsamixerdev="$withval"
|
||||
else
|
||||
alsamixerdev="0"
|
||||
fi
|
||||
|
||||
ALSACARD=$alsacard
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ALSACARD "$alsacard"
|
||||
_ACEOF
|
||||
|
||||
MIXERDEV_ALSA=$alsamixerdev
|
||||
AUDIODEV_ALSA=$alsapcmdev
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define AUDIODEV_ALSA "$AUDIODEV_ALSA"
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define MIXERDEV_ALSA "$MIXERDEV_ALSA"
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
if test "x$have_ossaudio" = xyes ; then
|
||||
|
||||
# Check whether --with-audiodev was given.
|
||||
@@ -18592,10 +18529,8 @@ fi
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
echo " - sun ()"
|
||||
fi
|
||||
if test "x$no_alsa" != xyes; then
|
||||
if test "x$have_alsa09" = xyes; then
|
||||
echo " - alsa09 (Alsa 0.9.x)"
|
||||
fi
|
||||
if test "x$have_alsa" = xyes; then
|
||||
echo " - alsa"
|
||||
fi
|
||||
if test "x$no_esd" != xyes; then
|
||||
echo " - esd (Enlightened Sound Daemon)"
|
||||
|
||||
+8
-38
@@ -317,18 +317,13 @@ dnl fi
|
||||
dnl ],
|
||||
dnl AC_MSG_RESULT(*** All of ALSA dependent parts will be disabled ***))
|
||||
dnl fi
|
||||
|
||||
have_alsa=no
|
||||
if test "x$enable_alsa" = xyes; then
|
||||
AM_PATH_ALSA(0.9.0,
|
||||
[ AC_DEFINE(ENABLE_ALSA09,1,[Define this if you have alsa 0.9.x and more installed])
|
||||
have_alsa09=yes
|
||||
[ AC_DEFINE(ENABLE_ALSA,1,[Define this if you have Alsa (libasound) installed])
|
||||
have_alsa=yes
|
||||
],
|
||||
have_alsa09=no)
|
||||
if test "x$have_alsa09" = xno; then
|
||||
AC_MSG_RESULT(*** All of ALSA dependent parts will be disabled ***)
|
||||
else
|
||||
AC_DEFINE(ENABLE_ALSA,1,[Define this if you have Alsa (libasound) installed])
|
||||
fi
|
||||
AC_MSG_RESULT(*** All of ALSA dependent parts will be disabled ***))
|
||||
fi
|
||||
|
||||
|
||||
@@ -369,11 +364,6 @@ case ".$DEFAULT_PLAYMODE" in
|
||||
.sun) def_am=AUDIO_PCM_SUN ;;
|
||||
*) def_am= ;;
|
||||
esac
|
||||
if test "x$have_alsa09" = xyes; then
|
||||
if test "x$def_am" != x; then
|
||||
def_am="$def_am09"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($def_am)
|
||||
if test "x$def_am" != x; then
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_AUDIO_MODE, $def_am, [default audio mode])
|
||||
@@ -391,8 +381,8 @@ fi
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_sun.c"
|
||||
fi
|
||||
if test "x$have_alsa09" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_alsa09.c"
|
||||
if test "x$have_alsa" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_alsa.c"
|
||||
fi
|
||||
if test "x$no_esd" != xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_esd.c"
|
||||
@@ -512,24 +502,6 @@ else
|
||||
AC_DEFINE(RGB_ORDER,1,[Define this if X11 Pixmap color order is RGB])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl set ALSA param
|
||||
dnl
|
||||
if test "x$have_alsa" = xyes ; then
|
||||
AC_ARG_WITH(alsa-card, [ --with-alsa-card=# ALSA Card No.],
|
||||
alsacard="$withval",alsacard="0")
|
||||
AC_ARG_WITH(alsa-pcmdev, [ --with-alsa-pcmdev=# ALSA PCM device No.],
|
||||
alsapcmdev="$withval",alsapcmdev="0")
|
||||
AC_ARG_WITH(alsa-mixerdev,[ --with-alsa-mixerdev=# ALSA Mixer device No.],
|
||||
alsamixerdev="$withval",alsamixerdev="0")
|
||||
ALSACARD=$alsacard
|
||||
AC_DEFINE_UNQUOTED(ALSACARD,"$alsacard",[alsa card no])
|
||||
MIXERDEV_ALSA=$alsamixerdev
|
||||
AUDIODEV_ALSA=$alsapcmdev
|
||||
AC_DEFINE_UNQUOTED(AUDIODEV_ALSA,"$AUDIODEV_ALSA",[aduio device])
|
||||
AC_DEFINE_UNQUOTED(MIXERDEV_ALSA,"$MIXERDEV_ALSA",[mixer device])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl set OSS param
|
||||
dnl
|
||||
@@ -871,10 +843,8 @@ fi
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
echo " - sun ()"
|
||||
fi
|
||||
if test "x$no_alsa" != xyes; then
|
||||
if test "x$have_alsa09" = xyes; then
|
||||
echo " - alsa09 (Alsa 0.9.x)"
|
||||
fi
|
||||
if test "x$have_alsa" = xyes; then
|
||||
echo " - alsa"
|
||||
fi
|
||||
if test "x$no_esd" != xyes; then
|
||||
echo " - esd (Enlightened Sound Daemon)"
|
||||
|
||||
@@ -59,9 +59,7 @@ extern int oss_init(audiodevice_t *dev, char *devdsp, char *devmix);
|
||||
#endif /* ENABLE_OSS */
|
||||
|
||||
#ifdef ENABLE_ALSA
|
||||
#ifdef ENABLE_ALSA09
|
||||
extern int alsa_init(audiodevice_t *dev, char *hw, boolean automix);
|
||||
#endif /* ENABLE_ALSA09 */
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ESD
|
||||
@@ -92,7 +90,6 @@ int audio_init(audiodevice_t *a) {
|
||||
if (mode_onlyone) break;
|
||||
#endif
|
||||
#ifdef ENABLE_ALSA
|
||||
#ifdef ENABLE_ALSA09
|
||||
case AUDIO_PCM_ALSA:
|
||||
if (audio_dev_dsp == NULL) {
|
||||
audio_dev_dsp = "hw:0";
|
||||
@@ -100,7 +97,6 @@ int audio_init(audiodevice_t *a) {
|
||||
if (alsa_init(a, audio_dev_dsp, FALSE) == 0) break;
|
||||
if (mode_onlyone) break;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ENABLE_ESD
|
||||
case AUDIO_PCM_ESD:
|
||||
if (esd_init(a, NULL) == 0) break;
|
||||
|
||||
@@ -81,7 +81,6 @@ typedef struct _audiodevice audiodevice_t;
|
||||
enum {
|
||||
AUDIO_PCM_OSS,
|
||||
AUDIO_PCM_ALSA,
|
||||
AUDIO_PCM_ALSA09,
|
||||
AUDIO_PCM_ESD,
|
||||
AUDIO_PCM_SDL,
|
||||
AUDIO_PCM_ARTS,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* audio_alsa09.c alsa lowlevel acess (for 0.9.x)
|
||||
* audio_alsa.c alsa lowlevel acess (for 0.9.x)
|
||||
*
|
||||
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
|
||||
* 1998- <masaki-c@is.aist-nara.ac.jp>
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "audio.h"
|
||||
#include "audio_alsa09.h"
|
||||
#include "mixer_alsa09.c"
|
||||
#include "audio_alsa.h"
|
||||
#include "mixer_alsa.c"
|
||||
#include "music_pcm.h"
|
||||
|
||||
#ifndef SND_PROTOCOL_VERSION
|
||||
@@ -47,7 +47,7 @@ static int audio_close(audiodevice_t *audio);
|
||||
static int audio_write(audiodevice_t *audio, unsigned char *buf,int cnt);
|
||||
|
||||
static int audio_open(audiodevice_t *dev, chanfmt_t fmt) {
|
||||
audio_alsa09_t *alsa = (audio_alsa09_t *)dev->data_pcm;
|
||||
audio_alsa_t *alsa = (audio_alsa_t *)dev->data_pcm;
|
||||
struct pollfd pfds;
|
||||
snd_pcm_hw_params_t *hwparams;
|
||||
#if SND_LIB_VERSION >= SND_PROTOCOL_VERSION(1,0,0)
|
||||
@@ -139,7 +139,7 @@ static int audio_open(audiodevice_t *dev, chanfmt_t fmt) {
|
||||
}
|
||||
|
||||
static int audio_close(audiodevice_t *dev) {
|
||||
audio_alsa09_t *alsa = (audio_alsa09_t *)dev->data_pcm;
|
||||
audio_alsa_t *alsa = (audio_alsa_t *)dev->data_pcm;
|
||||
|
||||
dev->fd = -1;
|
||||
if (alsa->handle) {
|
||||
@@ -149,7 +149,7 @@ static int audio_close(audiodevice_t *dev) {
|
||||
}
|
||||
|
||||
static int audio_write(audiodevice_t *dev, unsigned char *buf, int cnt) {
|
||||
audio_alsa09_t *alsa = (audio_alsa09_t *)dev->data_pcm;
|
||||
audio_alsa_t *alsa = (audio_alsa_t *)dev->data_pcm;
|
||||
int len, err;
|
||||
|
||||
if (NULL == alsa->handle) return NG;
|
||||
@@ -193,15 +193,15 @@ static int alsa_exit(audiodevice_t *dev) {
|
||||
}
|
||||
|
||||
int alsa_init(audiodevice_t *dev, char *devname, boolean automix) {
|
||||
audio_alsa09_t *alsa;
|
||||
audio_alsa_t *alsa;
|
||||
|
||||
alsa = g_new0(audio_alsa09_t, 1);
|
||||
alsa = g_new0(audio_alsa_t, 1);
|
||||
alsa->dev = devname;
|
||||
dev->data_pcm = alsa;
|
||||
|
||||
mixer_init(dev);
|
||||
|
||||
dev->id = AUDIO_PCM_ALSA09;
|
||||
dev->id = AUDIO_PCM_ALSA;
|
||||
dev->fd = -1;
|
||||
dev->open = audio_open;
|
||||
dev->close = audio_close;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* audio_alsa09.h alsa lowlevel acess
|
||||
* audio_alsa.h alsa lowlevel acess
|
||||
*
|
||||
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
|
||||
* 1998- <masaki-c@is.aist-nara.ac.jp>
|
||||
@@ -43,12 +43,12 @@ typedef struct {
|
||||
|
||||
int mm_flag;
|
||||
char *mm_data;
|
||||
} audio_alsa09_t;
|
||||
} audio_alsa_t;
|
||||
|
||||
typedef struct {
|
||||
int card;
|
||||
int mix_dev;
|
||||
int connect[MIX_NRDEVICES];
|
||||
} mixer_alsa09_t;
|
||||
} mixer_alsa_t;
|
||||
|
||||
#endif /* __AUDIO_ALSA__ */
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* mixer_alsa09.c ALSA mixer lowlevel access (for 0.9.x)
|
||||
* mixer_alsa.c ALSA mixer lowlevel access (for 0.9.x)
|
||||
*
|
||||
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
|
||||
* 1998- <masaki-c@is.aist-nara.ac.jp>
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <string.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include "audio_alsa09.h"
|
||||
#include "audio_alsa.h"
|
||||
|
||||
#define MIXER_ELEMENT_MAX 100
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
level: 0-100
|
||||
*/
|
||||
static void mixer_set_level(audiodevice_t *dev, int ch, int level) {
|
||||
mixer_alsa09_t *amix = (mixer_alsa09_t *)dev->data_mix;
|
||||
mixer_alsa_t *amix = (mixer_alsa_t *)dev->data_mix;
|
||||
}
|
||||
|
||||
static int mixer_get_level(audiodevice_t *dev, int ch) {
|
||||
mixer_alsa09_t *amix = (mixer_alsa09_t *)dev->data_mix;
|
||||
mixer_alsa_t *amix = (mixer_alsa_t *)dev->data_mix;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ void mixer_exit(audiodevice_t *dev) {
|
||||
}
|
||||
|
||||
int mixer_init(audiodevice_t *dev) {
|
||||
mixer_alsa09_t *mix = g_new0(mixer_alsa09_t, 1);
|
||||
mixer_alsa_t *mix = g_new0(mixer_alsa_t, 1);
|
||||
mix->card = 0;
|
||||
mix->mix_dev = 0;
|
||||
dev->data_mix = mix;
|
||||
@@ -130,9 +130,7 @@ static void sys35_usage(boolean verbose) {
|
||||
puts(" : /dev/dsp : oss type (device name)");
|
||||
#endif
|
||||
#ifdef ENABLE_ALSA
|
||||
#ifdef ENABLE_ALSA09
|
||||
puts(" : hw:0,0 : alsa hardware");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
puts(" -O? : select output audio device");
|
||||
|
||||
Reference in New Issue
Block a user