why audio play stops when connecting to an bluetooth device (e.g. airpods)
My speaker class would receives real-time streaming audio chunk from our backend (PCM, 16bit int, 48k sample rate, 1 channel, 20ms duration) and the client is supposed to play the audios.
Therefore, I created this class Speaker that uses AVAudioEngine to play.