diff --git a/build/features.py b/build/features.py index ce21471fa42..4ce41b00ebd 100644 --- a/build/features.py +++ b/build/features.py @@ -383,8 +383,8 @@ def sources(self, build): 'vinylcontrol/steadypitch.cpp', 'engine/vinylcontrolcontrol.cpp', ] if build.platform_is_windows: - sources.append("#lib/xwax/timecoder_win32.c") - sources.append("#lib/xwax/lut_win32.c") + sources.append("#lib/xwax/timecoder_win32.cpp") + sources.append("#lib/xwax/lut_win32.cpp") else: sources.append("#lib/xwax/timecoder.c") sources.append("#lib/xwax/lut.c") diff --git a/lib/xwax/lut.c b/lib/xwax/lut_win32.cpp similarity index 98% rename from lib/xwax/lut.c rename to lib/xwax/lut_win32.cpp index 6f02680e5c0..3f55251b6f0 100644 --- a/lib/xwax/lut.c +++ b/lib/xwax/lut_win32.cpp @@ -17,6 +17,8 @@ * */ +extern "C" { + #include #include @@ -109,3 +111,5 @@ unsigned int lut_lookup(struct lut *lut, unsigned int timecode) return (unsigned)-1; } + +}; // extern "C" diff --git a/lib/xwax/timecoder.h b/lib/xwax/timecoder.h index 3304eee641d..7d8abdeaa01 100644 --- a/lib/xwax/timecoder.h +++ b/lib/xwax/timecoder.h @@ -29,6 +29,10 @@ #define TIMECODER_CHANNELS 2 +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + typedef unsigned int bits_t; struct timecode_def { @@ -143,4 +147,8 @@ static inline double timecoder_revs_per_sec(struct timecoder *tc) return (33.0 + 1.0 / 3) * tc->speed / 60; } +#ifdef __cplusplus +}; +#endif // __cplusplus + #endif diff --git a/lib/xwax/timecoder_win32.c b/lib/xwax/timecoder_win32.cpp similarity index 99% rename from lib/xwax/timecoder_win32.c rename to lib/xwax/timecoder_win32.cpp index ffc6985ceac..aeece6eddc7 100755 --- a/lib/xwax/timecoder_win32.c +++ b/lib/xwax/timecoder_win32.cpp @@ -17,6 +17,8 @@ * */ +extern "C" { + #include #include #include @@ -642,3 +644,5 @@ signed int timecoder_get_position(struct timecoder *tc, double *when) return r; } + +}; // extern "C"