Error: Failed to get the default input device ... when working on the simulator

WARNING: 40: ERROR: couldn't get default input device, ID = 0, err = 0! 

I came across this error message (/ crash) when I tried to use the iOS simulator (they all seem to give the same error) - working on the iPhone works very well.

The problem is somehow related to the sound parts, since when they are commented on, it works. The code is nothing unusual, but I'm sure someone will ask him to see it anyway:

 _flipSound = [SKAction playSoundFileNamed:@"flip.wav" waitForCompletion:NO]; _successSound = [SKAction playSoundFileNamed:@"success2.wav" waitForCompletion:NO]; _failureSound = [SKAction playSoundFileNamed:@"failure2.wav" waitForCompletion:NO]; 

and in places where sound is played, it looks, for example. eg:

 if (self.blockType == 3){ [self runAction:[SoundStore sharedStore].successSound]; } else { [self runAction:[SoundStore sharedStore].failureSound]; } 
+7
ios objective-c sprite-kit
source share
1 answer

You may need to reset your sound settings in the system by switching the "Play sound effects of the user interface" checkbox to "System Preferences"> "Sound"> ​​"Sound Effects"

sound-not-working-in-iphone-simulator

or perhaps set up your audio input device for what the simulator likes.

simulator-crashes-on-aqmeiomanger

I have no problem playing .wav files in the simulator using actions like yours above using Sound Actions as properties of an SKScene object. Therefore, a problem may arise in your SoundStore.

+7
source share

All Articles