annotate external/oscpack/osc/OscHostEndianness.h @ 653:755c401da7a7

Simple integration test between CARFAC and SAI. The interface between the two classes is pretty clunky because of the way CARFACOutput stores things. We should work on this, probably by rotating the outer two dimensions of CARFACOutput (i.e. store outputs in containers with sizes n_ears x n_samples x n_channels instead of n_samples x n_ears x n_channels).
author ronw@google.com
date Wed, 26 Jun 2013 23:35:47 +0000
parents 0284d2152e17
children
rev   line source
tomwalters@509 1 /*
tomwalters@509 2 oscpack -- Open Sound Control packet manipulation library
tomwalters@509 3 http://www.audiomulch.com/~rossb/oscpack
tomwalters@509 4
tomwalters@509 5 Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com>
tomwalters@509 6
tomwalters@509 7 Permission is hereby granted, free of charge, to any person obtaining
tomwalters@509 8 a copy of this software and associated documentation files
tomwalters@509 9 (the "Software"), to deal in the Software without restriction,
tomwalters@509 10 including without limitation the rights to use, copy, modify, merge,
tomwalters@509 11 publish, distribute, sublicense, and/or sell copies of the Software,
tomwalters@509 12 and to permit persons to whom the Software is furnished to do so,
tomwalters@509 13 subject to the following conditions:
tomwalters@509 14
tomwalters@509 15 The above copyright notice and this permission notice shall be
tomwalters@509 16 included in all copies or substantial portions of the Software.
tomwalters@509 17
tomwalters@509 18 Any person wishing to distribute modifications to the Software is
tomwalters@509 19 requested to send the modifications to the original developer so that
tomwalters@509 20 they can be incorporated into the canonical version.
tomwalters@509 21
tomwalters@509 22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
tomwalters@509 23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
tomwalters@509 24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
tomwalters@509 25 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
tomwalters@509 26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
tomwalters@509 27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
tomwalters@509 28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tomwalters@509 29 */
tomwalters@509 30 #ifndef OSC_HOSTENDIANNESS_H
tomwalters@509 31 #define OSC_HOSTENDIANNESS_H
tomwalters@509 32
tomwalters@509 33 /*
tomwalters@509 34 Make sure either OSC_HOST_LITTLE_ENDIAN or OSC_HOST_BIG_ENDIAN is defined
tomwalters@509 35
tomwalters@509 36 If you know a way to enhance the detection below for Linux and/or MacOSX
tomwalters@509 37 please let me know! I've tried a few things which don't work.
tomwalters@509 38 */
tomwalters@509 39
tomwalters@509 40 #if defined(OSC_HOST_LITTLE_ENDIAN) || defined(OSC_HOST_BIG_ENDIAN)
tomwalters@509 41
tomwalters@509 42 // you can define one of the above symbols from the command line
tomwalters@509 43 // then you don't have to edit this file.
tomwalters@509 44
tomwalters@509 45 #elif defined(__WIN32__) || defined(WIN32)
tomwalters@509 46
tomwalters@509 47 // assume that __WIN32__ is only defined on little endian systems
tomwalters@509 48
tomwalters@509 49 #define OSC_HOST_LITTLE_ENDIAN 1
tomwalters@509 50 #undef OSC_HOST_BIG_ENDIAN
tomwalters@509 51
tomwalters@509 52 #elif defined(__APPLE__)
tomwalters@509 53
tomwalters@509 54 #if defined(__LITTLE_ENDIAN__)
tomwalters@509 55 #define OSC_HOST_LITTLE_ENDIAN 1
tomwalters@509 56 #undef OSC_HOST_BIG_ENDIAN
tomwalters@509 57 #else
tomwalters@509 58 #define OSC_HOST_BIG_ENDIAN 1
tomwalters@509 59 #undef OSC_HOST_LITTLE_ENDIAN
tomwalters@509 60 #endif
tomwalters@509 61
tomwalters@509 62 #else
tomwalters@509 63
tomwalters@509 64 #error please edit OSCHostEndianness.h to configure endianness
tomwalters@509 65
tomwalters@509 66 #endif
tomwalters@509 67
tomwalters@509 68 #endif /* OSC_HOSTENDIANNESS_H */
tomwalters@509 69