First, there is existing materials about AUPreset, how to generate it and how to use it within xcode, which I don't bother to introduce here. Please see http://www.electricpeelsoftware.com/2013/02/22/creating-aupreset-files.html
and the related links provided there.
What I want to mention here is the outcome of my nearly 3 hours of debugging. I tried to use some files with name "F#2.caf", "G#2.caf" as my instrument sound. I put them into the "Sounds" folder, make an .aupreset file and point the file references to the right place with exactly those file names "F#2" "G#2". But it turns out that when I download this into my device, the instrument just won't work! Then I change the name to be "FF2.caf", "GG2.caf", it works. (Took me a long time to realize I should make this change)
Then I double check the working .aupreset file Trombone.aupreset, and found that although it uses some files called "1a#.caf", "2a#.caf", it references those as "1a%23.caf", "2a%23.caf". Oh! That's the problem. (It really took me a long time to discover the problem.)
I'm not sure whether there are any other file name constraints when doing aupreset. I can only suggest that following the convention of "Trombone.aupreset" is the best practice.
If you are reading this, you might be facing a similar problem. Try it!
(Plus: recently I also found that the "space" character" is not allowed in aupreset's file reference part.)
tangkk
*****************
Google Translate:
谷歌翻译:
*****************
首先,是关于AUPreset,如何产生的,以及如何使用它在Xcode,我不打扰这里介绍的现有材料。请参阅http://www.electricpeelsoftware.com/2013/02/22/creating-aupreset-files.html“
提供相关链接。
在这里我要提的是我近3个小时的调试结果。我试图用一些文件名称“F#2.caf”,“G#2.caf的”我的乐器声音。我把它们放到“声音”文件夹,使。aupreset文件和文件指向到正确的地方,正是这些文件名“F#2”,“G#2”。但事实证明,当我下载到我的设备,仪器就无法正常工作!然后,我将名称更改为“FF2.caf”,“GG2.caf”,它的工作原理。 (我花了很长时间才意识到,我应该做这种改变)
然后,我双检查工作。aupreset的文件Trombone.aupreset的,并发现,虽然它使用的一些文件名为“1A#CAF”,“2A#咖啡馆”,它引用作为“1A%23.caf的”,“2A %23.caf“。哦!这就是问题。 (这真的花了我很长一段时间来发现问题。)
我不知道是否有任何其他的文件名的限制,做aupreset时。我只能建议,的惯例“Trombone.aupreset”后是最好的做法。
如果你正在读这篇文章,你可能会面临类似的问题。试试吧!
(加:最近我还发现,“空格”字符“不允许在aupreset文件引用部分)。
tangkk