AVAudioPlayer doesn't work in visionOS

I've been trying to make a native version of my iPad app which uses AVAudioPlayer. Everything works fine in iOS and iPad OS, however, when running on visionOS, it sounds like it's constantly skipping (both in the simulator and on an actual device).

Anyone know why this might be or how to fix or a workaround?

Running into the same issue. For me, it works fine in preview and in simulator, but I'm getting oscillating track volume. Attaching code for reference

    let exerciseTrackPath = Bundle.main.path(forResource: "vivaldi_winter", ofType: "mp3")
    var audioPlayer: AVAudioPlayer = AVAudioPlayer()

...
        self.audioPlayer = try! AVAudioPlayer(contentsOf: URL(fileURLWithPath: exerciseTrackPath!))
...
        audioPlayer.play()
AVAudioPlayer doesn't work in visionOS
 
 
Q