core-audio

Import aurioTouch Library with Swift

北慕城南 提交于 2020-01-01 15:52:33
问题 I'm trying to convert an Objective-C app to swift. I'd like to import classes in aurioTouch to Swift app, so I created the following Bridging-Header file: #import "AudioController.h" but I received following errors in DCRejectionFilter.h, BufferManager.h, FFTHelper.h: Unknown type name 'class'; did you mean 'Class'? Expected ';' after top level declarator and also in AudioController.h: Unknown type name 'BufferManager' Unknown type name 'DCRejectionFilter' Of course I use .mm instead of .m,

The iPhone 5 has 3 mics. Can I change from which one I'm recording?

对着背影说爱祢 提交于 2020-01-01 12:33:31
问题 The iPhone 5 has 3 microphones, according to its product presentation: After looking through the website of iFixit and others I now know where the bottom microphone is and I've identified the one on the back, right next to the camera. There should be another one on the front, at the top, but I can't see it, so I assume it's behind the earpiece/receiver opening. (Is this correct?) I would like to record from two different microphones while the iPhone 5 is lying on it's back. (So the rear mic

OSStatus NSOSStatusErrorDomain

拜拜、爱过 提交于 2020-01-01 09:26:11
问题 I received the following error when I get the property using AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareSampleRate,&size, &myAudioDescription.mSampleRate) Error Produced by above statement is Error Domain=NSOSStatusErrorDomain Code=560557673 "The operation couldn’t be completed. (OSStatus error 560557673.)" Now, here what does 560557673 mean and where can I find its explanation? Documentation only provides NSOSStatusErrorDomain as one of the errors. 回答1: That code means the

OSStatus NSOSStatusErrorDomain

半城伤御伤魂 提交于 2020-01-01 09:26:11
问题 I received the following error when I get the property using AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareSampleRate,&size, &myAudioDescription.mSampleRate) Error Produced by above statement is Error Domain=NSOSStatusErrorDomain Code=560557673 "The operation couldn’t be completed. (OSStatus error 560557673.)" Now, here what does 560557673 mean and where can I find its explanation? Documentation only provides NSOSStatusErrorDomain as one of the errors. 回答1: That code means the

How to get iPhone OS 3.1 muffled keyboard sound?

时光总嘲笑我的痴心妄想 提交于 2020-01-01 05:03:29
问题 I have added the iPhone's Tock sound to my own custom keyboard like this: NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.UIKit"] pathForResource:@"Tock" ofType:@"aiff"]; SystemSoundID soundID; AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID); AudioServicesPlaySystemSound(soundID); // we don't dispose of the sound to keep the sound in the cache for the next time //AudioServicesDisposeSystemSoundID(soundID); In iPhone OS 3.1, however, the keyboard

How to get iPhone OS 3.1 muffled keyboard sound?

你。 提交于 2020-01-01 05:03:05
问题 I have added the iPhone's Tock sound to my own custom keyboard like this: NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.UIKit"] pathForResource:@"Tock" ofType:@"aiff"]; SystemSoundID soundID; AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID); AudioServicesPlaySystemSound(soundID); // we don't dispose of the sound to keep the sound in the cache for the next time //AudioServicesDisposeSystemSoundID(soundID); In iPhone OS 3.1, however, the keyboard

iOS AudioUnits pass through

拈花ヽ惹草 提交于 2019-12-31 17:57:41
问题 I am trying to write an iOS application that will pass the sound received from microphone to speaker without any changes. I've read apple docs and guides. I choosed the first pattern from this guide. But nothing happening - silence. As you can see I've tried to use the AUAudioGraph (commented) - same result (do I need it in this simple example at all?). I saw few examples in the internet where callbacks are used, but I do not want use any. Is it possible? Any suggestions? Thanks for attention

iOS AudioUnits pass through

我是研究僧i 提交于 2019-12-31 17:57:11
问题 I am trying to write an iOS application that will pass the sound received from microphone to speaker without any changes. I've read apple docs and guides. I choosed the first pattern from this guide. But nothing happening - silence. As you can see I've tried to use the AUAudioGraph (commented) - same result (do I need it in this simple example at all?). I saw few examples in the internet where callbacks are used, but I do not want use any. Is it possible? Any suggestions? Thanks for attention

OS X / iOS - Sample rate conversion for a buffer using AudioConverterFillComplexBuffer

偶尔善良 提交于 2019-12-31 09:05:14
问题 I'm writing a CoreAudio backend for an audio library called XAL. Input buffers can be of various sample rates. I'm using a single audio unit for output. Idea is to convert the buffers and mix them prior to sending them to the audio unit. Everything works as long as the input buffer has the same properties (sample rate, channel count, etc) as the output audio unit. Hence, the mixing part works. However, I'm stuck with sample rate and channel count conversion. From what I figured out, this is

AudioConverterFillComplexBuffer return -50 (paramErr)

北城以北 提交于 2019-12-31 03:06:15
问题 I'm trying to convert a PCM 32-bit float audio stream to ALAC. I found some working examples to build from, but my own code keeps getting a -50 (paramErr) from AudioConverterFillComplexBuffer. My eyes are crossing from looking at this code; I can't see what's different from my examples. I set up my input and output formats and create the converter: UInt32 numChannels = 2; // Describe the input stream AudioStreamBasicDescription inputFormat; memset(&inputFormat, 0, sizeof