Event, especially WaveEvent needs to create an AudioStream before inserting into a part. However, when altering the Event (e.g. moving it), it is duplicated, then changed.
And with it, the AudioStream and all resources tied to it are duplicated! (Plus, that happens in various contexts, which is bad to maintain)
Instead, Events (and possibly more items in MusE) need an "arm()" and a "defuse()" function, which is called from and ONLY from the execute/revertOperationGroup1/3() functions (i.e. those which are not executed in realtime context).
Event, especially WaveEvent needs to create an AudioStream before inserting into a part. However, when altering the Event (e.g. moving it), it is duplicated, then changed. And with it, the AudioStream and all resources tied to it are duplicated! (Plus, that happens in various contexts, which is bad to maintain)
Instead, Events (and possibly more items in MusE) need an "arm()" and a "defuse()" function, which is called from and ONLY from the execute/revertOperationGroup1/3() functions (i.e. those which are not executed in realtime context).