Get closer to upstream.

This commit is contained in:
ajacoutot 2021-02-11 17:52:21 +00:00
parent 00253e8c09
commit 68c9e3f04c
4 changed files with 13 additions and 39 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.114 2021/02/07 20:20:05 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.115 2021/02/11 17:52:21 ajacoutot Exp $
# XXX sndio: what to do with (channel) map
# XXX sndio: check sample format
@ -9,7 +9,7 @@ COMMENT= cross-platform networked sound server
VERSION= 14.2
DISTNAME= pulseaudio-${VERSION}
EXTRACT_SUFX= .tar.xz
REVISION= 1
REVISION= 2
SHARED_LIBS += pulse 7.1 # .23.0
SHARED_LIBS += pulse-simple 1.2 # .1.1

View File

@ -1,31 +0,0 @@
/* $OpenBSD: module-sndio-symdef.h,v 1.2 2014/03/20 17:33:09 ajacoutot Exp $ */
#ifndef foomodulesndiosymdeffoo
#define foomodulesndiosymdeffoo
#include <pulsecore/core.h>
#include <pulsecore/module.h>
#include <pulsecore/macro.h>
#define pa__init module_sndio_LTX_pa__init
#define pa__done module_sndio_LTX_pa__done
#define pa__get_author module_sndio_LTX_pa__get_author
#define pa__get_description module_sndio_LTX_pa__get_description
#define pa__get_usage module_sndio_LTX_pa__get_usage
#define pa__get_version module_sndio_LTX_pa__get_version
#define pa__get_deprecated module_sndio_LTX_pa__get_deprecated
#define pa__load_once module_sndio_LTX_pa__load_once
#define pa__get_n_used module_sndio_LTX_pa__get_n_used
int pa__init(pa_module*m);
void pa__done(pa_module*m);
int pa__get_n_used(pa_module*m);
const char* pa__get_author(void);
const char* pa__get_description(void);
const char* pa__get_usage(void);
const char* pa__get_version(void);
const char* pa__get_deprecated(void);
bool pa__load_once(void);
#endif

View File

@ -1,4 +1,4 @@
/* $OpenBSD: module-sndio.c,v 1.10 2020/04/22 09:51:25 ratchov Exp $ */
/* $OpenBSD: module-sndio.c,v 1.11 2021/02/11 17:52:21 ajacoutot Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@ -36,7 +36,6 @@
#include <pulsecore/rtpoll.h>
#include <pulsecore/poll.h>
#include "module-sndio-symdef.h"
#include "module-sndio-sysex.h"
/*
@ -277,7 +276,7 @@ sndio_sink_message(pa_msgobject *o, int code, void *data, int64_t offset,
switch (code) {
case PA_SINK_MESSAGE_GET_LATENCY:
pa_log_debug("sink:PA_SINK_MESSAGE_GET_LATENCY");
*(pa_usec_t*)data = pa_bytes_to_usec(u->par.bufsz,
*(int64_t*)data = pa_bytes_to_usec(u->par.bufsz,
&u->sink->sample_spec);
return (0);
case PA_SINK_MESSAGE_SET_STATE:
@ -331,7 +330,7 @@ sndio_source_message(pa_msgobject *o, int code, void *data, int64_t offset,
switch (code) {
case PA_SOURCE_MESSAGE_GET_LATENCY:
pa_log_debug("source:PA_SOURCE_MESSAGE_GET_LATENCY");
*(pa_usec_t*)data = pa_bytes_to_usec(u->bufsz,
*(int64_t*)data = pa_bytes_to_usec(u->bufsz,
&u->source->sample_spec);
return (0);
case PA_SOURCE_MESSAGE_SET_STATE:
@ -531,6 +530,12 @@ pa__init(pa_module *m)
u->core = m->core;
u->module = m;
u->rtpoll = pa_rtpoll_new();
if (pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll) < 0) {
pa_log("pa_thread_mq_init() failed.");
goto fail;
}
pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
if (!(ma = pa_modargs_new(m->argument, modargs))) {

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_Makefile_am,v 1.18 2020/10/26 08:26:00 ajacoutot Exp $
$OpenBSD: patch-src_Makefile_am,v 1.19 2021/02/11 17:52:21 ajacoutot Exp $
libpulsecommon-12.2.so: undefined symbol 'libintl_bindtextdomain'
@ -34,7 +34,7 @@ Index: src/Makefile.am
+module_sndio_la_SOURCES = modules/module-sndio.c
+module_sndio_la_LDFLAGS = $(MODULE_LDFLAGS)
+module_sndio_la_LIBADD = $(MODULE_LIBADD) -lsndio
+module_sndio_CFLAGS = $(AM_CFLAGS) -DPA_MODULE_NAME=module_sndio
+module_sndio_la_CFLAGS = $(AM_CFLAGS) -DPA_MODULE_NAME=module_sndio
# COREAUDIO