igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
257 stars 45 forks source link

Bug with processingChain.removeProcessor(fx) #158

Closed vustav closed 2 years ago

vustav commented 2 years ago

I've managed to isolate the reason for a crash I've had for a while down to removal of effects from the processing chain. One feature in my app removes all effects from an instrument and adds a randomized number of new ones. I used to do this by looping through the array with the effects and removing them one by one from the processing chain, but sometimes one of them stayed anyway. Using reset() on the chain fixes this, but the strange behavoir when removing them one by one in a loop is obviuosly still there.

igorski commented 2 years ago

This has been addressed in fdab12a9a9825c5595388a3585708ca11817a6be by using vector find-iterator based removal instead of looping.

vustav commented 2 years ago

Sorry for the late answer. Working now!