diff --git a/source/native-plugins/audio-file.cpp b/source/native-plugins/audio-file.cpp index 4d37ffb6ee..822ccdb61e 100644 --- a/source/native-plugins/audio-file.cpp +++ b/source/native-plugins/audio-file.cpp @@ -449,12 +449,21 @@ class AudioFilePlugin : public NativePluginClass return; } + const bool offline = isOffline(); bool needsIdleRequest = false; - if (fReader.tickFrames(outBuffer, 0, frames, framePos, fLoopMode, isOffline()) && ! fPendingFileRead) + if (fReader.tickFrames(outBuffer, 0, frames, framePos, fLoopMode, offline) && ! fPendingFileRead) { - fPendingFileRead = true; - needsIdleRequest = true; + if (offline) + { + fPendingFileRead = false; + fReader.readPoll(); + } + else + { + fPendingFileRead = true; + needsIdleRequest = true; + } } fLastPosition = fReader.getLastPlayPosition() * 100.f;