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 * |
57 |
#ifndef CONFIG_STREAM_BUFFER_SIZE |
#ifndef CONFIG_STREAM_BUFFER_SIZE |
58 |
# error "Configuration macro CONFIG_STREAM_BUFFER_SIZE not defined!" |
# error "Configuration macro CONFIG_STREAM_BUFFER_SIZE not defined!" |
59 |
#endif // CONFIG_STREAM_BUFFER_SIZE |
#endif // CONFIG_STREAM_BUFFER_SIZE |
60 |
#ifndef CONFIG_MAX_STREAMS |
#ifndef CONFIG_DEFAULT_MAX_STREAMS |
61 |
# error "Configuration macro CONFIG_MAX_STREAMS not defined!" |
# error "Configuration macro CONFIG_DEFAULT_MAX_STREAMS not defined!" |
62 |
#endif // CONFIG_MAX_STREAMS |
#endif // CONFIG_DEFAULT_MAX_STREAMS |
63 |
#ifndef CONFIG_MAX_VOICES |
#ifndef CONFIG_DEFAULT_MAX_VOICES |
64 |
# error "Configuration macro CONFIG_MAX_VOICES not defined!" |
# error "Configuration macro CONFIG_DEFAULT_MAX_VOICES not defined!" |
65 |
#endif // CONFIG_MAX_VOICES |
#endif // CONFIG_DEFAULT_MAX_VOICES |
66 |
#ifndef CONFIG_DEFAULT_SUBFRAGMENT_SIZE |
#ifndef CONFIG_DEFAULT_SUBFRAGMENT_SIZE |
67 |
# error "Configuration macro CONFIG_DEFAULT_SUBFRAGMENT_SIZE not defined!" |
# error "Configuration macro CONFIG_DEFAULT_SUBFRAGMENT_SIZE not defined!" |
68 |
#endif // CONFIG_DEFAULT_SUBFRAGMENT_SIZE |
#endif // CONFIG_DEFAULT_SUBFRAGMENT_SIZE |
92 |
// sampler engine implementations |
// sampler engine implementations |
93 |
double GLOBAL_VOLUME = CONFIG_GLOBAL_ATTENUATION_DEFAULT; |
double GLOBAL_VOLUME = CONFIG_GLOBAL_ATTENUATION_DEFAULT; |
94 |
|
|
95 |
|
// this is the sampler global setting for maximum voices |
96 |
|
int GLOBAL_MAX_VOICES = CONFIG_DEFAULT_MAX_VOICES; |
97 |
|
|
98 |
|
// this is the sampler global setting for maximum disk streams |
99 |
|
int GLOBAL_MAX_STREAMS = CONFIG_DEFAULT_MAX_STREAMS; |
100 |
|
|
101 |
int hexToNumber(char hex_digit) { |
int hexToNumber(char hex_digit) { |
102 |
switch (hex_digit) { |
switch (hex_digit) { |
103 |
case '0': return 0; |
case '0': return 0; |