I cannot play sound using AVAudioPCMBuffer (although I could play with AVAudioFile). I got this error.
ERROR: AVAudioBuffer.mm:169: - [AVAudioPCMBuffer initWithPCMFormat: frameCapacity:]: required false: isCommonFormat
here is my code below and i am very grateful for your help.
import UIKit import AVFoundation class ViewController: UIViewController { let audioEngine: AVAudioEngine = AVAudioEngine() let audioFilePlayer: AVAudioPlayerNode = AVAudioPlayerNode() override func viewDidLoad() { super.viewDidLoad()
source share