2018-05-30 18:31:29 UTC
I am developing an app that supports playback and recording using
PortAudio. I am using the ALSA HostAPI on Linux and I am getting a stall
whenever I attempt to stop the stream using Pa_StopStream during playback.
I am using the October 30, 2016 version of the library.
I am operating the stream in callback mode i.e. I provide a callback
function in Pa_OpenStream.
I have inspected my application threads and here are the ones of interest:
Thread 14 (Thread 0x7f820a62c700 (LWP 258605)):
#0 0x00007f8257bf36ad in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f820f11864d in PaAlsaStream_WaitForFrames () from
#2 0x00007f820f11935d in CallbackThreadFunc () libportaudio.so.2
#3 0x00007f82578fe494 in start_thread (arg=0x7f820a62c700) at
#4 0x00007f8257bfcaff in clone () at
Thread 3 (Thread 0x7f8231d89700 (LWP 256510)):
#0 0x00007f82578ff6cd in pthread_join (threadid=140196496721664,
thread_return=0x7f8231d80fa8) at pthread_join.c:90
#1 0x00007f820f11dced in PaUnixThread_Terminate () from libportaudio.so.2
#2 0x00007f820f1162c3 in RealStop () libportaudio.so.2
#3 0x00007f820f78a855 in AudioDevice::stop (this=0x16120af0) at
I came across this assembla ticket
It appears to talk about a fix for abort. Is this relevant for my case as
well? The patch to fix that ticket appears to be part of the source code.
Do I need to specify the macro PTHREAD_CANCELED when I build my library?
Would appreciate any help.