240 |
|
|
241 |
// FIXME: audio drivers with varying fragment sizes might be a problem here |
// FIXME: audio drivers with varying fragment sizes might be a problem here |
242 |
MaxFadeOutPos = MaxSamplesPerCycle - int(double(SampleRate) * CONFIG_EG_MIN_RELEASE_TIME) - 1; |
MaxFadeOutPos = MaxSamplesPerCycle - int(double(SampleRate) * CONFIG_EG_MIN_RELEASE_TIME) - 1; |
243 |
if (MaxFadeOutPos < 0) |
if (MaxFadeOutPos < 0) { |
244 |
throw LinuxSamplerException("CONFIG_EG_MIN_RELEASE_TIME too big for current audio fragment size / sampling rate!"); |
std::cerr << "gig::Engine: WARNING, CONFIG_EG_MIN_RELEASE_TIME " |
245 |
|
<< "too big for current audio fragment size & sampling rate! " |
246 |
|
<< "May lead to click sounds!\n" << std::flush; |
247 |
|
// force volume ramp downs at the beginning of each fragment |
248 |
|
MaxFadeOutPos = 0; |
249 |
|
// lower minimum release time |
250 |
|
const float minReleaseTime = (float) MaxSamplesPerCycle / (float) SampleRate; |
251 |
|
for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
252 |
|
iterVoice->pEG1->CalculateFadeOutCoeff(minReleaseTime, SampleRate); |
253 |
|
} |
254 |
|
pVoicePool->clear(); |
255 |
|
} |
256 |
|
|
257 |
// (re)create disk thread |
// (re)create disk thread |
258 |
if (this->pDiskThread) { |
if (this->pDiskThread) { |
1423 |
} |
} |
1424 |
|
|
1425 |
String Engine::Version() { |
String Engine::Version() { |
1426 |
String s = "$Revision: 1.47 $"; |
String s = "$Revision: 1.48 $"; |
1427 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
1428 |
} |
} |
1429 |
|
|