For uncompressed (highest quality) audio, use 16-bit, little endian, linear PCM audio data packaged in a CAF file. You can convert an audio file to this format in Mac OS X using the afconvert command-line tool
where,
Input : path which you want to convert.
Output: path which you want to save.
Example :
localhost:~ ashishjabble$ /usr/bin/afconvert -f caff -d LEI16 /Users/ashishjabble/Desktop/sounds/Snore_Whistle.mp3 /Users/ashishjabble/Desktop/sounds/caf/Snore-Whistle.caf
* Generally users open a audio file and then right click on that and change the extension of format which they want it works on MACOSX, but when we use this audio format into our Xcode project Resource Folder ,which we play custom sound for APPLE PUSH NOTIFICATION but it doesnot work.So, use above command for converting audio format and it works perfect.
Enjoy :))
Code:
/usr/bin/afconvert -f caff -d LEI16 {INPUT} {OUTPUT}
where,
Input : path which you want to convert.
Output: path which you want to save.
Example :
localhost:~ ashishjabble$ /usr/bin/afconvert -f caff -d LEI16 /Users/ashishjabble/Desktop/sounds/Snore_Whistle.mp3 /Users/ashishjabble/Desktop/sounds/caf/Snore-Whistle.caf
* Generally users open a audio file and then right click on that and change the extension of format which they want it works on MACOSX, but when we use this audio format into our Xcode project Resource Folder ,which we play custom sound for APPLE PUSH NOTIFICATION but it doesnot work.So, use above command for converting audio format and it works perfect.
Enjoy :))
Thanks Ashish!
ReplyDeleteThis worked perfectly....