aubio  0.4.1
types.h
Go to the documentation of this file.
00001 /*
00002   Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
00003 
00004   This file is part of aubio.
00005 
00006   aubio is free software: you can redistribute it and/or modify
00007   it under the terms of the GNU General Public License as published by
00008   the Free Software Foundation, either version 3 of the License, or
00009   (at your option) any later version.
00010 
00011   aubio is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014   GNU General Public License for more details.
00015 
00016   You should have received a copy of the GNU General Public License
00017   along with aubio.  If not, see <http://www.gnu.org/licenses/>.
00018 
00019 */
00020 
00021 #ifndef _AUBIO__TYPES_H
00022 #define _AUBIO__TYPES_H
00023 
00024 /** \file
00025  
00026   Definition of data types used in aubio
00027  
00028 */
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #ifndef HAVE_AUBIO_DOUBLE
00035 /** defined to 1 if aubio is compiled in double precision */
00036 #define HAVE_AUBIO_DOUBLE 0
00037 #endif
00038 
00039 /** short sample format (32 or 64 bits) */
00040 #if !HAVE_AUBIO_DOUBLE
00041 typedef float        smpl_t;
00042 /** print format for sample in single precision */
00043 #define AUBIO_SMPL_FMT "%f"
00044 #else
00045 typedef double       smpl_t;
00046 /** print format for double in single precision */
00047 #define AUBIO_SMPL_FMT "%lf"
00048 #endif
00049 /** long sample format (64 bits or more) */
00050 #if !HAVE_AUBIO_DOUBLE
00051 typedef double       lsmp_t;
00052 /** print format for sample in double precision */
00053 #define AUBIO_LSMP_FMT "%lf"
00054 #else
00055 typedef long double  lsmp_t;
00056 /** print format for double in double precision */
00057 #define AUBIO_LSMP_FMT "%Lf"
00058 #endif
00059 /** unsigned integer */
00060 typedef unsigned int uint_t;
00061 /** signed integer */
00062 typedef int          sint_t;
00063 /** character */
00064 typedef char         char_t;
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif /* _AUBIO__TYPES_H */
 All Data Structures Files Functions Variables Typedefs Defines