mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Define SPA_FALLTHROUGH to make fall-through annotations work for all compilers
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.
This commit is contained in:
parent
406b99c4c5
commit
743cf58fb7
17 changed files with 73 additions and 46 deletions
|
|
@ -1114,7 +1114,7 @@ int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents) {
|
|||
}
|
||||
pa_log_warn("Could not recover alsa device from SUSPENDED state, trying to restart PCM");
|
||||
}
|
||||
/* Fall through */
|
||||
SPA_FALLTHROUGH
|
||||
|
||||
default:
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
#define PA_CHANNELS_MAX 64
|
||||
|
||||
#define PA_CHANNEL_MAP_SNPRINT_MAX 336
|
||||
|
|
@ -161,17 +163,17 @@ static inline pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsign
|
|||
case 8:
|
||||
m->map[6] = PA_CHANNEL_POSITION_SIDE_LEFT;
|
||||
m->map[7] = PA_CHANNEL_POSITION_SIDE_RIGHT;
|
||||
/* Fall through */
|
||||
SPA_FALLTHROUGH
|
||||
case 6:
|
||||
m->map[5] = PA_CHANNEL_POSITION_LFE;
|
||||
/* Fall through */
|
||||
SPA_FALLTHROUGH
|
||||
case 5:
|
||||
m->map[4] = PA_CHANNEL_POSITION_FRONT_CENTER;
|
||||
/* Fall through */
|
||||
SPA_FALLTHROUGH
|
||||
case 4:
|
||||
m->map[2] = PA_CHANNEL_POSITION_REAR_LEFT;
|
||||
m->map[3] = PA_CHANNEL_POSITION_REAR_RIGHT;
|
||||
/* Fall through */
|
||||
SPA_FALLTHROUGH
|
||||
case 2:
|
||||
m->map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
|
||||
m->map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ acp_lib = static_library(
|
|||
'acp',
|
||||
acp_sources,
|
||||
c_args : acp_c_args,
|
||||
include_directories : [configinc],
|
||||
include_directories : [configinc, spa_inc ],
|
||||
dependencies : [ alsa_dep, mathlib, ]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue