0
votes

I would really like an answer to this strangeness as I've been trying to squash it all night yesterday and not wanting to go for another sleepless night.

I have an SCNScene with camera, nodes etc properly placed and added 3 audio players to 3 of the nodes in the scene. They are loaded exactly the same way but only one is positional while the two others stay static like ambient sounds.

Let me explain further:

I load every node with a node.position = SCNVector3(x,y,z) I have a directional keyDown event listener that changes directions of the audio listener node + or - in the scene.

The audio players load with volume 1.0 looping = true and positional = true.

3 different source files are loaded, .mp3 .wav and .aiff (this latter is a dynamic to pcm render of NSSpeechSynthesis)

All three sounds load and can be heard, though only one changes position (the pcm format).

I shuffled sound source files around with the nodes and I get weird results such as nothing loading, or loading but not being positional anymore.

This is not behaviour you would expect and is totally random (or so it seems).

Can anyone please help me figure why I can only have 1 positional node in the scene?

Thanks,

1

1 Answers

0
votes

Ok, after fiddling more I found the issue.

It seems as though files must be in .pcm format to be loaded to the audioEngine buffer.

It works with as many audio sources as I want but I would like to be able to load any file format and have them run properly.