在devdaily.com看到PNG to ICNS的教學,
FastIcns是一個方便的application, 可輕鬆把png 轉換成icns (mac的icon格式)
在Xcode裡, 把icns file 加到project中Resources/Icons & Default中
target 上 right click > GetInfo > Properties tab > Icon File 欄中輸入file的名稱,完成!=]
FastIcns project page
2010年11月2日星期二
Converting audio file format on Mac by "afConvert"
"afConvert" is a command which could be directly used in the Terminal (I am using Mac OS X 10.6.4).
I used to convert audio file of format .m4a to .caf, which is a file format for iPhone and is actually a wrapper for a number of data formats like .mp3, LEI, acc, etc...
To make my sound file playable by my OpenAL class in iPhone SDK, I tried to change it to LEI16
"afConvert -f caff -d LEI16@44100 inputname outputname"
In order to make the files smaller, I tried using LEI8 and acc but the sounds played are weird.
I am still working on it.
Here is a shellScript for batch conversion, name the script as converttocaf.sh and all the file in that directory will be converted to the .caf format:
I used to convert audio file of format .m4a to .caf, which is a file format for iPhone and is actually a wrapper for a number of data formats like .mp3, LEI, acc, etc...
To make my sound file playable by my OpenAL class in iPhone SDK, I tried to change it to LEI16
"afConvert -f caff -d LEI16@44100 inputname outputname"
In order to make the files smaller, I tried using LEI8 and acc but the sounds played are weird.
I am still working on it.
Here is a shellScript for batch conversion, name the script as converttocaf.sh and all the file in that directory will be converted to the .caf format:
for f in *; do
if [ "$f" != "converttocaf.sh" ] then
/usr/bin/afconvert -f caff -d LEI16@44100 $f
echo "$f converted"
fi
done
2010年11月1日星期一
Mac Shell Script
In our project, the screen delay whenever any sound is played.
The reason is that it used AVAudioPlayer for playing all sounds and musics.
However I found that AVAudioPlayer is more for streaming but not caching, we need to shift to OpenAL for playing sounds.
After writing a class for OpenAL, I used much time to find out why it doesn't work.
The final answer is: it works, but it is not compatible with the original audio format ".m4a".
Then I need to find a way to convert them to ".caf" format which works well with OpenAL in iPhone.
Well, the next step is to find a way to do batch convertion with afConvert.
Finally comes to the topic: using shellScript on Mac.
(the above topics: OpenAL, afConvert to caf, afConvert batch convertion, will be discussed later)
Here is a gd answer on StackOverFlow (as always).
And it is a script for deleting all files with extension .caf in a directory: "find . -type f -name "*.caf" -exec rm -f {} \;"
The reason is that it used AVAudioPlayer for playing all sounds and musics.
However I found that AVAudioPlayer is more for streaming but not caching, we need to shift to OpenAL for playing sounds.
After writing a class for OpenAL, I used much time to find out why it doesn't work.
The final answer is: it works, but it is not compatible with the original audio format ".m4a".
Then I need to find a way to convert them to ".caf" format which works well with OpenAL in iPhone.
Well, the next step is to find a way to do batch convertion with afConvert.
Finally comes to the topic: using shellScript on Mac.
(the above topics: OpenAL, afConvert to caf, afConvert batch convertion, will be discussed later)
Here is a gd answer on StackOverFlow (as always).
And it is a script for deleting all files with extension .caf in a directory: "find . -type f -name "*.caf" -exec rm -f {} \;"
2010年10月7日星期四
訂閱:
文章 (Atom)