core-audio

CoreAudio get output sample rate

陌路散爱 提交于 2019-12-08 09:43:35
问题 I'm creating a Mac OS X CoreAudio command-line program with proprietary rendering of some alphanumeric terminal input into a live audio signal, by means of AudioUnits, trying to stay as simple as possible. All works fine up to matching output sample rate. As a starting point I'm using the Chapter 07 tutorial code of Addisson Wesley's "Learning Core Audio", CH07_AUGraphSineWave. I initialize the AudioComponent "by the book": void CreateAndConnectOutputUnit (MyGenerator *generator) {

Is there a way to record device audio on the iPhone?

做~自己de王妃 提交于 2019-12-08 08:17:38
问题 AVAudioRecorder allows the recording of external audio. However I wish to record the audio made by my application (through numerous AVAudioPlayers), is this possible on the iPhone? 回答1: If you want to record the sounds your iOS app makes, you have to use a much lower lever API, such as Audio Unit RemoteIO, or Audio Queues with raw PCM audio samples. 来源: https://stackoverflow.com/questions/5670326/is-there-a-way-to-record-device-audio-on-the-iphone

Panning a mono signal with MultiChannelMixer & MTAudioProcessingTap

血红的双手。 提交于 2019-12-08 07:44:08
问题 I'm looking to pan a mono signal using MTAudioProcessingTap and a Multichannel Mixer audio unit, but am getting a mono output instead of a panned, stereo output. The documentation states: "The Multichannel Mixer unit (subtype kAudioUnitSubType_MultiChannelMixer) takes any number of mono or stereo streams and combines them into a single stereo output." So, the mono output was unexpected. Any way around this? I ran a stereo signal through the exact same code and everything worked great: stereo

EXC_BAD_ACCESS on ExtAudioFileWriteAsync

倖福魔咒の 提交于 2019-12-08 07:16:29
问题 I have added the following code at the end of the Mic / Line In Audio Rendering Callback. But the app keeps crashing with EXC_BAD_ACCESS on : err = ExtAudioFileWriteAsync(mOutputAudioFile, inNumberFrames, ioData); The rest of the code is as follows : ExtAudioFileRef mOutputAudioFile; AudioFileID mAfid; NSLog(@"Writing output to file ...."); NSArray *dirPaths; NSString *docsDir; dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); docsDir = [dirPaths

How do I apply effect to mic input?(iOS Core Audio & Audio Graph)

懵懂的女人 提交于 2019-12-08 06:15:16
问题 I would like to develop application on iOS5 that get voice and apply effect(high pass filer, delay, and so on) to it and output it from speaker. I tried RemoteIO(input) -> effect ->RemoteIO(output) but it didn't work. AudioComponentDescription cd; cd.componentType = kAudioUnitType_Output; cd.componentSubType = kAudioUnitSubType_RemoteIO; cd.componentManufacturer = kAudioUnitManufacturer_Apple; cd.componentFlags = 0; cd.componentFlagsMask = 0; AUGraphAddNode(self.auGraph, &cd, &remoteIONode);

How can I add an 'enhancement' sound filter in win7?

五迷三道 提交于 2019-12-08 06:03:27
问题 In windows 7, if one right clicks on the speaker icon in the taskbar, clicks playback devices, opens properties for one of the devices tab, then clicks the enhancements tab, one gets a list of filters ("Bass Boost" etc) that can be applied to that sound device. How can I register my own custom filter here? Please note that I am not an IHV - horrible hacks involving unsigned drivers, etc are acceptable, as this will be primarily for my own use. 回答1: If you're an audio IHV you register them

Unable to Save Performance Parameters in AUSampler

江枫思渺然 提交于 2019-12-08 04:43:14
问题 I'm trying to connect a performance parameter to control the amplifier gain of an AUSampler in AU Lab but I'm unable to save the parameter. When I click to another tab I get a message that says: You have a partially created performance parameter. Any changes will be lost. Would you like to continue editing your performance parameter or discard changes and leave the parameter editor? Does anyone know how to finalize the parameter? I believe I have connected it properly but it seems like I'm

Is there a way to record device audio on the iPhone?

穿精又带淫゛_ 提交于 2019-12-08 04:22:25
AVAudioRecorder allows the recording of external audio. However I wish to record the audio made by my application (through numerous AVAudioPlayers), is this possible on the iPhone? If you want to record the sounds your iOS app makes, you have to use a much lower lever API, such as Audio Unit RemoteIO, or Audio Queues with raw PCM audio samples. 来源: https://stackoverflow.com/questions/5670326/is-there-a-way-to-record-device-audio-on-the-iphone

Triggering UI code from Audio Unit Render Proc on iOS

你。 提交于 2019-12-08 04:08:53
问题 I have a Multichannel Mixer audio unit playing back audio files in an iOS app, and I need to figure out how to update the app's UI and perform a reset when the render callback hits the end of the longest audio file (which is set up to run on bus 0). As my code below shows I am trying to use KVO to achieve this (using the boolean variable tapesUnderway - the AutoreleasePool is necessary as this Objective-C code is running outside of its normal domain, see http://www.cocoabuilder.com/archive

CoreAudio - how to determine the end of the playing aac file

僤鯓⒐⒋嵵緔 提交于 2019-12-08 02:01:06
问题 I am playing with CoreAudio on the iPhone, and I am unable to find how to know when the song has finished to play. I put a property listener on kAudioQueueProperty_IsRunning , it is working when starting playing but not at the end of the file. It's work when I stop AudioQueue... Do you have an idea ? Thanks a lot. PS : I am using sample code from the excellent book iPhone Cool Projects : http://apress.com/book/downloadfile/4453 Edit : there’s a bug in the code that went out with the book. The