How to best deal with reset fields?

I have an audio stream chop and I’m trying to find an elegant way to play it, stop and rewind it (either in the middle or at the end).

Whenever I have to do that, I bump against the interaction between play and reset fields, so I’m wondering if someone has the correct, scripted, way to do this.

I.e. I start with play=0 reset=0
playmode: set play=1
stopinthemiddle_mode: set play=0, set reset=1, wait one frame (this is awful), set reset=0
rewind at the end mode: ?? do I have to add a script monitoring the index being played or such thing, then set play=0, reset=1, wait one frame, set reset=0?

It’s really convoluted, and I meant to ask if there’s a clean way to do this for a while.
thanks,
dani

Does Audio Stream not loop when it reaches the end of the file? If it doesn’t then I should add that.

To stop in the middle you can just set reset = 1, and then back to 0 when you want it to start playing again, dont touch the play parameter.

Re: replaying streams that have reached the end:
it loops if looping is on. Thing is, if I want an audio to play once, I turn looping off, then set play 1 and reset 0
then the audio stops at the end by itself.
what do I do when I want to play it again since it will be play=1 and reset=0? If I have to set reset to 1 and then to 0 again to play it again, that takes two frames.