From 06a6894e90fe7cfc62240ea57216e33e67f502f8 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Wed, 17 Mar 2021 19:34:25 +0100 Subject: [PATCH] Sound: Change some esd to esound Preparing for sound engines. --- configure.ac | 4 ++-- src/Makefile.am | 16 ++++++++-------- src/sound.c | 8 ++++---- src/{sound_esd.c => sound_esound.c} | 18 +++++++++--------- 4 files changed, 23 insertions(+), 23 deletions(-) rename src/{sound_esd.c => sound_esound.c} (90%) diff --git a/configure.ac b/configure.ac index 8574942a..ee4f9083 100644 --- a/configure.ac +++ b/configure.ac @@ -140,10 +140,10 @@ if test "x$enable_sound" = "xesound"; then AC_MSG_WARN([EsounD sound support was requested but not found.]) ]) if test "x$enable_sound" = "xesound"; then - AC_DEFINE(USE_SOUND_ESD, 1, [EsounD sound support]) + AC_DEFINE(USE_SOUND_ESOUND, 1, [EsounD sound support]) fi fi -AM_CONDITIONAL(USE_SOUND_ESD, test "x$enable_sound" = "xesound") +AM_CONDITIONAL(USE_SOUND_ESOUND, test "x$enable_sound" = "xesound") if test "x$enable_sound" = "xsndio"; then AC_CHECK_HEADERS(sndio.h,, enable_sound=no diff --git a/src/Makefile.am b/src/Makefile.am index 0d52f771..0b9d768e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -172,14 +172,14 @@ MODULE_LIBS = $(DLOPEN_LIBS) libe16dir = $(pkglibdir) -libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PULSE) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBSND_PLAYER) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) +libe16_LTLIBRARIES = $(LIBSND_ESOUND) $(LIBSND_PULSE) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBSND_PLAYER) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) -if USE_SOUND_ESD -LIBSND_ESD = libsound_esd.la -libsound_esd_la_SOURCES = sound_esd.c sound_load.c -libsound_esd_la_CFLAGS = $(ESD_CFLAGS) $(SNDLDR_CFLAGS) -libsound_esd_la_LIBADD = $(ESD_LIBS) $(SNDLDR_LIBS) -libsound_esd_la_LDFLAGS = -module -avoid-version +if USE_SOUND_ESOUND +LIBSND_ESOUND = libsound_esound.la +libsound_esound_la_SOURCES = sound_esound.c sound_load.c +libsound_esound_la_CFLAGS = $(ESD_CFLAGS) $(SNDLDR_CFLAGS) +libsound_esound_la_LIBADD = $(ESD_LIBS) $(SNDLDR_LIBS) +libsound_esound_la_LDFLAGS = -module -avoid-version endif if USE_SOUND_PULSE @@ -236,7 +236,7 @@ endif else -MODULE_SRCS = sound_esd.c sound_pulse.c sound_sndio.c sound_alsa.c sound_player.c sound_load.c \ +MODULE_SRCS = sound_esound.c sound_pulse.c sound_sndio.c sound_alsa.c sound_player.c sound_load.c \ ttfont.c text_xft.c text_pango.c MODULE_LIBS = $(ESD_LIBS) $(PULSE_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) \ $(PANGO_LIBS) $(XFT_LIBS) diff --git a/src/sound.c b/src/sound.c index deca5120..380a680e 100644 --- a/src/sound.c +++ b/src/sound.c @@ -31,9 +31,9 @@ #include "sound.h" #include "sounds.h" -#if USE_SOUND_ESD -#define SOUND_SERVER_NAME "esd" -#define SOUND_MODULE_NAME "esd" +#if USE_SOUND_ESOUND +#define SOUND_SERVER_NAME "esound" +#define SOUND_MODULE_NAME "esound" #elif USE_SOUND_PULSE #define SOUND_SERVER_NAME "pulseaudio" #define SOUND_MODULE_NAME "pulse" @@ -79,7 +79,7 @@ static LIST_HEAD(sound_list); #if USE_MODULES static const SoundOps *ops = NULL; #else -#if USE_SOUND_ESD +#if USE_SOUND_ESOUND extern const SoundOps SoundOps_esd; static const SoundOps *ops = &SoundOps_esd; #elif USE_SOUND_PULSE diff --git a/src/sound_esd.c b/src/sound_esound.c similarity index 90% rename from src/sound_esd.c rename to src/sound_esound.c index 1b77889f..f8d4be16 100644 --- a/src/sound_esd.c +++ b/src/sound_esound.c @@ -23,7 +23,7 @@ */ #include "config.h" -#if defined(ENABLE_SOUND) && defined(USE_SOUND_ESD) +#if defined(ENABLE_SOUND) && defined(USE_SOUND_ESOUND) #include #include @@ -42,7 +42,7 @@ struct _sample { static int sound_fd = -1; static Sample * -_sound_esd_Load(const char *file) +_sound_esound_Load(const char *file) { Sample *s; int err, format; @@ -97,7 +97,7 @@ _sound_esd_Load(const char *file) } static void -_sound_esd_Destroy(Sample * s) +_sound_esound_Destroy(Sample * s) { if (s->id && sound_fd >= 0) { @@ -111,7 +111,7 @@ _sound_esd_Destroy(Sample * s) } static void -_sound_esd_Play(Sample * s) +_sound_esound_Play(Sample * s) { if (sound_fd < 0) return; @@ -121,7 +121,7 @@ _sound_esd_Play(Sample * s) } static int -_sound_esd_Init(void) +_sound_esound_Init(void) { if (sound_fd >= 0) return 0; @@ -132,7 +132,7 @@ _sound_esd_Init(void) } static void -_sound_esd_Exit(void) +_sound_esound_Exit(void) { if (sound_fd < 0) return; @@ -144,8 +144,8 @@ _sound_esd_Exit(void) __EXPORT__ extern const SoundOps SoundOps_esd; const SoundOps SoundOps_esd = { - _sound_esd_Init, _sound_esd_Exit, _sound_esd_Load, _sound_esd_Destroy, - _sound_esd_Play, + _sound_esound_Init, _sound_esound_Exit, + _sound_esound_Load, _sound_esound_Destroy, _sound_esound_Play, }; -#endif /* ENABLE_SOUND && USE_SOUND_ESD */ +#endif /* ENABLE_SOUND && USE_SOUND_ESOUND */