{"id":1338,"date":"2012-07-04T08:06:39","date_gmt":"2012-07-04T15:06:39","guid":{"rendered":"http:\/\/www.wellgolly.com\/?p=1338"},"modified":"2012-07-04T08:06:39","modified_gmt":"2012-07-04T15:06:39","slug":"sound-formats-for-ios","status":"publish","type":"post","link":"https:\/\/www.wellgolly.com\/?p=1338","title":{"rendered":"Sound formats for iOS"},"content":{"rendered":"<p>This <a href=\"http:\/\/developer.apple.com\/library\/mac\/#qa\/qa1534\/_index.html\">link<\/a> is useful for understanding sound formats.<\/p>\n<p>For all the sounds that I record, I use .caf format. For pre-recorded sounds I converted them all from .aiff to .m4a using afconvert\u2014a developer tool from the command line. You can also use iTunes.<\/p>\n<p>Here\u2019s the script I use for afconvert. I adopted if from one I found on Sparrow.org. afconvert will convert to lots of formats, but the Apple Lossless makes the smallest file size for me.<\/p>\n<p><pre><code class=\"\u201dsmaller\u201d preserve-code-formatting\">\n#!\/bin\/bash\n# http:\/\/www.sparrow-framework.org\/2010\/06\/sound-on-ios-best-practices\/\n# Reset the field separator to : instead of space so all of the file will be converted\nIFS=:\nfor i in ~\/Sounds\/*; do\n&nbsp;&nbsp;\n&nbsp;&nbsp;# creates sound.aifc (IMA4 compression, MONO)\n&nbsp;&nbsp;#afconvert -f AIFC -d ima4 -c 1 $i\n\n&nbsp;&nbsp;# creates sound.m4a (Apple Lossless compression)\n&nbsp;&nbsp;afconvert -f m4af -d aac -q 127 -c 1 $i\ndone\n<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This link is useful for understanding sound formats. For all the sounds that I record, I use .caf format. For pre-recorded sounds I converted them all from .aiff to .m4a using afconvert\u2014a developer tool from the command line. You can also use iTunes. Here\u2019s the script I use for afconvert. I adopted if from one &hellip; <a href=\"https:\/\/www.wellgolly.com\/?p=1338\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Sound formats for iOS<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-1338","post","type-post","status-publish","format-standard","hentry","category-ios"],"_links":{"self":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/1338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1338"}],"version-history":[{"count":0,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/1338\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}