I’m using an old version of the Juce lib, so it might be fixed since, but anyway, can you confirm:
I’ve a thread running with a RR priority, but lower than Alsa’s thread priority. In my thread I’m calling “sourcePlayer.setSource(0);” to remove the audio source.
Rarely, I get a deadlock here, since my thread, having a lower priority can’t take the lock, since, as soon as the audio thread releases the lock, it’s allowed to run again (higher priority), and my thread never get a chance to get it.
The only entry point for the audio thread is getNextAudioBlock, but the lock is taken while calling this method (obviously).
Do you have an idea, about how to solve this ?