Sound: Change some pa to pulse

Just a bit more consistent.
This commit is contained in:
Kim Woelders 2021-04-19 06:52:07 +02:00
parent 4598a70547
commit 9b11a3d2a1
3 changed files with 18 additions and 16 deletions

View File

@ -128,7 +128,7 @@ if test "x$with_sndldr" = "xaudiofile"; then
fi
if test "x$enable_sound" = "xpulseaudio"; then
PKG_CHECK_MODULES(PA, libpulse,
PKG_CHECK_MODULES(PULSE, libpulse,
AC_DEFINE(USE_SOUND_PULSE, 1, [PulseAudio sound support]),
enable_sound=no)
fi

View File

@ -185,8 +185,8 @@ endif
if USE_SOUND_PULSE
LIBSND_PULSE = libsound_pulse.la
libsound_pulse_la_SOURCES = sound_pulse.c sound_load.c
libsound_pulse_la_CFLAGS = $(PA_CFLAGS) $(SNDLDR_CFLAGS)
libsound_pulse_la_LIBADD = $(PA_LIBS) $(SNDLDR_LIBS)
libsound_pulse_la_CFLAGS = $(PULSE_CFLAGS) $(SNDLDR_CFLAGS)
libsound_pulse_la_LIBADD = $(PULSE_LIBS) $(SNDLDR_LIBS)
libsound_pulse_la_LDFLAGS = -module -avoid-version
endif
@ -238,8 +238,10 @@ else
MODULE_SRCS = sound_esd.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) $(PA_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) $(PANGO_LIBS) $(XFT_LIBS)
MODULE_CFLAGS = $(ESD_CFLAGS) $(PA_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) $(PANGO_CFLAGS) $(XFT_CFLAGS)
MODULE_LIBS = $(ESD_LIBS) $(PULSE_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) \
$(PANGO_LIBS) $(XFT_LIBS)
MODULE_CFLAGS = $(ESD_CFLAGS) $(PULSE_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) \
$(PANGO_CFLAGS) $(XFT_CFLAGS)
endif

View File

@ -57,7 +57,7 @@ static pa_context *pa_ctx = NULL;
static int pa_block = 0;
static void _sound_pa_Exit(void);
static void _sound_pulse_Exit(void);
static int
dispatch(int block)
@ -77,7 +77,7 @@ dispatch(int block)
}
if (err < 0)
_sound_pa_Exit();
_sound_pulse_Exit();
D3printf("%s: end\n", __func__);
return err;
@ -181,7 +181,7 @@ context_state_callback(pa_context * pac, void *userdata __UNUSED__)
}
static void
_sound_pa_Destroy(Sample * s)
_sound_pulse_Destroy(Sample * s)
{
pa_operation *op;
@ -203,7 +203,7 @@ _sound_pa_Destroy(Sample * s)
}
static Sample *
_sound_pa_Load(const char *file)
_sound_pulse_Load(const char *file)
{
Sample *s;
pa_sample_spec sample_spec;
@ -262,12 +262,12 @@ _sound_pa_Load(const char *file)
bail_out:
if (sample_stream)
pa_stream_unref(sample_stream);
_sound_pa_Destroy(s);
_sound_pulse_Destroy(s);
return NULL;
}
static void
_sound_pa_Play(Sample * s)
_sound_pulse_Play(Sample * s)
{
pa_operation *op;
@ -284,7 +284,7 @@ _sound_pa_Play(Sample * s)
}
static void
_sound_pa_Exit(void)
_sound_pulse_Exit(void)
{
D2printf("%s\n", __func__);
#if 0
@ -308,7 +308,7 @@ _sound_pa_Exit(void)
}
static int
_sound_pa_Init(void)
_sound_pulse_Init(void)
{
int err;
@ -344,15 +344,15 @@ _sound_pa_Init(void)
done:
return !pa_ctx;
quit:
_sound_pa_Exit();
_sound_pulse_Exit();
goto done;
}
__EXPORT__ extern const SoundOps SoundOps_pulse;
const SoundOps SoundOps_pulse = {
_sound_pa_Init, _sound_pa_Exit, _sound_pa_Load, _sound_pa_Destroy,
_sound_pa_Play,
_sound_pulse_Init, _sound_pulse_Exit,
_sound_pulse_Load, _sound_pulse_Destroy, _sound_pulse_Play,
};
#endif /* ENABLE_SOUND && USE_SOUND_PULSE */