pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun May  9 09:06:59 UTC 2021

Modified Files:
        pkgsrc/audio: Makefile
Added Files:
        pkgsrc/audio/ossplay: DESCR Makefile PLIST distinfo
        pkgsrc/audio/ossplay/files: Makefile
        pkgsrc/audio/ossplay/patches: patch-cmd_ossplay_ossplay.c
            patch-cmd_ossplay_ossplay.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.631 -r1.632 pkgsrc/audio/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ossplay/DESCR \
    pkgsrc/audio/ossplay/Makefile pkgsrc/audio/ossplay/PLIST \
    pkgsrc/audio/ossplay/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ossplay/files/Makefile
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.c \
    pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/Makefile
diff -u pkgsrc/audio/Makefile:1.631 pkgsrc/audio/Makefile:1.632
--- pkgsrc/audio/Makefile:1.631 Sun May  9 08:27:21 2021
+++ pkgsrc/audio/Makefile       Sun May  9 09:06:58 2021
@@ -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+=    opus-tools
 SUBDIR+=       opusfile
 SUBDIR+=       ossinfo
 SUBDIR+=       ossmix
+SUBDIR+=       ossplay
 SUBDIR+=       osstest
 SUBDIR+=       ossxmix
 SUBDIR+=       p5-Audio-CD

Added files:

Index: pkgsrc/audio/ossplay/DESCR
diff -u /dev/null pkgsrc/audio/ossplay/DESCR:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/DESCR  Sun May  9 09:06:58 2021
@@ -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.
Index: pkgsrc/audio/ossplay/Makefile
diff -u /dev/null pkgsrc/audio/ossplay/Makefile:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/Makefile       Sun May  9 09:06:58 2021
@@ -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"
Index: pkgsrc/audio/ossplay/PLIST
diff -u /dev/null pkgsrc/audio/ossplay/PLIST:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/PLIST  Sun May  9 09:06:58 2021
@@ -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
Index: pkgsrc/audio/ossplay/distinfo
diff -u /dev/null pkgsrc/audio/ossplay/distinfo:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/distinfo       Sun May  9 09:06:58 2021
@@ -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

Index: pkgsrc/audio/ossplay/files/Makefile
diff -u /dev/null pkgsrc/audio/ossplay/files/Makefile:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/files/Makefile Sun May  9 09:06:58 2021
@@ -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}

Index: pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.c
diff -u /dev/null pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.c:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.c    Sun May  9 09:06:59 2021
@@ -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;
Index: pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.h
diff -u /dev/null pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.h:1.1
--- /dev/null   Sun May  9 09:06:59 2021
+++ pkgsrc/audio/ossplay/patches/patch-cmd_ossplay_ossplay.h    Sun May  9 09:06:59 2021
@@ -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