skaudionode

SKAudioNode() crashes when plugging in/out headphones

时光毁灭记忆、已成空白 提交于 2020-01-01 08:34:06
问题 I am using a SKAudioNode() to play background music in my game. I have a play/pause function and everything is working fine until I plug in my headphones. There is no sound at all and when I call the pause/play function I get this error AVAudioPlayerNode.mm:333: Start: required condition is false: _engine->IsRunning() com.apple.coreaudio.avfaudio', reason: 'required condition is false: _engine->IsRunning() Does anyone knows what this means? Code: import SpriteKit class GameScene: SKScene {

SKAudioNode() crashes when plugging in/out headphones

安稳与你 提交于 2020-01-01 08:34:06
问题 I am using a SKAudioNode() to play background music in my game. I have a play/pause function and everything is working fine until I plug in my headphones. There is no sound at all and when I call the pause/play function I get this error AVAudioPlayerNode.mm:333: Start: required condition is false: _engine->IsRunning() com.apple.coreaudio.avfaudio', reason: 'required condition is false: _engine->IsRunning() Does anyone knows what this means? Code: import SpriteKit class GameScene: SKScene {

SKAudioNode not load sound from url

谁都会走 提交于 2019-12-29 08:45:32
问题 I want 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 .mp3 music too. It doesn't download it or stream and returns: nil But this code cause error: Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: file != nil' *** First throw call stack: .... libc++abi.dylib: terminating with

SKAudioNode Crash: AVAudioPlayerNode.mm:333: Start: required condition is false: _engine->IsRunning()

我的未来我决定 提交于 2019-12-06 07:28:21
问题 I've a simple SKAudioNode: let backgroundSound = SKAudioNode(fileNamed: "backgroundSound.mp3") I use to play backgroundSound.runAction(SKAction.play()) and backgroundSound.runAction(SKAction.stop()) to stop. Everything works fine until the app did enter in background mode and I'll resume more than 3 minute. If I go in background mode and resume after 10 - 20 seconds, the Audio doesn't crash. All crash log: 2016-05-29 23:26:43.612 PippiPompiere[1070:199471] 23:26:43.611 ERROR: [0x3a7cf000]

SKAudioNode Crash: AVAudioPlayerNode.mm:333: Start: required condition is false: _engine->IsRunning()

旧巷老猫 提交于 2019-12-04 13:51:57
I've a simple SKAudioNode: let backgroundSound = SKAudioNode(fileNamed: "backgroundSound.mp3") I use to play backgroundSound.runAction(SKAction.play()) and backgroundSound.runAction(SKAction.stop()) to stop. Everything works fine until the app did enter in background mode and I'll resume more than 3 minute. If I go in background mode and resume after 10 - 20 seconds, the Audio doesn't crash. All crash log: 2016-05-29 23:26:43.612 PippiPompiere[1070:199471] 23:26:43.611 ERROR: [0x3a7cf000] AVAudioPlayerNode.mm:333: Start: required condition is false: _engine->IsRunning() 2016-05-29 23:26:43.616

SKAudioNode() crashes when plugging in/out headphones

雨燕双飞 提交于 2019-12-04 02:29:58
I am using a SKAudioNode() to play background music in my game. I have a play/pause function and everything is working fine until I plug in my headphones. There is no sound at all and when I call the pause/play function I get this error AVAudioPlayerNode.mm:333: Start: required condition is false: _engine->IsRunning() com.apple.coreaudio.avfaudio', reason: 'required condition is false: _engine->IsRunning() Does anyone knows what this means? Code: import SpriteKit class GameScene: SKScene { let loop = SKAudioNode(fileNamed: "gameloop.mp3") let play = SKAction.play() let pause = SKAction.pause()

SKAudioNode not load sound from url

戏子无情 提交于 2019-11-29 14:34:56
I want 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 .mp3 music too. It doesn't download it or stream and returns: nil But this code cause error: Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: file != nil' *** First throw call stack: .... libc++abi.dylib: terminating with uncaught exception of type NSException i think you try AVAudioPlayer var resourcePath = url //your url var