X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Flibltc%2Fltc%2Fltc.h;h=726b0ca9f7152b16671f013431fbb3d762f61e92;hb=10a4de155034ffce6b3bc97d0cf91ba8f8e99812;hp=3ffbeeb3f6d09064f24f94c39ab81e2f62d82038;hpb=c9c94ca1c247adfc1a78fda0eda185a9a7589696;p=ardour.git diff --git a/libs/libltc/ltc/ltc.h b/libs/libltc/ltc/ltc.h index 3ffbeeb3f6..726b0ca9f7 100644 --- a/libs/libltc/ltc/ltc.h +++ b/libs/libltc/ltc/ltc.h @@ -13,7 +13,7 @@ @author Robin Gareus @copyright - Copyright (C) 2006-2012 Robin Gareus + Copyright (C) 2006-2014 Robin Gareus Copyright (C) 2008-2009 Jan Weiß @@ -40,20 +40,39 @@ extern "C" { #endif +#if defined _WIN32 && !defined(__LITTLE_ENDIAN__) +#define __LITTLE_ENDIAN__ +#endif + +#ifdef __BIG_ENDIAN__ +# define LTC_BIG_ENDIAN +#elif defined _BIG_ENDIAN +# define LTC_BIG_ENDIAN +#elif defined __BYTE_ORDER__ +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define LTC_BIG_ENDIAN +# endif +#elif !defined __LITTLE_ENDIAN__ +# include // machine/endian.h +# if (defined __BYTE_ORDER__ && defined __ORDER_BIG_ENDIAN__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define LTC_BIG_ENDIAN +# endif +#endif + #include /* size_t */ #ifndef DOXYGEN_IGNORE /* libltc version */ -#define LIBLTC_VERSION "1.1.1" +#define LIBLTC_VERSION "1.1.4" #define LIBLTC_VERSION_MAJOR 1 #define LIBLTC_VERSION_MINOR 1 -#define LIBLTC_VERSION_MICRO 1 +#define LIBLTC_VERSION_MICRO 4 /* interface revision number * http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html */ #define LIBLTC_CUR 11 -#define LIBLTC_REV 1 +#define LIBLTC_REV 3 #define LIBLTC_AGE 0 #endif /* end DOXYGEN_IGNORE */ @@ -159,7 +178,7 @@ typedef long long int ltc_off_t; * further information: http://www.philrees.co.uk/articles/timecode.htm * and http://www.barney-wol.net/time/timecode.html */ -#if (defined __BIG_ENDIAN__ && !defined DOXYGEN_IGNORE) +#if (defined LTC_BIG_ENDIAN && !defined DOXYGEN_IGNORE) // Big Endian version, bytes are "upside down" struct LTCFrame { unsigned int user1:4; @@ -449,7 +468,7 @@ void ltc_decoder_write_s16(LTCDecoder *d, short *buf, size_t size, ltc_off_t pos * @param size number of samples to parse * @param posinfo (optional, recommended) sample-offset in the audio-stream. */ -void ltc_decoder_write_u16(LTCDecoder *d, short *buf, size_t size, ltc_off_t posinfo); +void ltc_decoder_write_u16(LTCDecoder *d, unsigned short *buf, size_t size, ltc_off_t posinfo); /** * Decoded LTC frames are placed in a queue. This function retrieves