MaxRAMPos=cachedsamples-(pEngine->MaxSamplesPerCycle<<MAX_PITCH)/pSample->Channels;//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)