[iOS]Audio Format - afconvert

when you want to convert your music or sound effect file to your ios application, you need to convert them to some audio format even though iOS can support many format to achieve performance and decrease your app size.

there are some good command

0: afplay xxx.xxx can test if it can be played after your convertion

1. long source music: aac is preferred. convert as below(wav file is save as by coolEdit with Microsoft ADPCM):

afconvert -f 'adts' input.wav output_file.aac

2. short source effect: caf is preferred, format is Linear PCM (uncompressed), convert as below:

afconvert-d LEI16-f'caff'input_file.xxx output_file.caf

 

你可能感兴趣的:(convert)