1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

ausio/zita-njbridge: New port: Command line client to transmit audio over a local IP network

This commit is contained in:
Yuri Victorovich 2021-07-02 12:35:19 -07:00
parent 3d112f58dc
commit 9ccea4316a
12 changed files with 141 additions and 0 deletions

View File

@ -870,6 +870,7 @@
SUBDIR += yoshimi
SUBDIR += zam-plugins-lv2
SUBDIR += zita-convolver
SUBDIR += zita-njbridge
SUBDIR += zita-resampler
SUBDIR += zrythm
SUBDIR += zynaddsubfx

View File

@ -0,0 +1,33 @@
PORTNAME= zita-njbridge
DISTVERSION= 0.4.8
CATEGORIES= audio
MASTER_SITES= https://kokkinizita.linuxaudio.org/linuxaudio/downloads/
MAINTAINER= yuri@FreeBSD.org
COMMENT= Command line client to transmit audio over a local IP network
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/../COPYING
LIB_DEPENDS= libjack.so:audio/jack \
libzita-resampler.so:audio/zita-resampler
USES= gmake localbase:ldflags tar:bzip2
USE_LDCONFIG= yes
WRKSRC_SUBDIR= source
MAKE_ARGS= MANDIR=${PREFIX}/man/man1
PLIST_FILES= bin/zita-j2n \
bin/zita-n2j \
man/man1/zita-j2n.1.gz \
man/man1/zita-n2j.1.gz \
man/man1/zita-njbridge.1.gz
post-install:
@${STRIP_CMD} \
${STAGEDIR}${PREFIX}/bin/zita-j2n \
${STAGEDIR}${PREFIX}/bin/zita-n2j
.include <bsd.port.mk>

1
audio/zita-njbridge/YURI Normal file
View File

@ -0,0 +1 @@
Needs IPV6_ADD_MEMBERSHIP

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1625242627
SHA256 (zita-njbridge-0.4.8.tar.bz2) = 101176a0bd407cab7bffd326e8d6886c1b65b212bc33f2efb97b03f926c47907
SIZE (zita-njbridge-0.4.8.tar.bz2) = 33948

View File

@ -0,0 +1,11 @@
--- netdata.cc.orig 2021-07-02 16:20:01 UTC
+++ netdata.cc
@@ -18,7 +18,7 @@
// ----------------------------------------------------------------------------
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <machine/endian.h>
#else
#include <endian.h>

View File

@ -0,0 +1,11 @@
--- pxthread.cc.orig 2021-07-02 16:43:47 UTC
+++ pxthread.cc
@@ -25,7 +25,7 @@
// ----------------------------------------------------------------------------
-#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__APPLE__) || defined(__FreeBSD__)
Pxthread::Pxthread (void)

View File

@ -0,0 +1,20 @@
--- pxthread.h.orig 2021-07-02 16:38:46 UTC
+++ pxthread.h
@@ -25,7 +25,7 @@
// ----------------------------------------------------------------------------
-#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__APPLE__) || defined(__FreeBSD__)
// NOTE: __FreeBSD_kernel__ and __GNU__ were added by the Debian maintainers
// (the latter for the HURD version of Debian). Things are reported to work
@@ -61,7 +61,7 @@ class Pxthread (private)
// ----------------------------------------------------------------------------
-#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
class Pxsema
{

View File

@ -0,0 +1,10 @@
--- zita-j2n.cc.orig 2021-07-02 16:35:56 UTC
+++ zita-j2n.cc
@@ -25,6 +25,7 @@
#include <getopt.h>
#include <math.h>
#include <sys/mman.h>
+#include <unistd.h> // for usleep
#include "jacktx.h"
#include "nettx.h"
#include "lfqueue.h"

View File

@ -0,0 +1,10 @@
--- zita-n2j.cc.orig 2021-07-02 16:38:01 UTC
+++ zita-n2j.cc
@@ -25,6 +25,7 @@
#include <signal.h>
#include <getopt.h>
#include <sys/mman.h>
+#include <unistd.h>
#include "lfqueue.h"
#include "netdata.h"
#include "zsockets.h"

View File

@ -0,0 +1,20 @@
--- zsockets.cc.orig 2020-03-17 09:49:07 UTC
+++ zsockets.cc
@@ -27,7 +27,7 @@
#include <sys/ioctl.h>
#include <sys/un.h>
#include <netinet/tcp.h>
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <netinet/in.h>
#endif
#include <net/if.h>
@@ -408,7 +408,7 @@ int sock_open_mcrecv (Sockaddr *addr, const char *ifac
}
memcpy (&mcreq.ipv6mr_multiaddr, &(A6->sin6_addr), sizeof(struct in6_addr));
mcreq.ipv6mr_interface = if_nametoindex (iface);
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
if (setsockopt (fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*) &mcreq, sizeof (mcreq)))
#else
if (setsockopt (fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, (char*) &mcreq, sizeof (mcreq)))

View File

@ -0,0 +1,10 @@
--- zsockets.h.orig 2021-07-02 16:22:01 UTC
+++ zsockets.h
@@ -23,6 +23,7 @@
#include <sys/types.h>
+#include <sys/socket.h>
#include <netdb.h>

View File

@ -0,0 +1,11 @@
Command line Jack clients to transmit full quality multichannel audio over a
local IP network, with adaptive resampling by the receiver(s). Zita-njbridge can
be used for a one-to-one connection (using UDP) or in a one-to-many system
(using multicast). Sender and receiver(s) can each have their own sample rate
and period size, and no word clock sync between them is assumed. Up 64 channels
can be transmitted, receivers can select any combination of these. On a lightly
loaded or dedicated network zita-njbridge can provide low latency (same as for
an analog connection). Additional buffering can be specified in case there is
significant network delay jitter. IPv6 is fully supported.
WWW: https://kokkinizita.linuxaudio.org/linuxaudio/