From 03e671c51c58bdf72d06d7174b2d220f7fe6f4ab Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Thu, 8 Dec 2022 11:06:12 +0100 Subject: [PATCH] lib: assert that LibVLC and VLC enums match --- lib/audio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/audio.c b/lib/audio.c index 42ab0ae4d618..aa6e0d9c7fb9 100644 --- a/lib/audio.c +++ b/lib/audio.c @@ -366,6 +366,14 @@ libvlc_audio_output_stereomode_t libvlc_audio_get_stereomode( libvlc_media_playe *****************************************************************************/ int libvlc_audio_set_stereomode( libvlc_media_player_t *mp, libvlc_audio_output_stereomode_t mode ) { + static_assert(libvlc_AudioStereoMode_Unset == AOUT_VAR_CHAN_UNSET && + libvlc_AudioStereoMode_Stereo == AOUT_VAR_CHAN_STEREO && + libvlc_AudioStereoMode_RStereo == AOUT_VAR_CHAN_RSTEREO && + libvlc_AudioStereoMode_Left == AOUT_VAR_CHAN_LEFT && + libvlc_AudioStereoMode_Right == AOUT_VAR_CHAN_RIGHT && + libvlc_AudioStereoMode_Dolbys == AOUT_VAR_CHAN_DOLBYS, + "Mismatch with stereo-mode LibVLC/VLC enums"); + audio_output_t *p_aout = GetAOut( mp ); int ret = 0;