audiounit

CMSampleBufferSetDataBufferFromAudioBufferList returning error 12731

烂漫一生 提交于 2019-11-30 18:57:05
问题 I am trying to capture app sound and pass it to AVAssetWriter as input. I am setting callback for audio unit to get AudioBufferList. The problem starts with converting AudioBufferList to CMSampleBufferRef. It always return error -12731 which indicates that required parameter is missing Thanks Karol -(OSStatus) recordingCallbackWithRef:(void*)inRefCon flags:(AudioUnitRenderActionFlags*)flags timeStamp:(const AudioTimeStamp*)timeStamp busNumber:(UInt32)busNumber framesNumber:(UInt32

iOS AUSampler audiounit - file path issue with EXS audio files?

被刻印的时光 ゝ 提交于 2019-11-30 18:35:27
问题 Following the Apple docs here I have been able to successfully load a GarageBand EXS sampler instrument into AUSampler in my iOS app by recreating, for example the following path within my app directory: /Sampler Files/Funk Horn Section/nameofaudio.aif iOS looks for the audio file in the following directory: file:///Library/Application%20Support/GarageBand/Instrument%20Library/Sampler/Sampler%20Files/Funk%20Horn%20Section/' However this doesn't work when I create my own EXS file. How does it

OSX: CoreAudio API for setting IO Buffer length?

烂漫一生 提交于 2019-11-30 18:32:27
问题 This is a follow-up to a previous question: OSX CoreAudio: Getting inNumberFrames in advance - on initialization? I am trying to figure out what will be the AudioUnit API for possibly setting inNumberFrames or preffered IO buffer duration of an input callback for a single HAL audio component instance in OSX (not a plug-in!). While I understand there is a comprehensive documentation on how this can be achieved in iOS, by means of AVAudioSession API, I can neither figure out nor find

Attaching AudioUnit effects to SCNAudioSource nodes in SceneKit

蹲街弑〆低调 提交于 2019-11-30 15:26:10
I have successfully created some functions to take an SNSpeechSynthesizer.startSpeakingString(string, url) and attach the resulting .aiff file to an SCNAudioPlayer through a closure and attach the whole thing to an SCNNode. This runs the audio snippet with given SCNNode.position(x, y, z). All good but there are no effects associated to the SCNAudioSource apart from volume, rate and reverb which itself does nothing. I would like to add audio unit effects such as delay echo flange etc, but I couldn't find relevant information apart from AVAudioEngine and AVAudioFile classes which seem to be

How do I connect an AudioFilePlayer AudioUnit to a 3DMixer?

守給你的承諾、 提交于 2019-11-30 09:26:14
I am trying to connect an AudioFilePlayer AudioUnit to an AU3DMixerEmbedded Audio Unit, but I'm having no success. Here's what I'm doing: create an AUGraph with NewAUGraph() Open the graph Initalize the graph Add 3 nodes: outputNode: kAudioUnitSubType_RemoteIO mixerNode: kAudioUnitSubType_AU3DMixerEmbedded filePlayerNode: kAudioUnitSubType_AudioFilePlayer Connect the nodes: filePlayerNode -> mixerNode mixerNode -> outputNode Configure the filePlayer Audio Unit to play the required file Start the graph This doesn't work: it balks at AUGraphInitialize with error 10868 (kAudioUnitErr

Adjust the length of an AudioUnit Buffer

不问归期 提交于 2019-11-30 07:55:45
my Problem concerns AudioUnits. In order to design a voicechanging App for iPhone (with Objective-C xCode) i use RemoteIO audioUnit sample from this website: http://atastypixel.com/blog/using-remoteio-audio-unit/ The audioUnit buffers are set to a length of 256 samples. For my project i need alot more (about 22050). The quoted page says that the length of the audioUnit buffers can be adjusted like this: float aBufferLength = 0.005; // In seconds AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareIOBufferDuration, sizeof(aBufferLength), &aBufferLength); Now my specific question: The

Attaching AudioUnit effects to SCNAudioSource nodes in SceneKit

巧了我就是萌 提交于 2019-11-30 07:39:47
问题 I have successfully created some functions to take an SNSpeechSynthesizer.startSpeakingString(string, url) and attach the resulting .aiff file to an SCNAudioPlayer through a closure and attach the whole thing to an SCNNode. This runs the audio snippet with given SCNNode.position(x, y, z). All good but there are no effects associated to the SCNAudioSource apart from volume, rate and reverb which itself does nothing. I would like to add audio unit effects such as delay echo flange etc, but I

ios audio unit remoteIO playback while recording

时光怂恿深爱的人放手 提交于 2019-11-30 07:33:18
I have been charged to add VOIP into an game (cross-platform, so can't use the Apple gamekit to do it). For 3 or 4 days now, i'm trying to get my head wrap around audio unit and remoteIO... I have overlooked tens of examples and such, but every time it is only applying a simple algorithm to the input PCM and play it back on the speaker. According to Apple's documentation in order to do VOIP we should use kAudioSessionCategory_PlayAndRecord. UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord; status = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory),

How do I connect an AudioFilePlayer AudioUnit to a 3DMixer?

时光毁灭记忆、已成空白 提交于 2019-11-29 14:55:11
问题 I am trying to connect an AudioFilePlayer AudioUnit to an AU3DMixerEmbedded Audio Unit, but I'm having no success. Here's what I'm doing: create an AUGraph with NewAUGraph() Open the graph Initalize the graph Add 3 nodes: outputNode: kAudioUnitSubType_RemoteIO mixerNode: kAudioUnitSubType_AU3DMixerEmbedded filePlayerNode: kAudioUnitSubType_AudioFilePlayer Connect the nodes: filePlayerNode -> mixerNode mixerNode -> outputNode Configure the filePlayer Audio Unit to play the required file Start

ios audio unit remoteIO playback while recording

那年仲夏 提交于 2019-11-29 09:58:42
问题 I have been charged to add VOIP into an game (cross-platform, so can't use the Apple gamekit to do it). For 3 or 4 days now, i'm trying to get my head wrap around audio unit and remoteIO... I have overlooked tens of examples and such, but every time it is only applying a simple algorithm to the input PCM and play it back on the speaker. According to Apple's documentation in order to do VOIP we should use kAudioSessionCategory_PlayAndRecord. UInt32 audioCategory = kAudioSessionCategory