Update to 0.7.0.
This commit is contained in:
parent
516127274f
commit
0f60b900f1
@ -1,7 +1,7 @@
|
||||
# $OpenBSD: Makefile,v 1.6 2001/03/28 12:11:18 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.7 2001/06/30 13:16:40 naddy Exp $
|
||||
|
||||
COMMENT= "portable audio output library"
|
||||
DISTNAME= libao-0.6.0
|
||||
DISTNAME= libao-0.7.0
|
||||
CATEGORIES= audio
|
||||
NEED_VERSION= 1.363
|
||||
HOMEPAGE= http://www.vorbis.com
|
||||
@ -13,10 +13,10 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}/files/beta4/unix/
|
||||
MASTER_SITES= ${HOMEPAGE}/files/rc1/unix/
|
||||
|
||||
# no shared libraries?
|
||||
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "hppa") || \
|
||||
.if (${MACHINE_ARCH} == "hppa") || (${MACHINE_ARCH} == "mvme88k") || \
|
||||
(${MACHINE_ARCH} == "vax")
|
||||
|
||||
PLUGINS=
|
||||
@ -35,13 +35,6 @@ LIB_DEPENDS+= artsc.0::x11/kde/libs2
|
||||
LIB_DEPENDS+= esd.2::audio/esound
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Msun}
|
||||
post-extract:
|
||||
@mkdir ${WRKSRC}/src/plugins/sun
|
||||
@cp ${FILESDIR}/sun_Makefile.am ${WRKSRC}/src/plugins/sun/Makefile.am
|
||||
@cp ${FILESDIR}/ao_sun.c ${WRKSRC}/src/plugins/sun/ao_sun.c
|
||||
.endif
|
||||
|
||||
.endif
|
||||
|
||||
BUILD_DEPENDS= automake::devel/automake
|
||||
|
@ -1,137 +0,0 @@
|
||||
/* $OpenBSD: ao_sun.c,v 1.1 2001/03/17 23:45:47 naddy Exp $ */
|
||||
/*
|
||||
*
|
||||
* ao_sun.c Solaris/NetBSD/OpenBSD
|
||||
*
|
||||
* Original Copyright (C) Aaron Holtzman - May 1999
|
||||
* Modifications Copyright (C) Stan Seibert - July 2000
|
||||
* and Copyright (C) Christian Weisgerber - March 2001
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/audioio.h>
|
||||
|
||||
#ifndef AUDIO_ENCODING_SLINEAR
|
||||
#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR /* Solaris */
|
||||
#endif
|
||||
|
||||
#include <ao/ao.h>
|
||||
|
||||
ao_info_t ao_sun_info = {
|
||||
"Sun audio driver output",
|
||||
"sun",
|
||||
"Christian Weisgerber <naddy@openbsd.org>",
|
||||
"Outputs to the sun audio system."
|
||||
};
|
||||
|
||||
typedef struct ao_sun_internal_s {
|
||||
char *dev;
|
||||
int fd;
|
||||
} ao_sun_internal_t;
|
||||
|
||||
void ao_sun_parse_options(ao_sun_internal_t *state, ao_option_t *options)
|
||||
{
|
||||
state->dev = NULL;
|
||||
|
||||
while (options) {
|
||||
if (!strcmp(options->key, "dev"))
|
||||
state->dev = strdup(options->value);
|
||||
options = options->next;
|
||||
}
|
||||
}
|
||||
|
||||
ao_internal_t *plugin_open(uint_32 bits, uint_32 rate, uint_32 channels, ao_option_t *options)
|
||||
{
|
||||
ao_sun_internal_t *state;
|
||||
audio_info_t info;
|
||||
|
||||
state = malloc(sizeof(ao_sun_internal_t));
|
||||
|
||||
if (state == NULL) {
|
||||
fprintf(stderr,"libao: Error allocating state memory: %s\n",
|
||||
strerror(errno));
|
||||
goto ERR;
|
||||
}
|
||||
|
||||
ao_sun_parse_options(state, options);
|
||||
|
||||
if (state->dev != NULL) {
|
||||
/* open the user-specified path */
|
||||
state->fd = open(state->dev, O_WRONLY);
|
||||
if (state->fd < 0) {
|
||||
fprintf(stderr, "libao: Error opening audio device %s: %s\n",
|
||||
state->dev, strerror(errno));
|
||||
goto ERR;
|
||||
}
|
||||
} else {
|
||||
/* default */
|
||||
state->dev = strdup("/dev/audio");
|
||||
state->fd = open(state->dev, O_WRONLY);
|
||||
if (state->fd < 0) {
|
||||
fprintf(stderr,
|
||||
"libao: Could not open default device %s: %s\n",
|
||||
state->dev, strerror(errno));
|
||||
goto ERR;
|
||||
}
|
||||
}
|
||||
|
||||
AUDIO_INITINFO(&info);
|
||||
#ifdef AUMODE_PLAY /* NetBSD/OpenBSD */
|
||||
info.mode = AUMODE_PLAY;
|
||||
#endif
|
||||
info.play.encoding = AUDIO_ENCODING_SLINEAR;
|
||||
info.play.precision = bits;
|
||||
info.play.sample_rate = rate;
|
||||
info.play.channels = channels;
|
||||
|
||||
if (ioctl(state->fd, AUDIO_SETINFO, &info) < 0) {
|
||||
fprintf(stderr,
|
||||
"libao: Cannot set device to %d bits, %d Hz, %d channels: %s\n",
|
||||
bits, rate, channels, strerror(errno));
|
||||
goto ERR;
|
||||
}
|
||||
|
||||
return state;
|
||||
|
||||
ERR:
|
||||
if (state != NULL) {
|
||||
if (state->fd >= 0)
|
||||
close(state->fd);
|
||||
if (state->dev)
|
||||
free(state->dev);
|
||||
free(state);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void plugin_play(ao_internal_t *state, void *output_samples, uint_32 num_bytes)
|
||||
{
|
||||
write(((ao_sun_internal_t *)state)->fd, output_samples, num_bytes);
|
||||
}
|
||||
|
||||
void plugin_close(ao_internal_t *state)
|
||||
{
|
||||
ao_sun_internal_t *s = (ao_sun_internal_t *)state;
|
||||
close(s->fd);
|
||||
free(s->dev);
|
||||
free(s);
|
||||
}
|
||||
|
||||
int plugin_get_latency(ao_internal_t *state)
|
||||
{
|
||||
/* dummy */
|
||||
return 0;
|
||||
}
|
||||
|
||||
ao_info_t *plugin_get_driver_info(void)
|
||||
{
|
||||
return &ao_sun_info;
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
MD5 (libao-0.6.0.tar.gz) = bab8b209a9440c8426d340ee8d4238ec
|
||||
RMD160 (libao-0.6.0.tar.gz) = 2ec0da701a567eae909322094e1be4abeee543f9
|
||||
SHA1 (libao-0.6.0.tar.gz) = 329003690b2484fa79faa6d9517ff2065e1c513f
|
||||
MD5 (libao-0.7.0.tar.gz) = f4708f76c18cadc781ecbe0b9131d050
|
||||
RMD160 (libao-0.7.0.tar.gz) = 8deacf0b267eecdd77dbaa2a07e5202f1cf87ecd
|
||||
SHA1 (libao-0.7.0.tar.gz) = d092ba9cb7868561b6b40515196e5beae077f55b
|
||||
|
@ -1,28 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
if HAVE_SUN_AUDIO
|
||||
|
||||
sunltlibs = libsun.la
|
||||
sunldflags = -export-dynamic \
|
||||
-version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
||||
sunsources = ao_sun.c
|
||||
|
||||
else
|
||||
|
||||
sunltlibs =
|
||||
sunldflags =
|
||||
sunsources =
|
||||
|
||||
endif
|
||||
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include
|
||||
|
||||
libdir = $(plugindir)
|
||||
lib_LTLIBRARIES = $(sunltlibs)
|
||||
|
||||
libsun_la_LDFLAGS = $(sunldflags)
|
||||
libsun_la_SOURCES = $(sunsources)
|
||||
|
||||
EXTRA_DIST = ao_sun.c
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-configure_in,v 1.2 2001/03/17 23:45:47 naddy Exp $
|
||||
--- configure.in.orig Sat Feb 24 02:31:45 2001
|
||||
+++ configure.in Sat Mar 17 18:45:41 2001
|
||||
@@ -43,9 +43,9 @@ if test -z "$GCC"; then
|
||||
$OpenBSD: patch-configure_in,v 1.3 2001/06/30 13:16:41 naddy Exp $
|
||||
--- configure.in.orig Mon Jun 18 03:02:46 2001
|
||||
+++ configure.in Sat Jun 30 13:16:26 2001
|
||||
@@ -45,9 +45,9 @@ if test -z "$GCC"; then
|
||||
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
|
||||
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
|
||||
*)
|
||||
@ -14,7 +14,7 @@ $OpenBSD: patch-configure_in,v 1.2 2001/03/17 23:45:47 naddy Exp $
|
||||
esac
|
||||
else
|
||||
|
||||
@@ -59,9 +59,9 @@ else
|
||||
@@ -61,9 +61,9 @@ else
|
||||
CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
|
||||
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
|
||||
*)
|
||||
@ -26,22 +26,4 @@ $OpenBSD: patch-configure_in,v 1.2 2001/03/17 23:45:47 naddy Exp $
|
||||
+ PROFILE="$CFLAGS -g -pg -fsigned-char" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -133,6 +133,11 @@ else
|
||||
fi
|
||||
AC_SUBST(ALSA_LIBS)
|
||||
|
||||
+dnl Check for Sun audio
|
||||
+
|
||||
+AC_CHECK_HEADERS(sys/audioio.h)
|
||||
+AM_CONDITIONAL(HAVE_SUN_AUDIO,test "${ac_cv_header_sys_audioio_h}" = yes)
|
||||
+
|
||||
dnl Check for aRts
|
||||
|
||||
AC_PATH_PROG(ARTSC_CONFIG, artsc-config)
|
||||
@@ -160,4 +165,4 @@ AM_CONDITIONAL(HAVE_SOLARIS,test "x$have
|
||||
|
||||
CFLAGS="$CFLAGS -DAO_PLUGIN_PATH=\\\"$plugindir\\\""
|
||||
|
||||
-AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile include/ao/os_types.h src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/arts/Makefile debian/Makefile)
|
||||
+AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile include/ao/os_types.h src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/arts/Makefile src/plugins/sun/Makefile debian/Makefile)
|
||||
CFLAGS="$CFLAGS $cflags_save"
|
||||
|
@ -1,8 +1,8 @@
|
||||
$OpenBSD: patch-src_Makefile_am,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $
|
||||
--- src/Makefile.am.orig Mon Oct 30 01:46:41 2000
|
||||
+++ src/Makefile.am Wed Mar 14 00:41:09 2001
|
||||
$OpenBSD: patch-src_Makefile_am,v 1.2 2001/06/30 13:16:42 naddy Exp $
|
||||
--- src/Makefile.am.orig Sun May 13 05:30:40 2001
|
||||
+++ src/Makefile.am Sat Jun 30 13:16:26 2001
|
||||
@@ -10,6 +10,7 @@ lib_LTLIBRARIES = libao.la
|
||||
libao_la_SOURCES = audio_out.c ao_wav.c ao_null.c
|
||||
libao_la_SOURCES = audio_out.c ao_au.c ao_raw.c ao_wav.c ao_null.c
|
||||
libao_la_LDFLAGS = -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
||||
|
||||
+CFLAGS = @CFLAGS@ -DSHARED_LIB_EXT=\".so.@LIB_CURRENT@.@LIB_REVISION@\"
|
||||
|
@ -1,22 +0,0 @@
|
||||
$OpenBSD: patch-src_ao_wav_c,v 1.3 2001/03/25 21:21:16 naddy Exp $
|
||||
--- src/ao_wav.c.orig Sat Feb 24 02:31:46 2001
|
||||
+++ src/ao_wav.c Tue Mar 20 23:16:53 2001
|
||||
@@ -221,7 +221,7 @@ static void ao_wav_play(ao_internal_t *s
|
||||
|
||||
/* Swap the bytes into the swap buffer (so we don't
|
||||
mess up the output_samples buffer) */
|
||||
- for(i = 0; i < num_bytes/2; i+=2) {
|
||||
+ for(i = 0; i < num_bytes; i+=2) {
|
||||
s->swap_buffer[i] = ((char *) output_samples)[i+1];
|
||||
s->swap_buffer[i+1] = ((char *) output_samples)[i];
|
||||
}
|
||||
@@ -297,6 +297,9 @@ static void ao_wav_close(ao_internal_t *
|
||||
|
||||
ERR:
|
||||
close(s->fd);
|
||||
+ free(s->output_file);
|
||||
+ if (s->byte_swap)
|
||||
+ free(s->byte_swap);
|
||||
free(s);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_audio_out_c,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $
|
||||
--- src/audio_out.c.orig Sat Feb 24 02:31:46 2001
|
||||
+++ src/audio_out.c Wed Mar 14 01:36:51 2001
|
||||
@@ -63,7 +63,7 @@ driver_tree_t *_get_plugin(char *plugin_
|
||||
$OpenBSD: patch-src_audio_out_c,v 1.2 2001/06/30 13:16:42 naddy Exp $
|
||||
--- src/audio_out.c.orig Sun May 13 05:30:40 2001
|
||||
+++ src/audio_out.c Sat Jun 30 13:16:26 2001
|
||||
@@ -65,7 +65,7 @@ driver_tree_t *_get_plugin(char *plugin_
|
||||
driver_tree_t *dt;
|
||||
void *handle;
|
||||
|
||||
@ -10,7 +10,7 @@ $OpenBSD: patch-src_audio_out_c,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $
|
||||
if (handle) {
|
||||
dt = (driver_tree_t *)malloc(sizeof(driver_tree_t));
|
||||
if (!dt) return NULL;
|
||||
@@ -76,6 +76,9 @@ driver_tree_t *_get_plugin(char *plugin_
|
||||
@@ -78,6 +78,9 @@ driver_tree_t *_get_plugin(char *plugin_
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ $OpenBSD: patch-src_audio_out_c,v 1.1.1.1 2001/03/14 01:54:09 todd Exp $
|
||||
dt->functions->get_driver_info = dlsym(dt->handle, "plugin_get_driver_info");
|
||||
if (dlerror()) { free(dt->functions); free(dt); return NULL; }
|
||||
dt->functions->open = dlsym(dt->handle, "plugin_open");
|
||||
@@ -126,7 +129,7 @@ void ao_initialize(void)
|
||||
@@ -138,7 +141,7 @@ void ao_initialize(void)
|
||||
if (plugindir != NULL) {
|
||||
while ((plugin_dirent = readdir(plugindir)) != NULL) {
|
||||
snprintf(fullpath, FILENAME_MAX, "%s/%s", AO_PLUGIN_PATH, plugin_dirent->d_name);
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-src_plugins_Makefile_am,v 1.2 2001/03/16 11:58:45 naddy Exp $
|
||||
$OpenBSD: patch-src_plugins_Makefile_am,v 1.3 2001/06/30 13:16:42 naddy Exp $
|
||||
--- src/plugins/Makefile.am.orig Sat Dec 30 06:03:25 2000
|
||||
+++ src/plugins/Makefile.am Thu Mar 15 16:53:07 2001
|
||||
@@ -1,4 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
-SUBDIRS = oss esd alsa arts # solaris irix
|
||||
+PLUGINS = oss esd alsa arts # solaris irix
|
||||
-SUBDIRS = oss sun esd alsa arts # irix
|
||||
+PLUGINS = oss sun esd alsa arts # irix
|
||||
+SUBDIRS = $(PLUGINS)
|
||||
|
13
audio/libao/patches/patch-src_plugins_sun_Makefile_am
Normal file
13
audio/libao/patches/patch-src_plugins_sun_Makefile_am
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-src_plugins_sun_Makefile_am,v 1.1 2001/06/30 13:16:42 naddy Exp $
|
||||
--- src/plugins/sun/Makefile.am.orig Sat Jun 30 13:16:44 2001
|
||||
+++ src/plugins/sun/Makefile.am Sat Jun 30 13:17:23 2001
|
||||
@@ -5,7 +5,8 @@ AUTOMAKE_OPTIONS = foreign
|
||||
if HAVE_SUN_AUDIO
|
||||
|
||||
sunltlibs = libsun.la
|
||||
-sunldflags = -export-dynamic -avoid-version
|
||||
+sunldflags = -export-dynamic \
|
||||
+ -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
||||
sunsources = ao_sun.c
|
||||
|
||||
else
|
@ -1,2 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.arts,v 1.1 2001/03/16 11:58:46 naddy Exp $
|
||||
lib/ao/libarts.so.1.0
|
||||
@comment $OpenBSD: PFRAG.arts,v 1.2 2001/06/30 13:16:43 naddy Exp $
|
||||
lib/ao/libarts.so.1.1
|
||||
|
@ -1,2 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.esd,v 1.1 2001/03/16 11:58:47 naddy Exp $
|
||||
lib/ao/libesd.so.1.0
|
||||
@comment $OpenBSD: PFRAG.esd,v 1.2 2001/06/30 13:16:43 naddy Exp $
|
||||
lib/ao/libesd.so.1.1
|
||||
|
@ -1,5 +1,5 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.4 2001/03/20 15:25:33 naddy Exp $
|
||||
lib/libao.so.1.0
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.5 2001/06/30 13:16:43 naddy Exp $
|
||||
lib/libao.so.1.1
|
||||
DYNLIBDIR(%B)
|
||||
@exec mkdir -p %D/lib/ao
|
||||
%%arts%%
|
||||
|
@ -1,2 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.sun,v 1.1 2001/03/17 23:45:48 naddy Exp $
|
||||
lib/ao/libsun.so.1.0
|
||||
@comment $OpenBSD: PFRAG.sun,v 1.2 2001/06/30 13:16:43 naddy Exp $
|
||||
lib/ao/libsun.so.1.1
|
||||
|
Loading…
Reference in New Issue
Block a user