diff options
author | RJ Ryan <rryan@mixxx.org> | 2014-03-29 15:09:19 -0400 |
---|---|---|
committer | RJ Ryan <rryan@mixxx.org> | 2014-03-29 15:09:19 -0400 |
commit | e3591089d320d5f530ec10d6d689f291fdcf3d15 (patch) | |
tree | 72fda498fcbf3c00f2a89b4bb78b8c9a6d5360c0 | |
parent | ce3c11918af1ccd17ba995e0e6e4b6169c843782 (diff) |
My change to 477174 did not work. Keep our C++ copies of xwax files and wrap them with extern C.
-rw-r--r-- | build/features.py | 4 | ||||
-rw-r--r-- | lib/xwax/lut_win32.cpp (renamed from lib/xwax/lut.c) | 4 | ||||
-rw-r--r-- | lib/xwax/timecoder.h | 8 | ||||
-rwxr-xr-x | lib/xwax/timecoder_win32.cpp (renamed from lib/xwax/timecoder_win32.c) | 4 |
4 files changed, 18 insertions, 2 deletions
diff --git a/build/features.py b/build/features.py index ce21471fa4..4ce41b00eb 100644 --- a/build/features.py +++ b/build/features.py @@ -383,8 +383,8 @@ class VinylControl(Feature): '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 index 6f02680e5c..3f55251b6f 100644 --- a/lib/xwax/lut.c +++ b/lib/xwax/lut_win32.cpp @@ -17,6 +17,8 @@ * */ +extern "C" { + #include <stdio.h> #include <stdlib.h> @@ -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 3304eee641..7d8abdeaa0 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 index ffc6985cea..aeece6eddc 100755 --- a/lib/xwax/timecoder_win32.c +++ b/lib/xwax/timecoder_win32.cpp @@ -17,6 +17,8 @@ * */ +extern "C" { + #include <assert.h> #include <limits.h> #include <stdio.h> @@ -642,3 +644,5 @@ signed int timecoder_get_position(struct timecoder *tc, double *when) return r; } + +}; // extern "C" |