Describe the bug
When attempting to play a note with the Sampler() object, the app crashes.
I.E. sampler.play(noteNumber: velocity: channel)
It is a failed assertion on segments in the envelope generator:
Assertion failed: (segments), function skipEmptySegments, file EnvelopeGeneratorBase.cpp, line 93.
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/usr/lib/libMTLCapture.dylib
This is with samples loaded into the sampler via the SFZ method (the preferred method). I have tried loading a sample with Sampler(sampleDescriptor: file) however I am unable to produce any output with this method.
To Reproduce
I have made a rudimentary repo which demonstrates the issue: https://github.com/maksutovic/DunneSamplerCrash-AK-5.2.2
- Clone Repo
- Run in either Simulator or Device
- Assertion failure
Expected behavior
I expect the Sampler() to in fact play the note specified and not crash.
Screenshots
If applicable, add screenshots to help explain your problem.


Details (please complete the following information):
- Type: iPhone 11 Pro OR Simulator
- OS: iOS 15.1 19B74
- AudioKit Version: 5.2.2
Additional context
I would be happy to try and resolve this issue however I would definitely need some pointers of how the envelope generator works with the sampler.
Describe the bug
When attempting to play a note with the
Sampler()object, the app crashes.I.E.
sampler.play(noteNumber: velocity: channel)It is a failed assertion on segments in the envelope generator:
This is with samples loaded into the sampler via the SFZ method (the preferred method). I have tried loading a sample with
Sampler(sampleDescriptor: file)however I am unable to produce any output with this method.To Reproduce
I have made a rudimentary repo which demonstrates the issue: https://github.com/maksutovic/DunneSamplerCrash-AK-5.2.2
Expected behavior
I expect the
Sampler()to in fact play the note specified and not crash.Screenshots


If applicable, add screenshots to help explain your problem.
Details (please complete the following information):
Additional context
I would be happy to try and resolve this issue however I would definitely need some pointers of how the envelope generator works with the sampler.