olofson / audiality2

A realtime scripted modular audio engine for video games and musical applications.
http://audiality.org/
zlib License
79 stars 5 forks source link

Segfault if 'env' is used before any units with audio ports #291

Closed olofson closed 7 years ago

olofson commented 7 years ago

The engine segfaults in a2_ControlWire() when wiring new voices, if there are any units with audio ports before the modulator unit. It appears that the 'from_unit' field is off by one; the first two units get 0, the third unit becomes from_unit 1 etc.

olofson commented 7 years ago

Actually, 'from_unit' is always off by one (except for the first unit). It's just that if the unit before the one we're wiring is also an 'env' unit, we don't segfault - but we wire the wrong output!