in my application I need to play audio files (using ofSoundPlayer) and some generated audio coming from an NDI network stream (with ofSoundStream). The two don’t have to be played simultaneously.
Using ofSoundStream and audioIn is straightforward enough, but unfortunately when ofSoundPlayer is used it somehow fails to release the audio device. Trying to subsequently open ofSoundStream leads to the following error:
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy. [ error ] RtApiAlsa::probeDeviceOpen: pcm device (hw:0,0) won't open for output.
The error is not fixed by calling ofSoundStreamClose() before opening it again.
Interestingly enough playing a video (with gstreamer based ofVideoPlayer) does not lead to any error, so it must be something related to the sound player. I tried deleting the player object after it stops but this does not fix the issue.
So is this a bug or I am missing something, may be obvious?
thanks for helping