Reputation: 7663
So, I'm trying to build a little game using Apple's SceneKit and as with all games I need to add some sounds here and there.
Reading trough the documentation the SCNAudioPlayer
could help with that and it's audioNode
property would allow me to change the volume of a sound, reverb, etc.
Now, the thing is that even though the documentation clearly states that there's this audioNode
property on the SCNAudioPlayer
class, and even though this property appears in the headers of the framework, be it Objective-C:
or Swift:
when I try to use it in my code I get this error:
Any idea what I'm doing wrong?
Upvotes: 1
Views: 174
Reputation: 7663
Ok.
After struggling with this more then 3 hours and posting my question here I've managed to find that the problem was that I was not importing the AVFoundation
framework which is needed so that the audioNode
property would be exposed.
So a simple
import AVFoundation
Did the trick.
Thanks!
Upvotes: 1