AVAudioEngine crashes with error !nodeimpl->HasEngineImpl()'

405 Views Asked by At

After I play an AVAudioPlayerNode that I've attached to my engine, I detach it (to keep CPU usage down). However, when I reattach that AVAudioPlayerNode to the engine again and attempt to play it (while it is still playing from before), I get a crash with the error:

'required condition is false: !nodeimpl->HasEngineImpl()'

I am having trouble understanding what this is telling me.

Note: crash only occurs when I attempt to play the AVAudiPlayerNode again while the previous playing of the sound is still happening (for example, I tap the button that produces the same sound via the same AVAudioPlayerNode twice in a row shortly after one another).

If I wait for the previous playing to finish, it will not crash.

0

There are 0 best solutions below