audio/listener: Fix for latest portaudio.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ac30161547
commit
6f5d07e222
|
@ -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
|
||||
|
||||
|
|
|
@ -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 */
|
Loading…
Reference in New Issue