audiounit

AudioUnit + Opus codec = crackle issue

旧街凉风 提交于 2021-02-11 08:38:32
问题 I am creating a voip app for iOS in objective-c. Currently i am trying to create the audio part: recording the audio data from microphone, encoding with Opus, decoding, and then playing. For the recording and playing i use AudioUnit. Also i made a buffer implementation which allocates places of memory each with initially set size. There are three main methods: - setBufferSize - for setting buffer's sub allocated spaces. - writeDataToBuffer - for creating new space(if needed), and filling data

play the sound from mic using the AUGraph

余生颓废 提交于 2021-02-09 15:28:22
问题 when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInput(auGraph, remoteIONode, 1, remoteIONode, 0); someone help me? tks! 回答1: output is double channel, input is also double channel. i find that the data from mic is single

play the sound from mic using the AUGraph

寵の児 提交于 2021-02-09 15:24:41
问题 when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInput(auGraph, remoteIONode, 1, remoteIONode, 0); someone help me? tks! 回答1: output is double channel, input is also double channel. i find that the data from mic is single

iOS - AudioUnitRender returned error -10876 on device, but running fine in simulator

六月ゝ 毕业季﹏ 提交于 2021-02-09 11:10:59
问题 I encountered a problem which made me unable to capture input signal from microphone on the device (iPhone4). However, the code runs fine in the simulator. The code was originally adopted from Apple's MixerHostAudio class from MixerHost sample code. it runs fine both on device and in simulator before I started adding code for capturing mic input. Wondering if somebody could help me out. Thanks in advance! Here is my inputRenderCallback function which feeds signal into mixer input: static

iOS - AudioUnitRender returned error -10876 on device, but running fine in simulator

夙愿已清 提交于 2021-02-09 11:09:55
问题 I encountered a problem which made me unable to capture input signal from microphone on the device (iPhone4). However, the code runs fine in the simulator. The code was originally adopted from Apple's MixerHostAudio class from MixerHost sample code. it runs fine both on device and in simulator before I started adding code for capturing mic input. Wondering if somebody could help me out. Thanks in advance! Here is my inputRenderCallback function which feeds signal into mixer input: static

iPhone: Change playback speed with Audio Units

邮差的信 提交于 2021-02-05 13:01:53
问题 What are the different ways to change the playback speed of audio on the iPhone, when using Audio Units ? What are the advantages / disadvantages of each solution? I have a mixer unit and an IO unit. Do I need to add another unit (eg. converter unit)? What audio unit parameters should I set, on which (input or output) bus on which audio unit(s)? My current setup: ------------------------- ------------------------- | mixer unit | -----------> | IO unit | ------------------------- -------------

Varispeed Unit with AuGraph [iOS Swift]

。_饼干妹妹 提交于 2021-01-29 14:48:30
问题 We are trying to connect varispeed unit with output unit using AUGraph. This is our current code: var graph: AUGraph? var varispeedNode: AUNode = 0 var varispeedUnit: AudioUnit? var outputNode: AUNode = 0 var outputUnit: AudioUnit? init(_ client: UDPClient, _ tcpClient: TCPClient, _ opusHelper: OpusHelper, _ tvTemp: UILabel) { super.init() let success = initCircularBuffer(&circularBuffer, 4096) if success { print("Circular buffer init was successful") } else { print("Circular buffer init not

iOS: How to resample audio(PCM data) using Audio Unit at runtime?

隐身守侯 提交于 2020-07-02 07:48:28
问题 How can i resample audio(PCM data) using Audio Unit at runtime/live ? I have an Audio Unit setup as follows. - (void) setUpAudioUnit { OSStatus status; AudioComponentInstance audioUnit; AudioComponent inputComponent; AudioComponentDescription audioComponentDescription; AudioStreamBasicDescription audioStreamBasicDescription; // Describe audio component audioComponentDescription.componentType = kAudioUnitType_Output; audioComponentDescription.componentSubType = kAudioUnitSubType