701 |
// number of '0' samples (silence samples) behind the official buffer |
// number of '0' samples (silence samples) behind the official buffer |
702 |
// border, to allow the interpolator do it's work even at the end of |
// border, to allow the interpolator do it's work even at the end of |
703 |
// the sample. |
// the sample. |
704 |
const uint neededSilenceSamples = (maxSamplesPerCycle << CONFIG_MAX_PITCH) + 3; |
const uint neededSilenceSamples = uint((maxSamplesPerCycle << CONFIG_MAX_PITCH) + 3); |
705 |
const uint currentlyCachedSilenceSamples = pSample->GetCache().NullExtensionSize / pSample->FrameSize; |
const uint currentlyCachedSilenceSamples = uint(pSample->GetCache().NullExtensionSize / pSample->FrameSize); |
706 |
if (currentlyCachedSilenceSamples < neededSilenceSamples) { |
if (currentlyCachedSilenceSamples < neededSilenceSamples) { |
707 |
dmsg(3,("Caching whole sample (sample name: \"%s\", sample size: %lu)\n", pSample->pInfo->Name.c_str(), pSample->SamplesTotal)); |
dmsg(3,("Caching whole sample (sample name: \"%s\", sample size: %llu)\n", pSample->pInfo->Name.c_str(), (long long)pSample->SamplesTotal)); |
708 |
::gig::buffer_t buf = pSample->LoadSampleDataWithNullSamplesExtension(neededSilenceSamples); |
::gig::buffer_t buf = pSample->LoadSampleDataWithNullSamplesExtension(neededSilenceSamples); |
709 |
dmsg(4,("Cached %lu Bytes, %lu silence bytes.\n", buf.Size, buf.NullExtensionSize)); |
dmsg(4,("Cached %llu Bytes, %llu silence bytes.\n", (long long)buf.Size, (long long)buf.NullExtensionSize)); |
710 |
} |
} |
711 |
} |
} |
712 |
else { // we only cache CONFIG_PRELOAD_SAMPLES and stream the other sample points from disk |
else { // we only cache CONFIG_PRELOAD_SAMPLES and stream the other sample points from disk |