Sometimes, triggering sample playback from the sample tab plays the sample from its loop start point instead of the beginning of the sample. I noticed that this especially happens if there are a lot of NNA channels playing, but I couldn't find a reliable way to reproduce it. Triggering the sample often enough should show the defect after some time.

Tags

No tags attached.

Has the bug occurred in previous versions?

I think yes.

Tested code revision (in case you know it)

Activities

Applied a tentative "fix" in r3819: Searching for an available virtual channel backwards instead of forwards to reduce risk of clashing with "real" NNA channels. I have no idea why this works (because in theory, it shouldn't change anything), but it seems to help for now.

I attached a sample that can easily be used to reproduce the problem and a recording of what happens. It doesn't even have to be a looped sample, it just seems like the initial frame of sample playback is cut off, although I'm not aware of any render optimizations that could cause this. To reproduce, the sample should be triggered roughly when it's about to end (try hitting a steady ~ 130 BPM beat).
The slower the module tempo, the more gets cut off of the sample. It's like the sample position is advanced even though the sample is not rendered - but this cannot really happen because the sample position is advanced in the mixer, so if the voice was not actually inserted into the mixer, it should stay at sample position 0. Sample triggering is also guarded by a critical section so it's not the case that a half-constructed channel could be inserted into the mixer.