I'm playing a sound in my watch only app, but every time the sound plays the debugger shows an error: "MEMixerChannel.cpp:1577 Spatialization not supported on this platform (err=-4)"
Anyone have an idea why ? Is it because I'm developing for WatchOS ?
The manager responsible for playing the sound:
import Foundation
import AVFoundation
final class SoundManager {
var player: AVAudioPlayer?
func playSound(name: String, volume: Float = 1.0) {
if let url = Bundle.main.url(forResource: name, withExtension: "aif") {
do {
player = try AVAudioPlayer(contentsOf: url)
player?.prepareToPlay()
player?.setVolume(volume, fadeDuration: 0.5)
} catch {
print("Error getting the audio file: \(error.localizedDescription)")
}
}
player?.play()
}
}