2131 |
|
|
2132 |
SuspendAll(); |
SuspendAll(); |
2133 |
|
|
2134 |
|
// NOTE: we need to clear pDimRegionsInUse before deleting pDimRegionPool, |
2135 |
|
// otherwise memory corruption will occur if there are active voices (see bug #118) |
2136 |
|
for (int iChannel = 0; iChannel < engineChannels.size(); iChannel++) { |
2137 |
|
engineChannels[iChannel]->ClearDimRegionsInUse(); |
2138 |
|
} |
2139 |
|
|
2140 |
if (pDimRegionPool[0]) delete pDimRegionPool[0]; |
if (pDimRegionPool[0]) delete pDimRegionPool[0]; |
2141 |
if (pDimRegionPool[1]) delete pDimRegionPool[1]; |
if (pDimRegionPool[1]) delete pDimRegionPool[1]; |
2142 |
|
|
2143 |
pDimRegionPool[0] = new Pool< ::gig::DimensionRegion*>(iVoices); |
pDimRegionPool[0] = new Pool< ::gig::DimensionRegion*>(iVoices); |
2144 |
pDimRegionPool[1] = new Pool< ::gig::DimensionRegion*>(iVoices); |
pDimRegionPool[1] = new Pool< ::gig::DimensionRegion*>(iVoices); |
2145 |
|
|
2146 |
|
for (int iChannel = 0; iChannel < engineChannels.size(); iChannel++) { |
2147 |
|
engineChannels[iChannel]->ResetDimRegionsInUse(); |
2148 |
|
} |
2149 |
|
|
2150 |
try { |
try { |
2151 |
pVoicePool->resizePool(iVoices); |
pVoicePool->resizePool(iVoices); |
2152 |
} catch (...) { |
} catch (...) { |
2210 |
} |
} |
2211 |
|
|
2212 |
String Engine::Version() { |
String Engine::Version() { |
2213 |
String s = "$Revision: 1.99 $"; |
String s = "$Revision: 1.100 $"; |
2214 |
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 |
2215 |
} |
} |
2216 |
|
|