본문 바로가기

카테고리 없음

caf 컨버트


Gratuitous Music and Sound Effects

Android does not support the CAF sound file format, so the first thing we need to do is convert the original sound files to an alternate format that works on Android as well.

Open up a Terminal and issue the following commands (and don’t forget to replace $PROJECT_HOME in the first command with the actual path to the Android project – otherwise the command won’t work):


afconvert -f WAVE -d UI8 SpaceGame.caf SpaceGame.wav
afconvert -f WAVE -d UI8 explosion_large.caf explosion_large.wav
afconvert -f WAVE -d UI8 laser_ship.caf laser_ship.wav


simi@ubuntu:~/dev/cocos2d-1.0.1-x-0.12.0/samplecocos2dxandroid/Resources$ pacpl *.caf -to mp3

Perl Audio Converter - 4.0.5


Converting:  [SpaceGame.caf] -> [mp3] decode failed with exit status: 256


Converting:  [explosion_large.caf] -> [mp3] ..done. 

Converting:  [explosion_small.caf] -> [mp3] ..done. 

Converting:  [laser_enemy.caf] -> [mp3] ..done. 

Converting:  [laser_ship.caf] -> [mp3] ..done. 

Converting:  [powerup.caf] -> [mp3] ..done. 

Converting:  [shake.caf] -> [mp3] ..done. 

simi@ubuntu:~/dev/cocos2d-1.0.1-x-0.12.0/samplecocos2dxandroid/Resources$ pacpl *.caf -to wav

Perl Audio Converter - 4.0.5


Converting:  [SpaceGame.caf] -> [wav] decode failed with exit status: 256


Converting:  [explosion_large.caf] -> [wav] ..done. 

Converting:  [explosion_small.caf] -> [wav] ..done. 

Converting:  [laser_enemy.caf] -> [wav] ..done. 

Converting:  [laser_ship.caf] -> [wav] ..done. 

Converting:  [powerup.caf] -> [wav] ..done. 

Converting:  [shake.caf] -> [wav] ..done.