I’m trying to play an audio file in a cocos2d application. Here is the line which tries to play the sound:
[[SimpleAudioEngine sharedEngine] playEffect:@"pig_squeal.wav"];
If I put a log near this line, the log appears, and I can play the sound with iTunes. But when the sound should be played, there is a message displayed:
AudioStreamBasicDescription: 2 ch, 44100 Hz, ‘lpcm’ (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved
What’s the problem?
This was discussed in comments but I’ve amalgamated all the possibilities of why it may not work here.:
That’s not an error message, just some information.
Is the sound definitely in your library and a part of the target?
You haven’t changed the volume of the SimpleAudioEngine or the volume of your device isn’t all the way down?
Try a different sound effect too? Try and narrow the problem down to “is it SimpleAudioEngine”.
Also try and playBackgroundMusic for a sound (This was the solution in this case)