Reputation: 1317
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?
Upvotes: 2
Views: 1392
Reputation: 1328
If you are getting a crash while running in device from xcode pls try this(worked for me). Dissconnect the device from Xcode and run the app in the device. I dont know why it worked like that. But when I did this there was no crash.
Upvotes: 0
Reputation: 6983
that message means the song was read correctly and should be playing. possible reasons you don't hear it?
But the sound is loading and most likely playing.
Upvotes: 0
Reputation: 1097
There is no problems with your code for the Playing of the Sound. Please check the Sound file has been added to the project also do check the format of the sound. It should play the Sound whenever you call the Play Effect. Please also try to PRELOAD the sound effect in the init method.
Upvotes: 0
Reputation: 26682
There isn't a problem. It's a status message written to the log when you initialise the current OpenAL context using alcMakeContextCurrent
. As far as I'm aware, you can't get rid of the message.
Upvotes: 0
Reputation: 32066
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)
Upvotes: 1