Created attachment 228816 [details] patch for audio/portaudio audio/portaudio has had --without-alsa since it was added as audio/portaudio2. I don't know the reason for that, so I'll make that available as the option ALSA. This will be another route to the PulseAudio sink. make makepatch corrected the offset of the patches line number.
Created attachment 228818 [details] poudriere log Log built with ALSA turned on.
This will have to be resolved differently if it is switched to CMake.
Created attachment 246036 [details] portaudio-19.7.0,1.patch Update to 19.7.0 https://github.com/PortAudio/portaudio/wiki/ReleaseNotes It also includes a patch to support ALSA.
(In reply to takefu from comment #3) When FreeBSD uses ALSA, some behavior is not as intended because there is no direct I/O to the physical hardware. So updating to the current stable version might be better to go through first by a separate report.
Created attachment 249753 [details] experimental patch for audio/portaudio If ALSA is to be used, at least the latest stable version must be used. There is a bug that prevents it from getting all devices if combined with the current version of alsa-lib. So I have re-created the patch including the update. Below is a memorandum of understanding for not only enabling ALSA support, but also assuming this is an update as is. Changed to USE_GITHUB because releases are too infrequent. PORTVERSION is 19.7.0 because it uses the value defined in ${WRKSRC}/src/common/pa_front.c. Since sndio is now supported by stock, the patch that was included from fed5cabe2d35c87d5914e8e5336829addc2e83fd has been removed. Functions that had been added in the patch for OSS API (from 1f33b362e2d9956918259d4929975868f7d467ee) have been removed. This was because it was no longer considered to be in use. Since it has PulseAudio support, it no longer makes sense to make ALSA available :) Switched to cmake. This led to the creation of the example binary. Therefore, it is necessary to reconsider whether to install the source code. C++ binding may need to split the port. And so on...
Created attachment 249829 [details] experimental patch for audio/portaudio ALSA type plug devices are now displayed. Obtain OSS supported formats from the appropriate device. This bug may also be in the current version.
Created attachment 249944 [details] experimental patch for audio/portaudio It is about time this itself would be useable for update :) Fixed unintended malfunction of hand-written portions of the patch :) -D TRYBROKEN is required to use Pulseaudio. Some preparation exists for debugging Pulseaudio. Currently it is not something that can be used in combination with Audacity, so someone please get it working properly :)
Created attachment 249946 [details] experimental patch for audio/portaudio Sorry for the consecutive posts. The problem with pulseaudio making us wait 50 seconds per stream seems to have been resolved. I don't know if this is the correct way to fix it, although it would seem that pulseaudio can be used now.
I have reported to upstream most of the patches included in attachment 249946 [details].