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
2
votes
0 answers

Audio buffer access to downloaded encrypted HLS audio stream

If I use AVAssetDownloadTask to download an encrypted audio-only HLS stream, is it possible to get access to the raw audio data, for the purposes of integrating with AVAudioEngine, AVAudioPlayerNode, and associated effects? If so, what's the process…
John Scalo
  • 3,194
  • 1
  • 27
  • 35
2
votes
1 answer

AVAudioEngine positional audio not working with .playAndRecord audio session category when using bluetooth headphones

I want to be able to record audio and play back positional audio at the same time. To do this I need to use the .playAndRecord audio session category, and simultaneous recording and playback works. However, using this category the audio file is…
Jez
  • 476
  • 4
  • 13
2
votes
0 answers

AUAudioUnit hosting

Sorry that this question is a bit vague but that's the problem, I've been pretty much shooting in the dark due to being unable to find ANY information on this specific area. I'm hosting AUAudioUnits on OSX. That all works fine. I can find em, load…
Obmit
  • 21
  • 1
2
votes
1 answer

AVAudioPlayerNode completion callbacks not called for files scheduled consecutively

When scheduling files or buffers with AVAudioPlayerNode, you can submit a completion callback. You can also specify for what event the callback should be called, the options being: dataConsumed dataRendered dataPlayedBack In most cases, this works…
scg
  • 449
  • 1
  • 3
  • 11
2
votes
1 answer

Writing Buffer from AVAudioNodeTap to AVAudioFile (Save audio recording from AVAudioEngine)

I am using AVAudioEngine to monitor microphone input. After the AudioEngine stops I would like to save the audio received into an AVAudioFile for future use. This is my current implementation, and the file does contain data. It is a wav file, but it…
Michael Jajou
  • 312
  • 2
  • 13
2
votes
1 answer

Record audio from AirPod Pros at higher sample rate than 16kHz

Is it possible to record audio through the microphone of AirPod Pros at a sample rate higher than 16kHz? I'm tapping into the microphone bus using audioEngine: let node = audioEngine.inputNode let recordingFormat = node.outputFormat(forBus:…
2
votes
1 answer

Routing AVPlayer audio output to AVAudioEngine

Due to the richness and complexity of my app's audio content, I am using AVAudioEngine to manage all audio across the app. I am converting every audio source to be represented as a node in my AVAudioEngine graph. For example, instead using…
Winston Du
  • 340
  • 2
  • 9
2
votes
1 answer

MacOSX Console Application to slow or speedup speech without losing quality

I have a .mp3 file that contains just voice and I would like to adjust the speed (slower or faster) while maintaining the same clarity. No chipmunks! Then write out the modified file to disk. In order to do this, I am trying to use the AVAudioEngine…
Joel Parker
  • 295
  • 1
  • 4
  • 17
2
votes
1 answer

AVAudioSinkNode Giving No Signal

Context: I'm trying to make a real-time audio chat. I've been playing around with AVAudioSinkNode all week so I can record audio, however for some reason whenever I try it, the audioBufferList is always filled with zeros. Right now I'm testing it in…
Noah Z
  • 23
  • 6
2
votes
1 answer

Tap audio output using AVAudioEngine

I'm trying install a tap on the output audio that is played on my app. I have no issue catching buffer from microphone input, but when it comes to catch sound that it goes trough the speaker or the earpiece or whatever the output device is, it does…
BoilingLime
  • 2,207
  • 3
  • 22
  • 37
2
votes
0 answers

AVAudioEngine gives seemingly random errors in different environments

I am trying to write a MIDIPlayer class which is a wrapper for an AVAudioEngine and an AVAudioUnitMIDIInstrument. I have written a loop that gets the names and ASBDs for all AudioComponents of type MusicDevice and then chooses the most desired unit…
MassMover
  • 529
  • 2
  • 17
2
votes
0 answers

AVAudioEngine and Voice Processing Unit MacOS

I am trying to build a very simple test for receiving input audio using AVAudioEngine in which the input node has the voice processing enabled on MacOS. I've seen examples for iOS, which make use of AVAudioSession, which is not available in MacOS. …
Jon2718
  • 81
  • 2
2
votes
1 answer

Observing System Volume Changes OSX - Swift

I'm trying to execute a method when the system volume changes. I've tried using DistributedNotificationCenter.default().addObserver(self,selector: #selector(volumeChanged(_:)),name: NSNotification.Name(rawValue:…
AlexPera
  • 366
  • 5
  • 12
2
votes
1 answer

Using avaudioengine for iOS breaks avplayer

I'm having an issue while trying to use both AVAudioPlayer and AVAudioEngine in my app. I'm using AVAudioPlayer to play remote audio files and audio live streams. I'm using AVAudioEngine to capture sound of a microphone and transcribe it. However…
2
votes
0 answers

Using multiple AVAudioSequencer with one or more AVAudioUnitSampler

Context: I am trying to play multiple MIDI sequences in an iOS app using AVFoundation. The tracks are loaded in MIDI files and I have successfully managed to play them one by one if I load them in a AVAudioSequencer. I also have an…
Endanke
  • 867
  • 13
  • 24