core-audio

iOS multitasking for an Audio Recording application

北城余情 提交于 2019-11-27 06:38:09
I am writing an application that records audio. I am looking into the feasibility of supporting multitasking while doing audio recordings (in the background). The answer seems to be a no from what I've read so far, especially since the program is meant to release any system resources being used when switched out. So I am wondering, is it possible to let the user switch to another application in iOS while my application continues to capture audio in the background? You can. Skype does this. You presumably need to set <key>UIBackgroundModes</key><array><string>audio</string></array> in Info

How to use the CoreAudio API in Swift

社会主义新天地 提交于 2019-11-27 06:29:09
问题 I am in the process of migrating my streaming audio engine to swift. i am finding it difficult to use the C Audio API in swift. I have a problem with AudioFileStreamOpen api where it takes 2 C functions as a parameter. I don't know how to use this API is swift. AudioFileStreamOpen(self as UnsafePointer<()>, propertyProc, packetProc, kAudioFileMP3Type, audioStreamId) I have defined the callback method as below for this API. But i am getting the compilation error. func propertyProc(inClientData

Can I use Core Audio effects on the iPhone?

牧云@^-^@ 提交于 2019-11-27 06:24:06
问题 I know that a subset of Core Audio is available in the iPhone OS, but I don't know how much of all the effects / filters is available. If it is available, I would like to get some directions on how to apply some simple effects over an audio unit (delay, echo etc...). 回答1: There are a couple of things you can do on the iPhone WRT to audio. The first is OpenAL, a cross-platform audio manipulation library that is supported on the iPhone. You can find a FAQ for it here: https://web.archive.org

iPhone: AudioBufferList init and release

杀马特。学长 韩版系。学妹 提交于 2019-11-27 05:45:31
问题 What are the correct ways of initializing (allocating memory) and releasing (freeing) an AudioBufferList with 3 AudioBuffers? (I'm aware that there might be more than one ways of doing this.) I'd like to use those 3 buffers to read sequential parts of an audio file into them and play them back using Audio Units. 回答1: Here is how I do it: AudioBufferList * AllocateABL(UInt32 channelsPerFrame, UInt32 bytesPerFrame, bool interleaved, UInt32 capacityFrames) { AudioBufferList *bufferList = NULL;

OSStatus error 1718449215

╄→гoц情女王★ 提交于 2019-11-27 05:44:15
问题 I have created an iPhone application to record our voice. When I try to record, I am getting error message in following statement. recorder = [[ AVAudioRecorder alloc] initWithURL:url settings:recordSetting error:&err]; Error Domain=NSOSStatusErrorDomain Code=1718449215 "Operation could not be completed. (OSStatus error 1718449215.)" If I tried to record in .caf file, it is working fine. If I tried with .m4a, I am getting this error message. Please help me to resolve it. Thanks. 回答1:

Override ringer volume in iPhone apps

不问归期 提交于 2019-11-27 04:41:09
问题 I have built an app that plays lots of sounds the easy way: AudioServicesPlaySystemSound(someSoundID); When I use the device volume buttons to increase or decrease the volume, the volume I actually change is the phone's ringer volume. So if you decrease it and exit the app then your phone will ring quietly... Is there an easy way to override this and actually change my application's volume? 回答1: I have found the solution to what I thought would be a common problem. So here is how your app can

Recording to AAC from RemoteIO: data is getting written but file unplayable

☆樱花仙子☆ 提交于 2019-11-27 03:54:24
I have been trying to record from a RemoteIO unit directly to AAC in a renderCallback in iOS 5 on an iPad 2. I have seen conflicting info saying it is not possible & that it is possible (in the comments here ). My reason for wanting to do it is because recording to PCM requires so much disk space for a recording of any length - even if it is later converted to AAC. I'm about ready to give up though. I've scraped through Google, SO, the Core Audio book and the Apple Core-Audio mailing list & forums and have reached the point where I am not getting any errors - and am recording something to disk

How to record an audio file in .mp3 format?

做~自己de王妃 提交于 2019-11-27 02:50:49
问题 I am using the following settings for recording audio file in .mp3 format using AVAudioRecorder. NSDictionary *recordSettings = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithFloat: 44100.0],AVSampleRateKey, [NSNumber numberWithInt: kAudioFormatMPEGLayer3],AVFormatIDKey, [NSNumber numberWithInt: 1], AVNumberOfChannelsKey, [NSNumber numberWithInt: AVAudioQualityMax],AVEncoderAudioQualityKey,nil]; But not able to record with these. I searched a lot for this but wasn't able to

How to develop an iphone app with reverb functionality?

故事扮演 提交于 2019-11-27 02:25:47
问题 I am developing an iPhone application (like Audio Processing). I have to give some effect to the audios. If it is desktop app, many options are there. We can get good examples and full project like audacity. But I want to develop for iPhone. I got an app with reverb option; (take a look at following link). Just I watch the "video", I did not test this application in my iPhone device. http://www.appstorehq.com/reverb-iphone-89870/app My question is; How can I develop the app with reverb

Detecting a clap in IOS

一笑奈何 提交于 2019-11-27 02:02:05
问题 I am trying to build an IOS application that counts claps. I have been watching the WWDC videos on CoreAudio, and the topic seems so vast that I'm not quite sure where to look. I have found similar problems here in stackoverflow. Here is one in C# for detecting a door slam: Given an audio stream, find when a door slams (sound pressure level calculation?) It seems that I need to do this: Divide the samples up into sections Calculate the energy of each section Take the ratio of the energies