pulse: Deal with header consitification in PulseAudio 13.0

The 13.0 release included changes to constify various parameters in the
public headers, which breaks our implementation. This adds an optional
const qualifier based on the version we're compiling against to deal
with that. There are some warnings caused by bad annotations upstream
which should be fixed separately.
This commit is contained in:
Arun Raghavan 2019-09-27 07:45:15 +05:30
parent 2308318b39
commit 8666bcac65
9 changed files with 47 additions and 39 deletions

View file

@ -31,12 +31,20 @@
#include <pulse/format.h>
#include <pulse/subscribe.h>
#include <pulse/introspect.h>
#include <pulse/version.h>
#include <pipewire/array.h>
#include <pipewire/utils.h>
#include <pipewire/interfaces.h>
#include <pipewire/log.h>
/* Some PulseAudio API added const qualifiers in 13.0 */
#if PA_MAJOR >= 13
#define PA_CONST const
#else
#define PA_CONST
#endif
#define PA_MAX_FORMATS (PA_ENCODING_MAX)
#ifdef __cplusplus