Closed phal0r closed 6 years ago
If it's in the native API, it shouldn't be hard to implement on play, but I haven't tried to implement it. It would probably weird to use offset in combination with a volume envelope, though I'm not sure if anyone would want to do that anyway.
I was digging deeper in the source today and now I understand what you mean. The use case is to start playback and dynamically stop it or start with an offset. As I understand the asdr envlope is not usable for this scenario, so there should be a kind of "dynamic" mode, where stop is not scheduled in startEnv but controlled from outside.
I just added an offset parameter to the constructor and the play()
method that allows you to play an audio clip starting from partway through the clip.
Start playing an audiobuffer with a certain offset. The native api supports it on start. Is it difficult to introduce this parameter on play? What do you think?