I am having the same problem as this question: SimpleAudioEngine, playing .caf files (which is closed)
The solution, however, does not work.
I have Battle.wav
, which works just fine with
[[SimpleAudioEngine sharedEngine]playBackgroundMusic:@"Battle.wav"];
Now, I want to convert it to .caf. According to the answer in that question, I should use this terminal line:
afconvert -f caff -d LEI16@22050 Battle.wav
The resulting file, however, does not work. When I use:
[[SimpleAudioEngine sharedEngine]playBackgroundMusic:@"Battle.caf"];
Xcode displays the following message when I do that:
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved
I don't really know what does that mean. What I do know, however, is that the file indeed does not sound.
The question at playing a .caf file: works fine in simulator but not in iPhone doesn't help either (and the problem they have doesn't seem the same basic thing I'm having here).
Cocos2d-iphone 1.0.1, iPhone 4.