In the example code
https://docs.pipewire.org/audio-dsp-filter_8c-example.html
the following causes a problem in C++:
spa_process_latency_build(&b,
SPA_PARAM_ProcessLatency,
&SPA_PROCESS_LATENCY_INFO_INIT(
.ns = 10 * SPA_NSEC_PER_MSEC
));
The warning says “Taking the address of a temporary object of type ‘struct spa_process_latency_info’ [-Waddress-of-temporary]”
Probably safe in C, but in C++ this becomes a dangling pointer (I think). What is the recommended (i.e safe) approach to get around this problem in C++?