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

AVAudioPCMBuffer built programmatically, not playing back in stereo

I'm trying to fill an AVAudioPCMBuffer programmatically in Swift to build a metronome. This is the first real app I'm trying to build, so it's also my first audio app. Right now I'm experimenting with different frameworks and methods of getting the…
3
votes
1 answer

Passing mono audio data to AVAudioEnvironmentNode

I am attempting to use an AVAudioEnvironmentNode to produce 3D spatialized sound for a game I'm working on. The AVAudioEnvironmentNode documentation states, "It is important to note that only inputs with a mono channel connection format to the…
3
votes
1 answer

AVAudioFile from memory?

I'm playing around with AVAudioFile and AVAudioPlayerNode. I have implemented a custom streaming protocol that receives audio chunks and handles all the buffering part, however I haven't been able to play the the first chunk without using the…
Matías Insaurralde
  • 1,202
  • 10
  • 23
3
votes
0 answers

how to create AVAudioPCMBuffer from NSData

I receive mp3 from stream and convert pcm data. I try to use AVAudioEngine but can not create AVAudioPCMBuffer without file. - (void)playAudio:(NSNotification *)notification { self.runAudioThread = YES; dispatch_queue_t…
3
votes
0 answers

iOS : AVAudioEngine not starting after sleep

We have a problem with the AVEngine that we reproduce only on iPhone 6S plus device. It is fine with other devices we have such as iPhone5s, iPhone6, iPad... We use AVEngine to do audio capture with tap node on the input node. We noticed that sleep…
loic
  • 51
  • 5
3
votes
0 answers

How To Install Tap On AudioEngine OutputNode

I am trying to save processed audio from AudioEngine OutputNode To AVAudioFile. Well Till Now What I Know Is That It Can Be Done Using Tap But Dont know how. I Would Like To Know To How Install Tap On AudioEngine OutputNode.
Mihir Gurjar
  • 375
  • 1
  • 7
3
votes
0 answers

How to remove silence from an audioFile

I have recorded an audio file using AVAudioEngine: [mainMixer installTapOnBus:0 bufferSize:4096 format:[mainMixer outputFormatForBus:0] block:^(AVAudioPCMBuffer *buffer, AVAudioTime *when) { NSError *error; // as AVAudioPCMBuffer's are…
Thomas
  • 177
  • 2
  • 9
3
votes
2 answers

Swift: required condition is false: file != nil

The app runs fine but as soon as I tap chipmunkButton the app crashes and provides the following error: ERROR: AVAudioPlayerNode.mm:678: -[AVAudioPlayerNode scheduleFile:atTime:completionHandler:]: required condition is false: file != nil…
Perceptum
  • 43
  • 1
  • 4
3
votes
1 answer

How to install a tap on the default inputNode of AudioEngine and write to file

I'm trying to do something really simple, but I've only made progress in fits and starts. I only want to get audio data from a microphone into a file, for now. I'll do more processing of the data in the block once I get over this hurdle. I'm…
mahboudz
  • 39,196
  • 16
  • 97
  • 124
3
votes
1 answer

Connect AVAudioInputNode to AVAudioUnitEffect using AVAudioEngine

I want to process the audio from my device's built-in microphone (AVAudioInputNode) with an audio unit effect (AVAudioUnitEffect). For my example, I'm using AVAudioUnitReverb. Connecting AVAudioUnitReverb is causing the application to crash. import…
JWK
  • 3,345
  • 2
  • 19
  • 27
2
votes
0 answers

AVAudioEngine input on Mac, disrupting low priority sounds

I am analysing sounds by tapping the mic on the Mac and printing the identified sound out. All is working well, but it disrupts other (what I assume) are low priority sounds e.g. interface sounds like dragging an item off the dock, sending a message…
2
votes
0 answers

Playing raw audio data stream coming from BLE

I'm Developing an iOS application. In that I'm receiving raw data stream from BLE I'm using AVAudioEngine with buffers let format = AVAudioFormat(commonFormat: AVAudioCommonFormat.pcmFormatInt16, sampleRate: 8000.0, channels: 1, interleaved:…
Dhruvi
  • 21
  • 3
2
votes
0 answers

How to disallow audio spatialization for my iOS app?

I'm working on an App that creates an immersive audio experience using mono points sources (AVAudio3DMixingSourceMode.pointSource) connected to an AVAudioEnvironmentNode. I use AVAudio3DMixingRenderingAlgorithm.HRTFHQ for the sources and a…
2
votes
2 answers

Choose specific input channel as a mono input from USB device in AVAudioSession/AVAudioEngine

I'm working on an audio recording app which uses an external USB Audio interface (e.g, Focusrite Scarlett Solo) connected to an iPhone. When I run AVAudioSession.sharedInstance().currentRoute.inputs it returns the interface correctly. 1 element -…
2
votes
0 answers

AVAudioEngine exception - required condition is false format.sampleRate == hwFormat.sampleRate

I see in Crashlytics few users are getting this exception when connecting the inputNode to mainMixerNode in AVAudioEngine: Fatal Exception: com.apple.coreaudio.avfaudio required condition is false: format.sampleRate ==…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131