diff options
author | B. Watson <yalhcru@gmail.com> | 2021-12-24 15:14:29 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-27 16:20:28 +0700 |
commit | 6f5d07e222fa33a355210e5aab323a35a81a95bd (patch) | |
tree | 6d2ab865e8b89f173e25cf47e68af2fc8ee9b09c /audio | |
parent | ac301615470832ce86f2158770dcc9fff8dde0de (diff) | |
download | slackbuilds-6f5d07e222fa33a355210e5aab323a35a81a95bd.tar.gz |
audio/listener: Fix for latest portaudio.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/listener/listener.SlackBuild | 14 | ||||
-rw-r--r-- | audio/listener/portaudio_default_input_device.diff | 12 |
2 files changed, 25 insertions, 1 deletions
diff --git a/audio/listener/listener.SlackBuild b/audio/listener/listener.SlackBuild index cd2c6dc70b..95affdeeac 100644 --- a/audio/listener/listener.SlackBuild +++ b/audio/listener/listener.SlackBuild @@ -15,6 +15,7 @@ # Updated to version 2.0.1 09/10/2011 # +# 20211224 bkw: BUILD=2, fix for latest portaudio. # 20170813 bkw: # - take over maintenance. If you want to buy me a beer too, I won't stop you! # - update for v2.2 (which has been out for 4+ years now) @@ -26,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=listener VERSION=${VERSION:-2.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -73,6 +74,17 @@ chown -R root:root . find . -type f -exec chmod 644 {} + find . -type d -exec chmod 755 {} + +# 20211224 bkw: PortAudio API has changed: we have to call +# Pa_GetDefaultInputDevice() to get the default input device, +# it's no longer device #0. This matters because e.g. on my system, +# device zero is the HDMI output to my monitor's speakers... which of +# course doesn't have a microphone or line input. Ideally, listener +# would let you list the input devices and choose the one you want, +# but that's more work than I want to do right now. You could set +# PA_RECOMMENDED_OUTPUT_DEVICE in the environment, but there's no +# handy tool to list the available device numbers. +patch -p1 < $CWD/portaudio_default_input_device.diff + # fix hardcoded config file path sed -i 's,/usr/local/etc,/etc,g' $PRGNAM.h manual.html diff --git a/audio/listener/portaudio_default_input_device.diff b/audio/listener/portaudio_default_input_device.diff new file mode 100644 index 0000000000..cba6fb0bc5 --- /dev/null +++ b/audio/listener/portaudio_default_input_device.diff @@ -0,0 +1,12 @@ +diff -Naur listener-2.2/paudio.c listener-2.2.patched/paudio.c +--- listener-2.2/paudio.c 2013-01-21 04:23:54.000000000 -0500 ++++ listener-2.2.patched/paudio.c 2021-12-24 15:07:16.791531492 -0500 +@@ -15,7 +15,7 @@ + err = Pa_Initialize(); + error_check(err, "Error initializing audio"); + +- pcm_param.device = 0; /* default device should be the first */ ++ pcm_param.device = Pa_GetDefaultInputDevice(); + pcm_param.channelCount = n_channels; + pcm_param.sampleFormat = paInt16; + pcm_param.suggestedLatency = 0.5; /* 0.5 seconds, in order to eliminate glitches */ |