void MemoryMappedAudioFormatReader::touchSample (int64 sample) const noexcept { if (map != nullptr && mappedSection.contains (sample)) memoryReadDummyVariable += *(char*) sampleToPointer (sample); else jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read. }
void MemoryMappedAudioFormatReader::touchSample (int64 sample) const noexcept { if (map != nullptr && mappedSection.contains (sample)) { static int dummy = 0; // to force the compiler not to optimise this stuff away dummy += *(int*) sampleToPointer (sample); } else { jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read. } }