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
0
votes
1 answer

Play an audio file using Swift for MacOS

I'm trying to simply play a file (in the main bundle or on the disk) using AVAudioFile, AVAudioEngine and AVAudioPlayerNode. Here is what I'm doing: import Foundation import AppKit import AudioToolbox import AVFoundation struct readFile { …
pm200107
  • 303
  • 1
  • 11
0
votes
1 answer

AudioUnit output buffer and input buffer

My question is what should I do when I use real-time time stretch? I understand that the change of rate will change the count of samples for output. For example, if I stretch audio with 2.0 coefficient, the output buffer is bigger (twice). So,…
0
votes
0 answers

IOS/Swift/AVFoundation: Crash on audioEngine.inputNode declaration inside guard statement

I am new to Swift and trying to implement the audioEngine for a microphone in order to record. At one point I declare the inputNode (microphone) with the statement: print("before input node") guard let inputNode = audioEngine.inputNode else { …
user6631314
  • 1,751
  • 1
  • 13
  • 44
0
votes
0 answers

AVAudioPlayerNode playAt() not synchronized

I have one main AVAudioPlayerNode that plays constantly. And there are other players that are put in the queue and play when the main player reaches a certain point. These AVAudioPlayerNode`s should be synchronized to a millisecond. Sometimes 4-10…
0
votes
1 answer

AVAudioEngine sound recording changes tonality

I have few AVAudioPlayerNodes for each sound user can play. Each player node is connected to its own AVAudioMixerNode to change volume. All of these mixers are connected to one AVAudioMixerNode (I named it soundsMixerNode) which is connected to the…
Valentin Shamardin
  • 3,569
  • 4
  • 34
  • 51
0
votes
1 answer

Swift: How can i record an audio and then play it in reverse

How can i record audio and then play it in reverse? in swift! There are some topics about that but they are too old and i can't figure out how. I'd really appreciate if someone could help me. I searched in AVAudioEngine and other frameworks and it…
0
votes
1 answer

Reset AVAudioEngine

I am creating a basic soundboard app. I have two switches. One that when activated will make the audio slower and lower pitch and one that makes it faster and higher. I have an if else if if statement that looks at those switches and then plays the…
Bruce A.
  • 33
  • 5
0
votes
1 answer

How to make SFSpeechRecongnizer Reusable for every UIViewControllers

Currently i'm working on speech to text for iOS 10 feature app. Here blow the code successfully return speech to text on my app. I need to implement this on several time (several viewController) My Question is Can someone explain how to do this as…
Pranavan SP
  • 1,785
  • 1
  • 17
  • 33
0
votes
0 answers

how to reduce input quality from mic in objective c?

I'm creating VoIP app. I want to reduce the size of the audio file with: AVAudioPCMFormatFloat32 formatted. when I recording audio with handsfree and compressed the leaner PCM is good and reduced size but when I record with main-mic compressor not…
ehsan
  • 91
  • 1
  • 5
0
votes
1 answer

Xcode throws Initializer for conditional binding using AVAudioInputNode

I'm finding my way around Xcode and tried to build a basic live transcription app using the guidance on Apple's developer website (link) The following line throws the error shown below: guard let inputNode = audioEngine.inputNode else {…
Justin 915
  • 11
  • 2
0
votes
2 answers

Error during AVAudioEngine prepare

I'm newbie to AVAudioEngine. My task is quite simple: I want to get sound from microphone, change it's pitch and save to file or just play result. self.engine = [[AVAudioEngine alloc] init]; self.pitchNode = [[AVAudioUnitTimePitch alloc]…
0
votes
1 answer

Swift AVAudioEngine AVAudioPCMBuffer to PowerLevel

I've been working on a project to create an application that displays the power level from the microphone. I'm aware of the AVAudioRecorder class what provides the average/peak power, but I want to be able only to record the power level for certain…
0
votes
0 answers

AVAudioUnitSampler loading delay issue in iOS 11 but not iOS 10

Running on iOS 10 I am able to load a sample from file into an AVAudioUnitSampler on demand and it plays correctly. However when I run the same code on iOS 11 the audio doesn't play. In order to get it to work I have to preload the audio. Has…
Andrew Sage
  • 111
  • 2
  • 6
0
votes
0 answers

How to read an AVAudioFile into the same AVAudioPCMBuffer multiple times?

EDIT: I was able to prevent readIntoBuffer from returning false by adding audioFileB.framePosition = 0; at the end of my for loop. However, now it looks like bufferB only contains audio from the final readIntoBuffer call (my incomplete loop). Does…
WongWray
  • 2,414
  • 1
  • 20
  • 25
0
votes
1 answer

How can I play multiple different audio files from same AVAudioEngine? (Error: !nodeimpl->HasEngineImpl())

In my app I want to play a different audio file every time a different cell in the table view is pressed. Below is my implementation but I keep receiving the error: Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason:…
D.Khan
  • 163
  • 3
  • 17