From 62221b9c59733a31b86cc6cdb93f379e07fa175e Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 25 May 2023 23:28:15 +0200 Subject: [PATCH] Keep fighting msvc Signed-off-by: falkTX --- cmake/CMakeLists.txt | 5 +++++ source/modules/audio_decoder/ad.h | 1 + source/modules/audio_decoder/ad_dr_mp3.c | 5 +++++ source/modules/audio_decoder/ad_ffmpeg.c | 1 + source/modules/audio_decoder/ad_minimp3.c | 5 +++++ source/modules/audio_decoder/ad_plugin.c | 1 + source/modules/audio_decoder/ad_plugin.h | 1 + source/modules/audio_decoder/ad_soundfile.c | 5 +++++ source/native-plugins/audio-gain.c | 2 +- 9 files changed, 25 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 3c3e44423..b569a85ee 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -632,6 +632,11 @@ add_library(carla::zita-resampler ALIAS carla-zita-resampler) set_common_target_properties(carla-zita-resampler) +target_compile_definitions(carla-native-plugins + PRIVATE + $<$:_USE_MATH_DEFINES> +) + target_include_directories(carla-zita-resampler PRIVATE ../source/includes diff --git a/source/modules/audio_decoder/ad.h b/source/modules/audio_decoder/ad.h index d7cc64552..7218e2826 100644 --- a/source/modules/audio_decoder/ad.h +++ b/source/modules/audio_decoder/ad.h @@ -4,6 +4,7 @@ @author Robin Gareus Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by diff --git a/source/modules/audio_decoder/ad_dr_mp3.c b/source/modules/audio_decoder/ad_dr_mp3.c index 97138ba28..b762b64ca 100644 --- a/source/modules/audio_decoder/ad_dr_mp3.c +++ b/source/modules/audio_decoder/ad_dr_mp3.c @@ -1,5 +1,6 @@ /** Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by @@ -33,6 +34,10 @@ #define DR_MP3_MAX_SEEK_POINTS 500 +#ifdef _MSC_VER +#define strcasecmp stricmp +#endif + typedef struct { drmp3 mp3; drmp3_seek_point seekPoints[DR_MP3_MAX_SEEK_POINTS]; diff --git a/source/modules/audio_decoder/ad_ffmpeg.c b/source/modules/audio_decoder/ad_ffmpeg.c index 85bde96d8..21156dd49 100644 --- a/source/modules/audio_decoder/ad_ffmpeg.c +++ b/source/modules/audio_decoder/ad_ffmpeg.c @@ -1,5 +1,6 @@ /** Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by diff --git a/source/modules/audio_decoder/ad_minimp3.c b/source/modules/audio_decoder/ad_minimp3.c index e2c2b7eed..a936b016b 100644 --- a/source/modules/audio_decoder/ad_minimp3.c +++ b/source/modules/audio_decoder/ad_minimp3.c @@ -1,5 +1,6 @@ /** Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by @@ -36,6 +37,10 @@ #define MINIMP3_IMPLEMENTATION #include "minimp3_ex.h" +#ifdef _MSC_VER +#define strcasecmp stricmp +#endif + /* internal abstraction */ typedef struct { diff --git a/source/modules/audio_decoder/ad_plugin.c b/source/modules/audio_decoder/ad_plugin.c index 9a2abf96b..2a365e9b4 100644 --- a/source/modules/audio_decoder/ad_plugin.c +++ b/source/modules/audio_decoder/ad_plugin.c @@ -1,5 +1,6 @@ /** Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by diff --git a/source/modules/audio_decoder/ad_plugin.h b/source/modules/audio_decoder/ad_plugin.h index 6006ac26e..1ac42a099 100644 --- a/source/modules/audio_decoder/ad_plugin.h +++ b/source/modules/audio_decoder/ad_plugin.h @@ -1,5 +1,6 @@ /** Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by diff --git a/source/modules/audio_decoder/ad_soundfile.c b/source/modules/audio_decoder/ad_soundfile.c index 1e6419bf9..c540e1c03 100644 --- a/source/modules/audio_decoder/ad_soundfile.c +++ b/source/modules/audio_decoder/ad_soundfile.c @@ -1,5 +1,6 @@ /** Copyright (C) 2011-2013 Robin Gareus + Copyright (C) 2014-2023 Filipe Coelho This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by @@ -28,6 +29,10 @@ #include +#ifdef _MSC_VER +#define strcasecmp stricmp +#endif + /* internal abstraction */ typedef struct { diff --git a/source/native-plugins/audio-gain.c b/source/native-plugins/audio-gain.c index 7a047efed..d69a6f277 100644 --- a/source/native-plugins/audio-gain.c +++ b/source/native-plugins/audio-gain.c @@ -109,7 +109,7 @@ static uint32_t audiogain_get_parameter_count(NativePluginHandle handle) static const NativeParameter* audiogain_get_parameter_info(NativePluginHandle handle, uint32_t index) { - if (index > (handlePtr->isMono ? PARAM_COUNT_MONO : PARAM_COUNT_STEREO)) + if (index > (uint32_t)(handlePtr->isMono ? PARAM_COUNT_MONO : PARAM_COUNT_STEREO)) return NULL; static NativeParameter param;