3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* 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 * |
* it under the terms of the GNU General Public License as published by * |
28 |
#define __LS_GLOBAL_PRIVATE_H__ |
#define __LS_GLOBAL_PRIVATE_H__ |
29 |
|
|
30 |
#include "global.h" |
#include "global.h" |
31 |
|
#include "Exception.h" |
32 |
#include <sstream> |
#include <sstream> |
33 |
|
|
34 |
#if HAVE_CONFIG_H |
#if HAVE_CONFIG_H |
72 |
return ss.str(); |
return ss.str(); |
73 |
} |
} |
74 |
|
|
75 |
|
inline int ToInt(const std::string& s) throw(LinuxSampler::Exception) { |
76 |
|
int i; |
77 |
|
std::istringstream iss(s); |
78 |
|
if(!(iss >> i)) throw LinuxSampler::Exception("Not an integer"); |
79 |
|
return i; |
80 |
|
} |
81 |
|
|
82 |
class Runnable { |
class Runnable { |
83 |
public: |
public: |
84 |
virtual ~Runnable() { } |
virtual ~Runnable() { } |
86 |
}; |
}; |
87 |
|
|
88 |
extern double GLOBAL_VOLUME; |
extern double GLOBAL_VOLUME; |
89 |
|
extern int GLOBAL_MAX_VOICES; |
90 |
|
extern int GLOBAL_MAX_STREAMS; |
91 |
|
|
92 |
// I read with some Linux kernel versions (between 2.4.18 and 2.4.21) |
// I read with some Linux kernel versions (between 2.4.18 and 2.4.21) |
93 |
// sscanf() might be buggy regarding parsing of hex characters, so ... |
// sscanf() might be buggy regarding parsing of hex characters, so ... |