afconvert

How do I use afconvert to convert all the files in a directory from wav to caf?

冷暖自知 提交于 2019-12-03 02:52:18
问题 I have a directory with about 50 wav files that I need to convert to caf, because AudioServicesCreateSystemSoundID() returns an error for some of them (but not all). Here's an example of the command I've used successfully for a single file: afconvert -f caff -d LEI16@44100 -c 1 whistle.wav whistle.caf How do I do this quickly - not one-by-one for each file? 回答1: On Windows, use the %~ni syntax. for %i in (*.wav) do afconvert -f caff -d LEI16@44100 -c 1 %i %~ni.caf 回答2: Similar approach for

How do I use afconvert to convert all the files in a directory from wav to caf?

别说谁变了你拦得住时间么 提交于 2019-12-02 16:24:55
I have a directory with about 50 wav files that I need to convert to caf, because AudioServicesCreateSystemSoundID() returns an error for some of them (but not all). Here's an example of the command I've used successfully for a single file: afconvert -f caff -d LEI16@44100 -c 1 whistle.wav whistle.caf How do I do this quickly - not one-by-one for each file? lavinio On Windows, use the %~ni syntax. for %i in (*.wav) do afconvert -f caff -d LEI16@44100 -c 1 %i %~ni.caf Randall Similar approach for bash: for i in *.wav; do afconvert -f caff -d LEI16@44100 -c 1 $i ${i%.wav}.caf; done Ward found

Converting audio to CAF format for playback on iPhone using OpenAL

浪子不回头ぞ 提交于 2019-11-28 02:32:44
I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;) Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL? Dave Verwer afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf References: Apple's Multimedia Programming Guide: Using Audio: Preferred Audio Formats in iOS afconvert(1) man page (use afconvert

Converting audio to CAF format for playback on iPhone using OpenAL

狂风中的少年 提交于 2019-11-26 23:45:36
问题 I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;) Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL? 回答1: afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf References: Apple's Multimedia