I have found an interesting bug in my code logic. If I use "Play sample XXX on channel Y" and channel Y is already playing a sample, the new sample overwrites as I expected. But if I use "Play and loop sample XXX (1 time) on channel Y" there is some odd residual behavior. It seems when the "Play sample on channel" sample is over, the channel returns to position 0 (the start of the sample). But if I use "Play and loop sample (1 time) on channel" then the channel holds itself at the position equal to the length of the last sample played.

Is a sample that is played with a set number of repeats supposed to reset the channel's position once it reaches its end? I just want to clarify this in case it is a bug.