Bug 259255 - audio/portaudio: support ALSA by option
Summary: audio/portaudio: support ALSA by option
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on: 267181
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-19 05:03 UTC by Tatsuki Makino
Modified: 2024-04-16 04:36 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)
tatsuki_makino: maintainer-feedback?


Attachments
patch for audio/portaudio (4.52 KB, patch)
2021-10-19 05:03 UTC, Tatsuki Makino
no flags Details | Diff
poudriere log (120.47 KB, text/plain)
2021-10-19 05:06 UTC, Tatsuki Makino
no flags Details
portaudio-19.7.0,1.patch (11.78 KB, patch)
2023-11-01 00:35 UTC, takefu
takefu: maintainer-approval+
Details | Diff
experimental patch for audio/portaudio (41.02 KB, patch)
2024-04-06 09:31 UTC, Tatsuki Makino
no flags Details | Diff
experimental patch for audio/portaudio (46.36 KB, patch)
2024-04-08 11:29 UTC, Tatsuki Makino
no flags Details | Diff
experimental patch for audio/portaudio (47.60 KB, patch)
2024-04-13 03:12 UTC, Tatsuki Makino
no flags Details | Diff
experimental patch for audio/portaudio (50.05 KB, patch)
2024-04-13 07:10 UTC, Tatsuki Makino
tatsuki_makino: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2021-10-19 05:03:46 UTC
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.
Comment 1 Tatsuki Makino 2021-10-19 05:06:33 UTC
Created attachment 228818 [details]
poudriere log

Log built with ALSA turned on.
Comment 2 Tatsuki Makino 2022-10-19 21:24:56 UTC
This will have to be resolved differently if it is switched to CMake.
Comment 3 takefu 2023-11-01 00:35:53 UTC
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.
Comment 4 Tatsuki Makino 2024-04-02 01:29:12 UTC
(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.
Comment 5 Tatsuki Makino 2024-04-06 09:31:21 UTC
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...
Comment 6 Tatsuki Makino 2024-04-08 11:29:26 UTC
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.
Comment 7 Tatsuki Makino 2024-04-13 03:12:51 UTC
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 :)
Comment 8 Tatsuki Makino 2024-04-13 07:10:05 UTC
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.
Comment 9 Tatsuki Makino 2024-04-16 04:36:16 UTC
I have reported to upstream most of the patches included in attachment 249946 [details].