annotate win32-mingw/include/lo/lo_macros.h @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents c0fb53affa76
children
rev   line source
Chris@9 1 /*
Chris@9 2 * Copyright (C) 2004 Steve Harris
Chris@9 3 *
Chris@9 4 * This program is free software; you can redistribute it and/or
Chris@9 5 * modify it under the terms of the GNU Lesser General Public License
Chris@9 6 * as published by the Free Software Foundation; either version 2.1
Chris@9 7 * of the License, or (at your option) any later version.
Chris@9 8 *
Chris@9 9 * This program is distributed in the hope that it will be useful,
Chris@9 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@9 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@9 12 * GNU Lesser General Public License for more details.
Chris@9 13 *
Chris@9 14 * $Id$
Chris@9 15 */
Chris@9 16
Chris@9 17 #ifndef LO_MACROS_H
Chris@9 18 #define LO_MACROS_H
Chris@9 19
Chris@9 20 /* macros that have to be defined after function signatures */
Chris@9 21
Chris@9 22 #ifdef __cplusplus
Chris@9 23 extern "C" {
Chris@9 24 #endif
Chris@9 25
Chris@9 26 /* \brief Maximum length of UDP messages in bytes
Chris@9 27 */
Chris@9 28 #define LO_MAX_MSG_SIZE 32768
Chris@9 29
Chris@9 30 /* \brief A set of macros to represent different communications transports
Chris@9 31 */
Chris@9 32 #define LO_DEFAULT 0x0
Chris@9 33 #define LO_UDP 0x1
Chris@9 34 #define LO_UNIX 0x2
Chris@9 35 #define LO_TCP 0x4
Chris@9 36
Chris@9 37 /* an internal value, ignored in transmission but check against LO_MARKER in the
Chris@9 38 * argument list. Used to do primitive bounds checking */
Chris@9 39 #define LO_MARKER_A 0xdeadbeef
Chris@9 40 #define LO_MARKER_B 0xf00baa23
Chris@9 41 #define LO_ARGS_END LO_MARKER_A, LO_MARKER_B
Chris@9 42
Chris@9 43 #define lo_message_add_varargs(msg, types, list) \
Chris@9 44 lo_message_add_varargs_internal(msg, types, list, __FILE__, __LINE__)
Chris@9 45
Chris@9 46 #ifdef __GNUC__
Chris@9 47
Chris@9 48 #define lo_message_add(msg, types...) \
Chris@9 49 lo_message_add_internal(msg, __FILE__, __LINE__, types, \
Chris@9 50 LO_MARKER_A, LO_MARKER_B)
Chris@9 51
Chris@9 52 #define lo_send(targ, path, types...) \
Chris@9 53 lo_send_internal(targ, __FILE__, __LINE__, path, types, \
Chris@9 54 LO_MARKER_A, LO_MARKER_B)
Chris@9 55
Chris@9 56 #define lo_send_timestamped(targ, ts, path, types...) \
Chris@9 57 lo_send_timestamped_internal(targ, __FILE__, __LINE__, ts, path, \
Chris@9 58 types, LO_MARKER_A, LO_MARKER_B)
Chris@9 59
Chris@9 60 #define lo_send_from(targ, from, ts, path, types...) \
Chris@9 61 lo_send_from_internal(targ, from, __FILE__, __LINE__, ts, path, \
Chris@9 62 types, LO_MARKER_A, LO_MARKER_B)
Chris@9 63
Chris@9 64 #else
Chris@9 65
Chris@9 66 /* In non-GCC compilers, there is no support for variable-argument
Chris@9 67 * macros, so provide "internal" vararg functions directly instead. */
Chris@9 68
Chris@9 69 int lo_message_add(lo_message msg, const char *types, ...);
Chris@9 70 int lo_send(lo_address targ, const char *path, const char *types, ...);
Chris@9 71 int lo_send_timestamped(lo_address targ, lo_timetag ts, const char *path, const char *types, ...);
Chris@9 72 int lo_send_from(lo_address targ, lo_server from, lo_timetag ts, const char *path, const char *types, ...);
Chris@9 73
Chris@9 74 #endif
Chris@9 75
Chris@9 76 #ifdef __cplusplus
Chris@9 77 }
Chris@9 78 #endif
Chris@9 79
Chris@9 80 #endif