Autofoo sound configuration cosmetics
This commit is contained in:
parent
cf552ef7f9
commit
0ef79b8771
17
configure.ac
17
configure.ac
|
@ -114,8 +114,7 @@ fi
|
|||
|
||||
if test "x$enable_sound" = "xpulseaudio"; then
|
||||
PKG_CHECK_MODULES(PA, libpulse,
|
||||
AC_DEFINE(HAVE_SOUND, 1, [Sound support])
|
||||
AC_DEFINE(HAVE_SOUND_PA, 1, [PulseAudio sound support]),
|
||||
AC_DEFINE(USE_SOUND_PULSE, 1, [PulseAudio sound support]),
|
||||
enable_sound=no)
|
||||
fi
|
||||
AM_CONDITIONAL(USE_LIBPA, test "x$enable_sound" = "xpulseaudio")
|
||||
|
@ -126,8 +125,7 @@ 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(HAVE_SOUND, 1, [Sound support])
|
||||
AC_DEFINE(HAVE_SOUND_ESD, 1, [EsounD sound support])
|
||||
AC_DEFINE(USE_SOUND_ESD, 1, [EsounD sound support])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(USE_LIBESD, test "x$enable_sound" = "xesound")
|
||||
|
@ -138,16 +136,19 @@ if test "x$enable_sound" = "xsndio"; then
|
|||
AC_CHECK_LIB(sndio, sio_open, SNDIO_LIBS="-lsndio", enable_sound=no)
|
||||
AC_SUBST(SNDIO_LIBS)
|
||||
if test "x$enable_sound" = "xsndio"; then
|
||||
AC_DEFINE(HAVE_SOUND, 1, [Sound support])
|
||||
AC_DEFINE(HAVE_SOUND_SNDIO, 1, [Sndio sound support])
|
||||
enable_sound=sndio
|
||||
AC_DEFINE(USE_SOUND_SNDIO, 1, [Sndio sound support])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(USE_LIBSNDIO, test "x$enable_sound" = "xsndio")
|
||||
|
||||
if test "x$enable_sound" != "xno" -a "x$with_sndldr" = "xnone"; then
|
||||
case x$enable_sound in
|
||||
xpulseaudio|xesound|xsndio)
|
||||
if test "x$with_sndldr" = "xnone"; then
|
||||
AC_MSG_ERROR([Sound support requires a sound loader])
|
||||
fi
|
||||
AC_DEFINE(ENABLE_SOUND, 1, [Sound support])
|
||||
;;
|
||||
esac
|
||||
|
||||
# Save CPPFLAGS/LDFLAGS and add X_... to each
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2019 Kim Woelders
|
||||
* Copyright (C) 2004-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -1508,7 +1508,7 @@ IPC_Compat(const char *params)
|
|||
_("composite"));
|
||||
}
|
||||
#endif
|
||||
#if !HAVE_SOUND
|
||||
#if !ENABLE_SOUND
|
||||
else if (!strcmp(param1, "sound"))
|
||||
{
|
||||
DialogOK(_("Message"), _("e16 was built without %s support"),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2003-2018 Kim Woelders
|
||||
* Copyright (C) 2003-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -57,7 +57,7 @@ extern const EModule ModMisc;
|
|||
extern const EModule ModPagers;
|
||||
extern const EModule ModSlideouts;
|
||||
|
||||
#if HAVE_SOUND
|
||||
#if ENABLE_SOUND
|
||||
extern const EModule ModSound;
|
||||
#endif
|
||||
extern const EModule ModTextclass;
|
||||
|
@ -91,7 +91,7 @@ const EModule *const p_modules[] = {
|
|||
&ModMisc,
|
||||
&ModPagers,
|
||||
&ModSlideouts,
|
||||
#if HAVE_SOUND
|
||||
#if ENABLE_SOUND
|
||||
&ModSound,
|
||||
#endif
|
||||
&ModTextclass,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2019 Kim Woelders
|
||||
* Copyright (C) 2004-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -697,7 +697,7 @@ static const DialogDef *const dialogs[] = {
|
|||
&DlgPagers,
|
||||
&DlgMenus,
|
||||
&DlgTooltips,
|
||||
#if HAVE_SOUND
|
||||
#if ENABLE_SOUND
|
||||
&DlgSound,
|
||||
#endif
|
||||
&DlgGroupDefaults,
|
||||
|
|
22
src/sound.c
22
src/sound.c
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2018 Kim Woelders
|
||||
* Copyright (C) 2004-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -22,7 +22,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "E.h"
|
||||
#if HAVE_SOUND
|
||||
#if ENABLE_SOUND
|
||||
#include "dialog.h"
|
||||
#include "emodule.h"
|
||||
#include "list.h"
|
||||
|
@ -30,11 +30,11 @@
|
|||
#include "sound.h"
|
||||
#include "sounds.h"
|
||||
|
||||
#if HAVE_SOUND_ESD
|
||||
#if USE_SOUND_ESD
|
||||
#define SOUND_SERVER_NAME "esd"
|
||||
#elif HAVE_SOUND_PA
|
||||
#elif USE_SOUND_PULSE
|
||||
#define SOUND_SERVER_NAME "pulseaudio"
|
||||
#elif HAVE_SOUND_SNDIO
|
||||
#elif USE_SOUND_SNDIO
|
||||
#define SOUND_SERVER_NAME "sndio"
|
||||
#else
|
||||
#error Invalid sound configuration
|
||||
|
@ -69,13 +69,13 @@ static LIST_HEAD(sound_list);
|
|||
#if USE_MODULES
|
||||
static const SoundOps *ops = NULL;
|
||||
#else
|
||||
#if HAVE_SOUND_ESD
|
||||
#if USE_SOUND_ESD
|
||||
extern const SoundOps SoundOps_esd;
|
||||
static const SoundOps *ops = &SoundOps_esd;
|
||||
#elif HAVE_SOUND_PA
|
||||
#elif USE_SOUND_PULSE
|
||||
extern const SoundOps SoundOps_pa;
|
||||
static const SoundOps *ops = &SoundOps_pa;
|
||||
#elif HAVE_SOUND_SNDIO
|
||||
#elif USE_SOUND_SNDIO
|
||||
extern const SoundOps SoundOps_sndio;
|
||||
static const SoundOps *ops = &SoundOps_sndio;
|
||||
#endif
|
||||
|
@ -299,9 +299,9 @@ SoundInit(void)
|
|||
err = -1;
|
||||
#if USE_MODULES
|
||||
if (!ops)
|
||||
#if HAVE_SOUND_ESD
|
||||
#if USE_SOUND_ESD
|
||||
ops = ModLoadSym("sound", "SoundOps", "esd");
|
||||
#elif HAVE_SOUND_PA
|
||||
#elif USE_SOUND_PULSE
|
||||
ops = ModLoadSym("sound", "SoundOps", "pa");
|
||||
#endif
|
||||
#endif
|
||||
|
@ -565,4 +565,4 @@ const EModule ModSound = {
|
|||
{N_CFG_ITEMS, SoundCfgItems}
|
||||
};
|
||||
|
||||
#endif /* HAVE_SOUND */
|
||||
#endif /* ENABLE_SOUND */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2018 Kim Woelders
|
||||
* Copyright (C) 2004-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -22,7 +22,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "E.h"
|
||||
#if defined(HAVE_SOUND) && defined(HAVE_SOUND_ESD)
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_ESD)
|
||||
#include "sound.h"
|
||||
#include <esd.h>
|
||||
|
||||
|
@ -147,4 +147,4 @@ const SoundOps SoundOps_esd = {
|
|||
_sound_esd_Play,
|
||||
};
|
||||
|
||||
#endif /* HAVE_SOUND && HAVE_SOUND_ESD */
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_ESD */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2018 Kim Woelders
|
||||
* Copyright (C) 2004-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
#include "E.h"
|
||||
|
||||
#if HAVE_SOUND
|
||||
#if ENABLE_SOUND
|
||||
#include "sound.h"
|
||||
|
||||
#if USE_SOUND_LOADER_AUDIOFILE
|
||||
|
@ -122,4 +122,4 @@ SoundSampleGetData(const char *file, SoundSampleData * ssd)
|
|||
|
||||
#endif /* USE_SOUND_LOADER_SNDFILE */
|
||||
|
||||
#endif /* HAVE_SOUND */
|
||||
#endif /* ENABLE_SOUND */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2008-2019 Kim Woelders
|
||||
* Copyright (C) 2008-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -21,7 +21,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "E.h"
|
||||
#if defined(HAVE_SOUND) && defined(HAVE_SOUND_PA)
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_PULSE)
|
||||
#include "sound.h"
|
||||
#include <fcntl.h>
|
||||
#include <pulse/pulseaudio.h>
|
||||
|
@ -354,4 +354,4 @@ const SoundOps SoundOps_pa = {
|
|||
_sound_pa_Play,
|
||||
};
|
||||
|
||||
#endif /* HAVE_SOUND && HAVE_SOUND_PA */
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_PULSE */
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012 Jonathan Armani <armani@openbsd.org>
|
||||
* Copyright (C) 2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -22,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "E.h"
|
||||
#if defined(HAVE_SOUND) && defined(HAVE_SOUND_SNDIO)
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_SNDIO)
|
||||
#include "sound.h"
|
||||
#include <sndio.h>
|
||||
|
||||
|
@ -125,4 +126,4 @@ const SoundOps SoundOps_sndio = {
|
|||
_sound_sndio_Destroy, _sound_sndio_Play,
|
||||
};
|
||||
|
||||
#endif /* HAVE_SOUND && HAVE_SOUND_SNDIO */
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_SNDIO */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2008-2010 Kim Woelders
|
||||
* Copyright (C) 2008-2020 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -89,7 +89,7 @@ typedef enum {
|
|||
SOUND_NOT_USED
|
||||
} esound_e;
|
||||
|
||||
#if HAVE_SOUND
|
||||
#if ENABLE_SOUND
|
||||
|
||||
void SoundPlay(int sound);
|
||||
|
||||
|
|
Loading…
Reference in New Issue