"resting session" and audio buffer
-
I've come across an issue with audio playback after an open session has been "resting".
Not really sure how to trouble shoot this one, but here's what happening:
I work on a song late at night and leave the session open. When I return in the morning, all of the plugs made with HISE will only playback a tiny snip of audio until the buffer is "refilled". So in a drum plug, it'll playback about 100ms of sound for each sample until the Round Robin is complete, and then it goes back to normal.
Plugs that use the Convolution or Loop player never recover and won't work until the session is closed and reopened.
What do you guys suggest is the best way to troubleshoot this issue? -
Which DAW?
-
Sounds like the streaming thread got suspended and never woken up again. You don't happen to have your samples on a external hard drive?
-
@d-healey Cubase 10
-
@Christoph-Hart the files do reside on a (internal) harddrive that is separate from my OS drive. Same drive that I keep all of my other sample libraries on, but I don't seem to have this issue with other samplers.
-
This actually seems to be happening in other situations as well, not just when the system is resting. Here's what happens when I export audio mixdown in Cubase:
not in real time
real time
This was on a completely different system. Streaming from SSD.
Here's what my buffer settings are set to in the samplers:
-
What happens if you deactivate streaming (set the preload size to -1)?
It might be possible that Cubase 10 doesn't wait for the streaming thread to fetch the data (if it calculates the audio as quickly as possible, it might be the case the the streaming thread can't keep up with it).
-
@Christoph-Hart I'll give that a test today. Thanks!
-
@Christoph-Hart Setting to -1 made the memory usage jump thru the roof... but setting the buffer and preload to 200,000 worked like a charm! I had no idea they need to be set so high?
-
@dustbro -1 = no disk streaming, so everything is loaded into RAM
-
200000 is about 5 seconds so you just don‘t hear the cutoff.
Is this also „solving“ the export issue?
-
@Christoph-Hart said in "resting session" and audio buffer:
Is this also „solving“ the export issue?
It's gotten much better. Realtime export is still much more reliable, but non-realtime is considerably better. I'm gonna crank up the buffer more and see what happens.
-
I'm experiencing the same issue on export - the instrument plays fine but when I render from Ableton, I'm getting these drops in the audio. What's the best way to remedy this? I'd rather not set the preload to -1 because the samples I'm loading are quite heavy at times.
-
@tomekslesicki Increase the buffer and preload time. That worked for me
-
Alright, I try to come up with a proper solution. AFAIK there's an API call
isRenderingOffline()
and if yes I can make the audio rendering stall until the streaming thread is ready. -
@Christoph-Hart ok, so would it be possible to add a script that would increase the preload and buffer during rendering and keep it lower for normal use? If so, how?
Thanks!
-
No, the proper solution is to query the host whether the rendering is being done in realtime and if it isn't, make the rendering wait until the streaming thread has fetched the samples.
Everything else is just shifting the point where it starts to break.
-
@Christoph-Hart said in "resting session" and audio buffer:
No, the proper solution is to query the host whether the rendering is being done in realtime and if it isn't, make the rendering wait until the streaming thread has fetched the samples.
Everything else is just shifting the point where it starts to break.
Ok! How can I do that?
-
...or is it something @Christoph-Hart has to do behind the scenes?
-
...or is it something @Christoph-Hart has to do behind the scenes?
@Christoph-Hart said in "resting session" and audio buffer:
I try to come up with a proper solution
I take that to mean Christoph will implement a solution.