Schedule buffer with AVAudioPCMBuffer int16 data
问题 I'm trying to play music from byte array which is coming from the network in pcmInt16 data format. // formats let format1 = AVAudioFormat(commonFormat: AVAudioCommonFormat.pcmFormatFloat32, sampleRate: 48000, channels: 1, interleaved: false)! let format2 = AVAudioFormat(commonFormat: AVAudioCommonFormat.pcmFormatInt16, sampleRate: 48000, channels: 1, interleaved: false)! // byte array buffer var byteArray: [Int16]! // one packet size is 512 ... // 1. create / attach / connect engine engine