Simple low-latency audio playback in iOS Swift
I'm a beginner in iOS and I'm trying to design a drum set app with Swift. I designed a view with a single button and wrote the code below, but it has some problems: Some sounds are lost when I touch the button quickly like a drum roll. Still in a 'drum roll', the sound is interrupted every time the button is touched, instead of letting the sample play till its ending. It's awful in cymbal roll, for instance. I'd like to hear every sample sounding completely, even if I touch the button again. There is a latency between the touch and the sound. I know that AVAudioPlayer is not the best choice