175 |
|
|
176 |
if (DiskVoice) { // voice to be streamed from disk |
if (DiskVoice) { // voice to be streamed from disk |
177 |
if (cachedsamples > (GetEngine()->MaxSamplesPerCycle << CONFIG_MAX_PITCH)) { |
if (cachedsamples > (GetEngine()->MaxSamplesPerCycle << CONFIG_MAX_PITCH)) { |
178 |
MaxRAMPos = cachedsamples - (GetEngine()->MaxSamplesPerCycle << CONFIG_MAX_PITCH) / SmplInfo.ChannelCount; //TODO: this calculation is too pessimistic and may better be moved to Render() method, so it calculates MaxRAMPos dependent to the current demand of sample points to be rendered (e.g. in case of JACK) |
//TODO: this calculation is too pessimistic |
179 |
|
MaxRAMPos = cachedsamples - (GetEngine()->MaxSamplesPerCycle << CONFIG_MAX_PITCH); |
180 |
} else { |
} else { |
181 |
// The cache is too small to fit a max sample buffer. |
// The cache is too small to fit a max sample buffer. |
182 |
// Setting MaxRAMPos to 0 will probably cause a click |
// Setting MaxRAMPos to 0 will probably cause a click |