Including C headers inside of `extern "C"` breaks use from C++. Hoist
the includes of standard C headers above the block so we don't try
to mangle the stdlib.
I initially tried to scope this with a targeted change but it's too
hard to do correctly that way. This way, we avoid whack-a-mole.
Firefox is working around this in their e21461b7b8b39cc31ba53c47d4f6f310c673ff2f
commit.
Bug: https://bugzilla.mozilla.org/1953080
When filling up the channels, either fill up the positions with one
of the know layouts or use AUX channels, never try to mix them.
This avoid cards with a large number channels to show a strange mix
of surround and AUX channels.
spa/plugins/alsa/acp/channelmap.h:466:9: warning: format not a string
literal and no format arguments [-Wformat-security]
466 | pa_snprintf(s, l, _("(invalid)"));
The Pro Audio profile exposes all devices and subdevices with maximum
channel count and no channel layout. It also have no hardware volume
and is more suited for Pro Audio usage.
See #731#704#57
This is needed for example for Clang compiler which uses different
annotations than GCC. It will make WebRTC to happily use PipeWire
since the spa library is header-only and WebRTC defaults to use
Clang with -Wimplicit-fallthrough.
libacp is a port and wrapper around the pulseaudio card profile code.
It uses a set of templates for construct a card profile and mixer port
settings. It also has support for UCM when available for the hardware.