1 |
schoenebeck |
53 |
/*************************************************************************** |
2 |
|
|
* * |
3 |
|
|
* LinuxSampler - modular, streaming capable sampler * |
4 |
|
|
* * |
5 |
schoenebeck |
56 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
schoenebeck |
1212 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
7 |
schoenebeck |
53 |
* * |
8 |
|
|
* This program is free software; you can redistribute it and/or modify * |
9 |
|
|
* it under the terms of the GNU General Public License as published by * |
10 |
|
|
* the Free Software Foundation; either version 2 of the License, or * |
11 |
|
|
* (at your option) any later version. * |
12 |
|
|
* * |
13 |
|
|
* This program is distributed in the hope that it will be useful, * |
14 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
15 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
16 |
|
|
* GNU General Public License for more details. * |
17 |
|
|
* * |
18 |
|
|
* You should have received a copy of the GNU General Public License * |
19 |
|
|
* along with this program; if not, write to the Free Software * |
20 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * |
21 |
|
|
* MA 02111-1307 USA * |
22 |
|
|
***************************************************************************/ |
23 |
|
|
|
24 |
schoenebeck |
1424 |
// All application global declarations that HAVE to be exposed to the C++ |
25 |
|
|
// API are defined here. |
26 |
schoenebeck |
53 |
|
27 |
schoenebeck |
881 |
#ifndef __LS_GLOBAL_H__ |
28 |
|
|
#define __LS_GLOBAL_H__ |
29 |
schoenebeck |
53 |
|
30 |
|
|
#include <stdlib.h> |
31 |
|
|
#include <stdint.h> |
32 |
|
|
#include <stdio.h> |
33 |
|
|
|
34 |
|
|
#include <string> |
35 |
|
|
|
36 |
|
|
typedef std::string String; |
37 |
|
|
|
38 |
senoner |
1531 |
#if defined(WIN32) |
39 |
|
|
#include <windows.h> |
40 |
persson |
1808 |
|
41 |
|
|
// modern MinGW has usleep |
42 |
persson |
1931 |
#if (__MINGW32_MAJOR_VERSION < 3 || \ |
43 |
|
|
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 15)) && \ |
44 |
|
|
!defined(__MINGW64) |
45 |
senoner |
1531 |
#define usleep(a) Sleep(a/1000) |
46 |
persson |
1808 |
#endif |
47 |
|
|
|
48 |
senoner |
1531 |
#define sleep(a) Sleep(a*1000) |
49 |
|
|
typedef unsigned int uint; |
50 |
|
|
// FIXME: define proper functions which do proper alignement under Win32 |
51 |
|
|
#define alignedMalloc(a,b) malloc(b) |
52 |
|
|
#define alignedFree(a) free(a) |
53 |
|
|
#else |
54 |
|
|
// needed for usleep under POSIX |
55 |
|
|
#include <stdio.h> |
56 |
persson |
1792 |
// for uint |
57 |
|
|
#include <sys/types.h> |
58 |
senoner |
1531 |
#endif |
59 |
|
|
|
60 |
|
|
|
61 |
schoenebeck |
881 |
#endif // __LS_GLOBAL_H__ |