@Orvillain Thank you - I'm confused, though, because I don't want to use a sampler. I just want to play an audio file. And HISE has a Module to do that:
ce814e3f-0f5a-4001-9e99-385a55da192e-image.png
Except, like so many things in HISE, it doesn't do that.
// if this is non-zero it means that the buffer coming
// from the DAW was split into chunks for processing
// so we need to update the playhead to reflect the
// "real" position for the given buffer
if(offsetWithinProcessBuffer != 0)
{
newTime.timeInSamples += offsetWithinProcessBuffer;
newTime.timeInSeconds += (double)offsetWithinProcessBuffer / processingSampleRate;
const auto numSamplesPerQuarter = (double)TempoSyncer::getTempoInSamples(newTime.bpm, processingSampleRate, 1.0f);
newTime.ppqPosition += (double)offsetWithinProcessBuffer / numSamplesPerQuarter;
}