Rafael Sadowski writes:

> Fixed that issue and also added jack as a dependency.

Here is a diff for audio/mumble that:
- Removes jack.
- Returns to portaudio-svn by bringing back a reduced patch from the
  attic.

The patch is reduced because data collection is opt-in during audio
wizard setup, the protobuf fix was added upstream, and text-to-speech
does not work anyways. Audio wizard still crashes without this patch
(https://github.com/mumble-voip/mumble/issues/1138).

I tested for several hours tonight, and it seems much more stable. I did
manage to crash it once when setting input shortcuts.

I see that jakemsr@ wrote the sndio backend for jack, which was added
upstream to jack. I propose keeping portaudio until sndio itself is
added or the sndio backend for jack is fixed. The drawback is that this
pull request mentions that PortAudio is "practically unmaintained."

WIP sndio (2016): https://github.com/mumble-voip/mumble/pull/2676

Feedback and tests are welcome.

Bug report:

After 5-10 minutes mumble becomes unresponsive to my push-to-talk key
and fails to receive audio from other users. Then I have to restart
mumble and sndiod. It is hard to reproduce, but I managed to find a way
that involves restarting mumble repeatedly. It usually triggers within
10 starts of mumble.

1. restart sndiod
/etc/rc.d/sndiod restart
2. Start jackd: jackd -d sndio
3. Use mpv and youtube-dl on a youtube video
4. Start mumble
5. Keep restarting mumble until you see
 - mumble: "zombified - calling shutdown handler"
 - jackd: "subgraph starting at mumble timed out (subgraph_wait_fd=9,
 status = 0, state = Running, pollret = 0 revents = 0x0)"
6. Once you see zombified, connect to a mumble server and try to input
voice. It will not register the input.

I also sometimes get in the jackd log:
sndio_driver: poll() error: sndio_driver.c@422

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/mumble/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile    6 Mar 2020 12:00:09 -0000       1.37
+++ Makefile    12 Mar 2020 07:21:18 -0000
@@ -3,6 +3,7 @@
 COMMENT =              low-latency voice chat client
 
 DISTNAME =             mumble-1.3.0
+REVISION =             0
 
 CATEGORIES =           audio
 
@@ -15,8 +16,8 @@ EXTRACT_SUFX =                .zip
 PERMIT_PACKAGE =       Yes
 
 WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5DBus Qt5Gui Qt5Network
-WANTLIB += Qt5Sql Qt5Svg Qt5Widgets Qt5Xml X11 Xi c crypto jack
-WANTLIB += m opus protobuf sndfile speex speexdsp ssl
+WANTLIB += Qt5Sql Qt5Svg Qt5Widgets Qt5Xml X11 Xi c crypto
+WANTLIB += m opus portaudio protobuf sndfile speex speexdsp ssl
 
 MODULES =              devel/qmake x11/qt5
 SEPARATE_BUILD =       No
@@ -26,7 +27,7 @@ BUILD_DEPENDS =               audio/celt07 \
 
 LIB_DEPENDS =          audio/libsndfile>=1.0.25p0 \
                        audio/opus \
-                       audio/jack \
+                       audio/portaudio-svn \
                        audio/speex \
                        devel/protobuf \
                        x11/qt5/qtsvg
@@ -49,6 +50,7 @@ MODQMAKE_ARGS =               MUMBLE_PREFIX=${PREFIX}
                        CONFIG+=no-crash-report \
                        CONFIG+=no-embed-qt-translations \
                        CONFIG+=no-g15 \
+                       CONFIG+=no-jackaudio \
                        CONFIG+=no-oss \
                        CONFIG+=no-overlay \
                        CONFIG+=no-pulseaudio \
@@ -56,6 +58,7 @@ MODQMAKE_ARGS =               MUMBLE_PREFIX=${PREFIX}
                        CONFIG+=no-speechd \
                        CONFIG+=no-update \
                        CONFIG+=packaged \
+                       CONFIG+=portaudio \
                        CONFIG+=release \
                        DEFINES+="LOCALE_PATH=${PREFIX}/share/mumble/locale" \
                        DEFINES+="PLUGIN_PATH=${PREFIX}/lib/mumble"
Index: patches/patch-src_mumble_AudioWizard_cpp
===================================================================
RCS file: patches/patch-src_mumble_AudioWizard_cpp
diff -N patches/patch-src_mumble_AudioWizard_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_mumble_AudioWizard_cpp    12 Mar 2020 07:21:18 -0000
@@ -0,0 +1,25 @@
+$OpenBSD: patch-src_mumble_AudioWizard_cpp,v 1.3 2019/08/05 17:42:40 sthen Exp 
$
+
+There's a convoluted threading issue: in PAAudio.cpp, around line 338,
+it will get caught in an infinite loop. It relies on the PortAudioInput
+object being destroyed in another thread, thereby setting bRunning to
+false and telling it to exit the loop, which will never happen. Luckily,
+this bug is only exposed by the AudioWizard configuration stuff. So,
+skip calling restartAudio() from on_qsOutputDelay_valueChanged() while
+the AudioWizard is starting up
+
+https://github.com/mumble-voip/mumble/issues/1138
+
+Index: src/mumble/AudioWizard.cpp
+--- src/mumble/AudioWizard.cpp.orig
++++ src/mumble/AudioWizard.cpp
+@@ -292,7 +292,8 @@ void AudioWizard::on_qcbOutputDevice_activated(int) {
+ void AudioWizard::on_qsOutputDelay_valueChanged(int v) {
+       qlOutputDelay->setText(tr("%1 ms").arg(v*10));
+       g.s.iOutputDelay = v;
+-      restartAudio();
++      if (! bInit)
++              restartAudio();
+ }
+ 
+ void AudioWizard::on_qsMaxAmp_valueChanged(int v) {

Reply via email to