--- linuxsampler/trunk/src/engines/common/VoiceBase.h 2011/07/23 10:23:35 2215 +++ linuxsampler/trunk/src/engines/common/VoiceBase.h 2011/07/25 17:21:16 2216 @@ -79,7 +79,7 @@ virtual int OrderNewStream() { int res = pDiskThread->OrderNewStream ( - &DiskStreamRef, pRegion, MaxRAMPos, !RAMLoop + &DiskStreamRef, pRegion, MaxRAMPos + GetRAMCacheOffset(), !RAMLoop ); if (res < 0) { @@ -90,6 +90,9 @@ return 0; } + + /** The offset of the RAM cache from the sample start (in sample units). */ + virtual int GetRAMCacheOffset() { return 0; } /** * Renders the audio data for this voice for the current audio fragment.