add media-sound/zita-ajbridge

This commit is contained in:
odrling 2020-06-05 07:08:27 +02:00
parent d6a0221d05
commit a24b54cd26
3 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST zita-ajbridge-0.8.4.tar.bz2 24544 BLAKE2B e4f0923129fd8cc38234efc0449bd5d408676cbf00e1225d563b4fb2e41b3b27541cc2be6ac6eed61b1294379b51e0f2d929553ff2053b544f62e87f3679fb10 SHA512 591c75324fdb51d705b15b7cb93ff0ff098d354277262468faba2c45741c24e0749ae9fa9169d206a4d589c7fac33d05ed33cb6ea6d9d808b3f640c7e938f244

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
<pkgmetadata>
<maintainer type="person">
<email>denis7774@gmail.com</email>
<name>Denis Reva</name>
<description>RarogCmex</description>
</maintainer>
<longdescription lang="en">Zita-ajbridge provides two applications, zita-a2j and zita-j2a. They allow to use an ALSA device as a Jack client, to provide additional capture (a2j) or playback (j2a) channels. Functionally these are equivalent to the alsa_in and alsa_out clients that come with Jack, but they provide much better audio quality. The resampling ratio will typically be stable within 1 PPM and change only very smoothly. Delay will be stable as well even under worse case conditions, e.g. the Jack client running near the end of the cycle.
The theory of operation and internals of these apps are the subject of a paper presented at LAC 2012.
The alsa device should be a 'hw:' one, i.e. direct access to a soundcard and not an ALSA 'plug' device. A well-working Jack system is assumed, running in real-time mode.
The sample rate can be the same as Jack's one, or different. Minimum delay is obtained by running the alsa device at a lower period size than Jack. This can be done safely as the alsa thread will run at a higher priority, and apart from copying to/from an internal buffer no work is done there. There are no restrictions on the product of period_size and number_of_periods as there are for alsa_in and alsa_out.
Both apps will optionally (-v option) print some information four times per second. The first number is the average loop error over the last quarter second, in samples. It should be reduced to small randowm values close to zero after 15 seconds or so. The second is the dynamic correction factor of the nominal resampling ratio. This should converge to a value close to one and not move much. You may observe small variations in these numbers when Jack apps are started or stopped. This is normal. Anything else isn't - please report.
The same -v option will enable detailed error reporting from the ALSA interface, or if all is OK print a summary of the ALSA device configuration.
The -L option forces the ALSA device to 2 channels and 16-bit sample format. This can be required when using the ALSA loop device if the other side (e.g. mplayer) does not support more channels or a floating point sample format. This will fail on real hw: devices as these can be opened in mmap mode only with their real number of channels.
When starting, and in case of major trouble, you will see the 'Starting synchronisation' message. This can happen if there is a timeout on the Jack server, e.g. a client crashed or terminated in a dirty way. Jack1 will skip one or more cycles when new apps are started, or when a large number of port connections is done in a short time. This may interrupt the audio signal, but should otherwise not have any ill consequences nor require a restart.
Both apps will suspend operation while Jack is in 'freewheeling' mode. When using Jack1, returning from freewheeling to normal mode may generate large timing errors, the result of Jack's DLL not being re-initialised properly. Both apps will wait for 15 seconds before restarting if that happens. Patches to Jack1 have been submitted, so this problem should go away in the future.
</longdescription>
</pkgmetadata>

View File

@ -0,0 +1,43 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="zita-a2j and zita-j2a - bridges between ALSA and JACK"
HOMEPAGE="https://kokkinizita.linuxaudio.org/linuxaudio/zita-ajbridge-doc/quickguide.html"
SOURCE_URI="https://kokkinizita.linuxaudio.org/linuxaudio/downloads"
SRC_URI="${SOURCE_URI}/${PN}-${PV}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RDEPEND="media-libs/alsa-lib
>=media-libs/zita-alsa-pcmi-0.3.0
>=media-libs/zita-resampler-1.6.0
virtual/jack"
DEPEND="${RDEPEND}"
BDEPEND="app-arch/gzip"
S="${WORKDIR}/${P}/source"
ADIR="${WORKDIR}/${P}/"
DOCS=( ${ADIR}/AUTHORS ${ADIR}/COPYING ${ADIR}/README )
src_prepare() {
default
sed -i -e "/ldconfig/d" "${S}"/Makefile || die
}
src_install() {
dodir /usr/bin
dodir /usr/share/man/man1
emake DESTDIR="${D}" PREFIX=/usr install
einstalldocs
pushd "${D}"/usr/share/man/man1 > /dev/null
gzip -d zita-a2j.1.gz
gzip -d zita-ajbridge.1.gz
gzip -d zita-j2a.1.gz
popd > /dev/null
}