Questions tagged [avaudioengine]

Use this tag when your question is about the AVAudioEngine class, which is part of the AVFoundation framework.

AVAudioEngine is part of the AVFoundation framework for Apple platforms. The class provides some of the more complex audio processing functionalities within the framework, by grouping together connected audio node objects that provide functionality for creating and processing audio signals and IO.

The AVAudioEngine API can be found here.

Related tags:

535 questions
4
votes
2 answers

Does AUGraph deprecation means no more audio render callbacks?

I have an app with an elaborated render callback that I doubt could do with AVAudioEngine. Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ? Any sample code ?
Fischer
  • 1,513
  • 4
  • 17
  • 38
4
votes
0 answers

Change encoder format version

I have, for the past week, been trying to take audio from the microphone (on iOS), down sample it and write that to a '.aac' file. I've finally gotten to point where it's almost working let inputNode = audioEngine.inputNode let inputFormat =…
MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
4
votes
2 answers

How to encode and decode Real-time Audio using OpusCodec in IOS?

I am working on a app which has following requirements : Record real time audio from iOS device (iPhone) Encode this audio data to Opus data and send it to server over WebSocket Decode received data to pcm again Play received audio from WebSocket…
Mohamed Farouk
  • 957
  • 1
  • 13
  • 29
4
votes
0 answers

How to use AvAudiounit features like low pass and time delay with AvAudioPlayer node

I'm using Apple's AudioEngine and I'm able to play sound by using AvAudioPlayerNode.The problem is when i try to add any feature such as low pass filter or even time delay, it is not affecting my player. How do I make these effects affect with…
Abraham
  • 41
  • 5
4
votes
0 answers

iOS Speech - audioEngine inputNode throws Mach message timeout error

I am playing with iOS's speech recognition and added microphone usage request in my Info.plist. On recording, the app displays a pop up for requesting access as expected MyApp would like to access the microphone However, if I wait more than a few…
NodeMaster
  • 85
  • 1
  • 5
4
votes
2 answers

Error when installing a tap on audio engine input node

whenever the code reaches inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) {[weak self] (buffer:AVAudioPCMBuffer, when:AVAudioTime), app is crashing with following error Terminating app due to uncaught exception…
mahdi
  • 439
  • 3
  • 15
4
votes
0 answers

Remove frequencies with AVAudioUnitEQ

I am trying to use AVAudioEngine to remove offline some frequencies from an audio file. I would like to keep only the frequencies between 100 and 150 hertz. In JavaScript I do: var lowpass = offlineContext.createBiquadFilter(); lowpass.type =…
Nuthinking
  • 1,211
  • 2
  • 13
  • 32
4
votes
1 answer

Play segment of AVAudioPCMBuffer

I'm creating this simple audio recorder and editor interface for an iOS app: The audio is recorded into a float array that is used to create the waveform. After recording I copy the float data into an AVAudioPCMBuffer for playing with…
torof
  • 368
  • 1
  • 12
4
votes
1 answer

How to get hardware sampleRate from iOS device?

In my app I'm using AVAudioEngine for speech recognition, but I'm having hard time understanding how to properly setup inputNode. I used this tutorial as an example for my code:…
Eugene Gordin
  • 4,047
  • 3
  • 47
  • 80
4
votes
2 answers

How to change audio pitch during playback? (Swift 4)

I'm looking to change the pitch and playback speed of some audio in real time with a slider, or a variable (i.e. while the sound is playing) in Xcode, Swift 4. Currently, I'm using AVAudioEngine, which allows me to set these values before playback…
will
  • 61
  • 1
  • 6
4
votes
1 answer

How do I create an AUAudioUnit that implements multiple audio units?

In Apple's docs for creating an AUAudio Unit (Here: https://developer.apple.com/documentation/audiotoolbox/auaudiounit/1387570-initwithcomponentdescription) they claim that A single audio unit subclass may implement multiple audio units—for…
Aurelius Prochazka
  • 4,510
  • 2
  • 11
  • 34
4
votes
1 answer

How to write an array of samples into a 24 bits audio file with AVAudioBuffer?

I'm having trouble writing wav files in 24bits with AVAudioEngine in swift. For my usage, my input is an array of Float. I have the audio format of the input file (retrieved with AVAudioFile). So, I need to convert my input Float array to a value…
NicoC
  • 65
  • 6
4
votes
1 answer

Read an AVAudioFile into a buffer starting at a certain time

Let's say I have an AVAudioFile with a duration of 10 seconds. I want to load that file into an AVAudioPCMBuffer but I only want to load the audio frames that come after a certain number of seconds/milliseconds or after a certain…
WongWray
  • 2,414
  • 1
  • 20
  • 25
4
votes
1 answer

Changing the volume of an SCNAudioPlayer in real time - Swift

I am trying to work out how I can changed the volume of an SCNAudioPlayer in real time. Currently, I have an SCNAudioSource connected to an SCNAudioPlayer. This audio player is then assigned to a SCNNode so that my sound makes use of SceneKits…
4
votes
1 answer

Accessing Float samples of AVAudioPCMBuffer for processing

I am trying to do some computation on the raw PCM samples of a mp3 files I'm playing with an AVAudioEngine graph. I have a closure every 44100 samples that provides an AVAudioPCMBuffer. It has a property channelData of type…
Alex Bollbach
  • 4,370
  • 9
  • 32
  • 80