pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio add audio/ossplay
details: https://anonhg.NetBSD.org/pkgsrc/rev/8efa70f458e1
branches: trunk
changeset: 452374:8efa70f458e1
user: nia <nia%pkgsrc.org@localhost>
date: Sun May 09 09:06:58 2021 +0000
description:
add audio/ossplay
ossrecord records audio in Microsoft RIFF (wav) format.
ossplay plays raw PCM, Microsoft RIFF (.wav), Sun ULaw (.au), Mac AIFF (.aif)
and other types of audio files. By default the application will try to
determine the audio file's format and play audio based on the stored
inforation about sample format, number of channels and sampling rate.
NOTE: On NetBSD, use audioplay(1) and audiorecord(1) instead.
This package primarily exists to test OSSv4 compatibility.
diffstat:
audio/Makefile | 3 +-
audio/ossplay/DESCR | 9 ++
audio/ossplay/Makefile | 24 ++++++
audio/ossplay/PLIST | 6 +
audio/ossplay/distinfo | 8 ++
audio/ossplay/files/Makefile | 16 ++++
audio/ossplay/patches/patch-cmd_ossplay_ossplay.c | 89 +++++++++++++++++++++++
audio/ossplay/patches/patch-cmd_ossplay_ossplay.h | 30 +++++++
8 files changed, 184 insertions(+), 1 deletions(-)
diffs (227 lines):
diff -r a402136f60ca -r 8efa70f458e1 audio/Makefile
--- a/audio/Makefile Sun May 09 09:00:43 2021 +0000
+++ b/audio/Makefile Sun May 09 09:06:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.631 2021/05/09 08:27:21 nia Exp $
+# $NetBSD: Makefile,v 1.632 2021/05/09 09:06:58 nia Exp $
#
COMMENT= Audio tools, players, and libraries
@@ -354,6 +354,7 @@
SUBDIR+= opusfile
SUBDIR+= ossinfo
SUBDIR+= ossmix
+SUBDIR+= ossplay
SUBDIR+= osstest
SUBDIR+= ossxmix
SUBDIR+= p5-Audio-CD
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/DESCR Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,9 @@
+ossrecord records audio in Microsoft RIFF (wav) format.
+
+ossplay plays raw PCM, Microsoft RIFF (.wav), Sun ULaw (.au), Mac AIFF (.aif)
+and other types of audio files. By default the application will try to
+determine the audio file's format and play audio based on the stored
+inforation about sample format, number of channels and sampling rate.
+
+NOTE: On NetBSD, use audioplay(1) and audiorecord(1) instead.
+This package primarily exists to test OSSv4 compatibility.
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/Makefile Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1 2021/05/09 09:06:58 nia Exp $
+
+.include "../../audio/ossinfo/Makefile.common"
+
+PKGNAME= ossplay-${DISTNAME:S/oss-v//1:S/-src-bsd//1:S/-/./g}
+CATEGORIES= audio
+
+MAINTAINER= nia%NetBSD.org@localhost
+COMMENT= Command line programs for playing/recording from OSSv4 devices
+
+SUBST_CLASSES+= oss
+SUBST_STAGE.oss= pre-configure
+SUBST_MESSAGE.oss= Correcting the path to the OSS device.
+SUBST_FILES.oss+= cmd/ossplay/ossplay.c
+SUBST_SED.oss+= -e "s,/dev/dsp,${DEVOSSAUDIO},g"
+
+install-ossrecord: .PHONY
+ cd ${DESTDIR}${PREFIX}/bin && ${LN} -sf ossplay ossrecord
+ ${INSTALL_DATA} ${WRKSRC}/cmd/ossrecord/ossrecord.man \
+ ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+
+do-install: install-ossrecord
+
+.include "../../mk/bsd.pkg.mk"
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/PLIST Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2021/05/09 09:06:58 nia Exp $
+bin/ossplay
+bin/ossrecord
+share/doc/ossplay/COPYING
+share/doc/ossplay/ossplay.man
+share/doc/ossplay/ossrecord.man
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/distinfo Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2021/05/09 09:06:58 nia Exp $
+
+SHA1 (oss-v4.2-build2019-src-bsd.tar.bz2) = f6e03cbb5b5010aa48dd6d963b7e68c991c7d7dc
+RMD160 (oss-v4.2-build2019-src-bsd.tar.bz2) = be04756160843acdaacbb610d5e8ebd9f7acf572
+SHA512 (oss-v4.2-build2019-src-bsd.tar.bz2) = 9d43fa3e3abe4cf006cabfedf2c9fc51372f8cbe499c2e4bee6ba489291c31eb93b66b312054bcf92fc26df329bc3c7ef14a633fece8af38256bc7198d0c1556
+Size (oss-v4.2-build2019-src-bsd.tar.bz2) = 1723557 bytes
+SHA1 (patch-cmd_ossplay_ossplay.c) = 021c3e80e2fa75b5761e15914011b57be86b538e
+SHA1 (patch-cmd_ossplay_ossplay.h) = f955e7468c1f1fc7eacb2fe13b2e0c8f38e362d4
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/files/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/files/Makefile Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2021/05/09 09:06:58 nia Exp $
+
+CFLAGS+= -DLOCAL_BUILD
+
+OBJS= ossplay.o ossplay_console.o ossplay_decode.o
+OBJS+= ossplay_parser.o ossplay_wparser.o
+
+PROG= ossplay
+
+all: ${PROG}
+
+.c.o:
+ ${CC} ${CFLAGS} -c ${.IMPSRC}
+
+${PROG}: ${OBJS}
+ ${CC} ${LDFLAGS} -o ${PROG} ${OBJS}
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/patches/patch-cmd_ossplay_ossplay.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/patches/patch-cmd_ossplay_ossplay.c Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,89 @@
+$NetBSD: patch-cmd_ossplay_ossplay.c,v 1.1 2021/05/09 09:06:59 nia Exp $
+
+Missing features in libossaudio...
+
+--- cmd/ossplay/ossplay.c.orig 2021-05-09 08:59:30.843013379 +0000
++++ cmd/ossplay/ossplay.c
+@@ -448,6 +448,7 @@ select_playtgt (dspdev_t * dsp)
+ int i, src;
+ oss_mixer_enuminfo ei;
+
++#ifdef SNDCTL_DSP_GET_PLAYTGT_NAMES
+ if (ioctl (dsp->fd, SNDCTL_DSP_GET_PLAYTGT_NAMES, &ei) == -1)
+ {
+ perror_msg ("SNDCTL_DSP_GET_PLAYTGT_NAMES");
+@@ -491,6 +492,7 @@ select_playtgt (dspdev_t * dsp)
+ return;
+ }
+ }
++#endif
+
+ print_msg (ERRORM,
+ "Unknown playback target name '%s' - use -o? to get the list\n",
+@@ -509,6 +511,7 @@ select_recsrc (dspdev_t * dsp)
+ int i, src;
+ oss_mixer_enuminfo ei;
+
++#ifdef SNDCTL_DSP_GET_RECSRC_NAMES
+ if (ioctl (dsp->fd, SNDCTL_DSP_GET_RECSRC_NAMES, &ei) == -1)
+ {
+ perror_msg ("SNDCTL_DSP_GET_RECSRC_NAMES");
+@@ -551,6 +554,7 @@ select_recsrc (dspdev_t * dsp)
+ return;
+ }
+ }
++#endif
+
+ print_msg (ERRORM,
+ "Unknown recording source name '%s' - use -i? to get the list\n",
+@@ -1048,6 +1052,7 @@ int
+ play (dspdev_t * dsp, int fd, big_t * datamark, big_t bsize, double total_time,
+ double constant, readfunc_t * readf, decoders_queue_t * dec, seekfunc_t * seekf)
+ {
++#ifdef SNDCTL_DSP_HALT_OUTPUT
+ #define EXITPLAY(code) \
+ do { \
+ ossplay_free (buf); \
+@@ -1057,6 +1062,16 @@ play (dspdev_t * dsp, int fd, big_t * da
+ errno = 0; \
+ return (code); \
+ } while (0)
++#else
++#define EXITPLAY(code) \
++ do { \
++ ossplay_free (buf); \
++ ossplay_free (verbose_meta); \
++ clear_update (); \
++ errno = 0; \
++ return (code); \
++ } while (0)
++#endif
+
+ big_t rsize = bsize;
+ big_t filesize = *datamark;
+@@ -1151,6 +1166,7 @@ int
+ record (dspdev_t * dsp, FILE * wave_fp, const char * filename, double constant,
+ double datatime, big_t * data_size, decoders_queue_t * dec)
+ {
++#ifdef SNDCTL_DSP_HALT_INPUT
+ #define EXITREC(code) \
+ do { \
+ ossplay_free (buf); \
+@@ -1161,6 +1177,17 @@ record (dspdev_t * dsp, FILE * wave_fp,
+ ioctl (dsp->fd, SNDCTL_DSP_HALT_INPUT, NULL); \
+ return (code); \
+ } while(0)
++#else
++#define EXITREC(code) \
++ do { \
++ ossplay_free (buf); \
++ ossplay_free (verbose_meta); \
++ clear_update (); \
++ if ((eflag) && (verbose)) \
++ print_msg (VERBOSEM, "\nStopped (%d).\n", eflag-128); \
++ return (code); \
++ } while(0)
++#endif
+
+ unsigned char * buf, * obuf;
+ ssize_t l, outl;
diff -r a402136f60ca -r 8efa70f458e1 audio/ossplay/patches/patch-cmd_ossplay_ossplay.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossplay/patches/patch-cmd_ossplay_ossplay.h Sun May 09 09:06:58 2021 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-cmd_ossplay_ossplay.h,v 1.1 2021/05/09 09:06:59 nia Exp $
+
+Missing features in libossaudio...
+
+--- cmd/ossplay/ossplay.h.orig 2014-02-14 22:59:55.000000000 +0000
++++ cmd/ossplay/ossplay.h
+@@ -105,6 +105,23 @@ enum {
+ AFMT_DOUBLE64_BE,
+ AFMT_DOUBLE64_LE
+ };
++
++#ifndef AFMT_S24_PACKED
++#define AFMT_S24_PACKED (-300)
++#endif
++
++#ifndef AFMT_FLOAT
++#define AFMT_FLOAT (-301)
++#endif
++
++#ifndef AFMT_VORBIS
++#define AFMT_VORBIS (-302)
++#endif
++
++#ifndef AFMT_SPDIF_RAW
++#define AFMT_SPDIF_RAW (-303)
++#endif
++
+ #define AFMT_S24_PACKED_LE AFMT_S24_PACKED
+
+ typedef struct {
Home |
Main Index |
Thread Index |
Old Index