Thanks @AreejAnujm.
Check volume settings:
on real ipad: not muted and I can play youtube video in browser and hear it just fine. adjusting volume with buttons changes volume of video
on simulator: Mac is playing audio OK. I can hear email notification sounds etc. tried bouncing audio between mac studio and studio display. both worked for mac sounds but neither mattered for the game in the simulator. I can adjust ipad simulator volume by pressing <CMD>+<up arrow>/<CMD>+<down arrow>. I can see the slider "adjusting" volume as I do that. Playing youtube video in safari plays audio pretty quietly and adjust volume with controls doesn't change the volume so not sure about that.
Debug sound code: I added print statements to that code and I can see the statements in the debug console in xcode. Could be something here but I think the code is fine. Pretty much just cut and paste from Paul's page with the video content.
Test with different sounds: A little further along in the development so there are a lot of additonal sounds coded in. I'm not hearing any of them.
Check Simulator Settings: see check volume settings above ... unless there's something additional I'm not understanding.
Which leaves me with "Audio Session Configuration". Can you elaborate on that more? I did some googling but I'm not sure what you're talking about.
Here's some of my code in GameScene.swift:
. . .
func playSwooshSound() {
isSwooshSoundActive = true
let randomNumber = Int.random(in: 1...3)
let soundName = "swoosh\(randomNumber).caf"
let swooshSound = SKAction.playSoundFileNamed(soundName, waitForCompletion: true)
run(swooshSound) { [weak self] in
self?.isSwooshSoundActive = false
}
}
. . .
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let touch = touches.first else { return }
let location = touch.location(in: self)
activeSlicePoints.append(location)
redrawActiveSlice()
if !isSwooshSoundActive {
playSwooshSound()
}
. . .
most of that code comes from this video (or the videos after it)