I want to download sound from url and play it once:
let sound = SKAudioNode(url:URL(string:"http://www.music.helsinki.fi/tmt/opetus/uusmedia/esim/a2002011001-e02-16kHz.wav")!)
sound.run(SKAction.play())
I tried the music .mp3. It does not download or stream:nil
But this code causes an error:
The application terminated due to the uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'prerequisite is false: file! = Nil' *** First stack of throw calls: ....
libc ++ abi.dylib: termination with an uncaught exception of type NSException
source
share