View | Details | Raw Unified | Return to bug 211662
Collapse All | Expand All

(-)Makefile (-1 / +6 lines)
Lines 16-21 Link Here
16
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
17
GNU_CONFIGURE=	yes
17
GNU_CONFIGURE=	yes
18
CONFIGURE_ARGS=	--enable-static \
18
CONFIGURE_ARGS=	--enable-static \
19
		--disable-alsa \
19
		--disable-arts
20
		--disable-arts
20
INSTALL_TARGET=	install-strip
21
INSTALL_TARGET=	install-strip
21
22
Lines 22-28 Link Here
22
# do not install
23
# do not install
23
MAKE_ARGS=	ckport_DATA=""
24
MAKE_ARGS=	ckport_DATA=""
24
25
25
OPTIONS_DEFINE=	DOCS ESOUND NAS PULSEAUDIO
26
OPTIONS_DEFINE=	DOCS ESOUND NAS PULSEAUDIO SNDIO
26
OPTIONS_SUB=	yes
27
OPTIONS_SUB=	yes
27
28
28
NAS_LIB_DEPENDS=libaudio.so:audio/nas
29
NAS_LIB_DEPENDS=libaudio.so:audio/nas
Lines 34-39 Link Here
34
ESOUND_CONFIGURE_ENABLE=esd
35
ESOUND_CONFIGURE_ENABLE=esd
35
ESOUND_USE=	GNOME=esound
36
ESOUND_USE=	GNOME=esound
36
37
38
SNDIO_LIB_DEPENDS=	libsndio.so:audio/sndio
39
SNDIO_CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
40
			LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
41
37
post-patch:
42
post-patch:
38
	@${REINPLACE_CMD} -e 's|/etc/libao.conf|${PREFIX}&|' \
43
	@${REINPLACE_CMD} -e 's|/etc/libao.conf|${PREFIX}&|' \
39
		${WRKSRC}/libao.conf.5 ${WRKSRC}/include/ao/ao_private.h \
44
		${WRKSRC}/libao.conf.5 ${WRKSRC}/include/ao/ao_private.h \
(-)files/patch-src_plugins_sndio_ao__sndio.c (+58 lines)
Line 0 Link Here
1
$OpenBSD: patch-src_plugins_sndio_ao_sndio_c,v 1.3 2014/05/27 19:44:56 naddy Exp $
2
--- src/plugins/sndio/ao_sndio.c.orig	2012-02-14 00:46:06 UTC
3
+++ src/plugins/sndio/ao_sndio.c
4
@@ -99,6 +99,7 @@ int ao_plugin_set_option(ao_device *devi
5
 int ao_plugin_open(ao_device *device, ao_sample_format *format)
6
 {
7
   ao_sndio_internal *internal = (ao_sndio_internal *) device->internal;
8
+  struct sio_hdl *hdl;
9
   struct sio_par par;
10
 
11
   if(!internal->dev && internal->id>=0){
12
@@ -107,20 +108,26 @@ int ao_plugin_open(ao_device *device, ao
13
     internal->dev = strdup(buf);
14
   }
15
 
16
-  internal->hdl = sio_open(internal->dev, SIO_PLAY, 0);
17
-  if (internal->hdl == NULL)
18
+  hdl = sio_open(internal->dev, SIO_PLAY, 0);
19
+  if (hdl == NULL)
20
     return 0;
21
+  internal->hdl = hdl;
22
 
23
   sio_initpar(&par);
24
   par.sig = 1;
25
-  par.le = SIO_LE_NATIVE;
26
+  if (format->bits > 8)
27
+    par.le = device->client_byte_format == AO_FMT_LITTLE ? 1 : 0;
28
   par.bits = format->bits;
29
   par.rate = format->rate;
30
   par.pchan = device->output_channels;
31
-  if (!sio_setpar(internal->hdl, &par))
32
+  if (!sio_setpar(hdl, &par))
33
     return 0;
34
-  device->driver_byte_format = AO_FMT_NATIVE;
35
-  if (!sio_start(internal->hdl))
36
+  if (!sio_getpar(hdl, &par))
37
+    return 0;
38
+  if (par.bits != format->bits)
39
+    return 0;
40
+  device->driver_byte_format = par.le ? AO_FMT_LITTLE : AO_FMT_BIG;
41
+  if (!sio_start(hdl))
42
     return 0;
43
 
44
   if(!device->inter_matrix){
45
@@ -148,9 +155,10 @@ int ao_plugin_close(ao_device *device)
46
   ao_sndio_internal *internal = (ao_sndio_internal *) device->internal;
47
   struct sio_hdl *hdl = internal->hdl;
48
 
49
-  if(hdl)
50
-    if (!sio_stop(hdl))
51
-      return 0;
52
+  if(hdl){
53
+    sio_close(hdl);
54
+    internal->hdl = NULL;
55
+  }
56
   return 1;
57
 }
58
 
(-)pkg-plist (+1 lines)
Lines 9-14 Link Here
9
%%ESOUND%%lib/ao/plugins-4/libesd.so
9
%%ESOUND%%lib/ao/plugins-4/libesd.so
10
%%NAS%%lib/ao/plugins-4/libnas.so
10
%%NAS%%lib/ao/plugins-4/libnas.so
11
%%PULSEAUDIO%%lib/ao/plugins-4/libpulse.so
11
%%PULSEAUDIO%%lib/ao/plugins-4/libpulse.so
12
%%SNDIO%%lib/ao/plugins-4/libsndio.so
12
libdata/pkgconfig/ao.pc
13
libdata/pkgconfig/ao.pc
13
man/man5/libao.conf.5.gz
14
man/man5/libao.conf.5.gz
14
share/aclocal/ao.m4
15
share/aclocal/ao.m4

Return to bug 211662