CAF

How to play and read .caf PCM audio file

大憨熊 提交于 2020-01-15 03:06:29
问题 I have an app that selects a song from the iPod Library then copies that song into the app's directory as a '.caf' file. I now need to play and at the same time read that file into Apples FFT from the Accelerate framework so I can visualize the data like a spectrogram. Here is the code for the FFT: void FFTAccelerate::doFFTReal(float samples[], float amp[], int numSamples) { int i; vDSP_Length log2n = log2f(numSamples); //Convert float array of reals samples to COMPLEX_SPLIT array A vDSP_ctoz

How to play and read .caf PCM audio file

大兔子大兔子 提交于 2020-01-15 03:06:10
问题 I have an app that selects a song from the iPod Library then copies that song into the app's directory as a '.caf' file. I now need to play and at the same time read that file into Apples FFT from the Accelerate framework so I can visualize the data like a spectrogram. Here is the code for the FFT: void FFTAccelerate::doFFTReal(float samples[], float amp[], int numSamples) { int i; vDSP_Length log2n = log2f(numSamples); //Convert float array of reals samples to COMPLEX_SPLIT array A vDSP_ctoz

Is it possible to load a compressed audio file directly into a buffer, without conversion?

跟風遠走 提交于 2020-01-07 07:20:07
问题 I am developing an iOS app that must handle several stereo audio files (ranging from a few seconds to four minutes in duration) at once, playing up to three back simultaneously, synched through a Multi-Channel-Mixer-based AUGraph. My audio files are compressed – either as MP3, AAC or CAF – but when they are loaded into buffers are converted into the 32-bit AudioUnitSampleType format (my code is based on Apple's iPhoneMultichannelMixerTest). Needless to say, with such large buffers, app memory

Converting mp3 to caf file for iPhone

跟風遠走 提交于 2019-12-25 16:00:24
问题 I am experimenting with the sampling rate of the mp3 file to convert it into caf format. afconvert -f caff -d LEI16@44100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@22100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@12000 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@20100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@15100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@14100 ./fricatives_play_all.mp3

Combine two .wav files in iPhone using Objective C

匆匆过客 提交于 2019-12-18 12:42:55
问题 I want to combine two .wav recording files together. Can any one help me figure out how to achieve this.I tried combining the data but the headers are creating problem. Can we do the combining as we do to combine the wave files. This is how i am doing the combine, NSMutableData *datas = [NSMutableData alloc]; NSData *data1 = [NSData dataWithContentsOfFile: [recordedTmpFile1 path]]; NSData *data2 = [NSData dataWithContentsOfFile: [recordedTmpFile2 path]]; NSLog(@"file1 size : %d", [data1

how to read header-chunks from a CAF-file using core-audio/audiotoolbox

对着背影说爱祢 提交于 2019-12-13 04:28:10
问题 i'm trying to read a CAF-file on OSX, using AudioToolbox's Extended Audio File API. opening the file works fine, however, i need to access the UUID chunk, and i cannot find any reference on how to do that (or how to access any header-chunk of the file) surely there must be a way to do this without parsing the file on my own. PS: i can already do this with libsndfile, but i want to find a way to do this with only components that come with OSX. i already tried calling ExtAudioFileGetProperty()

Looping through the samples of CAF file

倖福魔咒の 提交于 2019-12-12 05:59:07
问题 Could anyone give me a suggestion or an example of how I would loop through the samples of CAF (Core Audio Format) file? Like taking the first 1000 samples and changing them to 0? Something like: for(int i=0; i < numberOfSamples; i++) { cafFile.sample[i] = methodThatUsesSampleValue(cafFile.sample[i]); } Keep in mind: I don't need to do this live. No buffers, etc. needed. I would like to do this in C, C++ or Objective-C. Would like to be able to use the code on the iOS platform. Any help

Sound working in emulator, not in real iPhone

走远了吗. 提交于 2019-12-11 02:39:07
问题 Have few short sound effect samples, which play just fine in emulator, but not at all in real iPhone 3GS. Here's the code, about as-is from Apple SysSound sample: CFBundleRef mb = CFBundleGetMainBundle (); CFURLRef soundFileURLRef = CFBundleCopyResourceURL (mb, CFSTR("mySound"), CFSTR ("caf"), NULL); SystemSoundID sid; AudioServicesCreateSystemSoundID(soundFileURLRef, &sid); AudioServicesPlaySystemSound(sid); When using iPhone, I can hear keyclicks and music from iTunes (not trying to use at

iPhone - How to convert .caf audio files into .aac?

房东的猫 提交于 2019-12-10 10:23:54
问题 I am working on audio recording. I am able to record my audio in caf (Core audio format).i followed this tutorial Recording Audio on an iPhone with AVAudioRecorder. Now I don't want to record sound in .aac format directly, I need to convert recorded .caf audio file into .aac audio file... any idea how to do this? #import <UIKit/UIKit.h> #import <AVFoundation/AVFoundation.h> @interface recordViewController : UIViewController <AVAudioRecorderDelegate, AVAudioPlayerDelegate> { AVAudioRecorder

iOS: Record audio in other format than caf

十年热恋 提交于 2019-12-07 20:45:06
问题 I am working on audio recording. I am able to record my audio in caf (Core audio format). Now I want to record sound in .mp3 or .amr . I tried a lot of google but didn't found anything. I am not sure if my steps following work: Write that Audio with .caf extention to document dir Read data from that file write the file again with .mp3 or .amr extention I have 100% doubt that this will not going to work as this will just re save file with some other extension. This won't change audio codec. I