alsa: hopefully fix compilation on ubuntu CI

This commit is contained in:
Wim Taymans 2023-04-17 10:05:54 +02:00
parent 647c55dba9
commit e8c5c1bb97

View file

@ -354,14 +354,12 @@ static inline int ratelimit_test(struct ratelimit *r, uint64_t now)
return missed; return missed;
} }
#if defined(SND_LIB_VER) && SND_LIB_VERSION >= SND_LIB_VER(1, 2, 6) /* This function is also as snd_pcm_channel_area_addr() since 1.2.6 which is not yet
#define channel_area_addr snd_pcm_channel_area_addr * in ubuntu and I can't figure out how to do the ALSA version check. */
#else
static inline void *channel_area_addr(const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset) static inline void *channel_area_addr(const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset)
{ {
return (char *)area->addr + (area->first + area->step * offset) / 8; return (char *)area->addr + (area->first + area->step * offset) / 8;
} }
#endif
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */