Questions tagged [avaudioengine]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

How to process audio from the mic and play it back in real-time?

I'm working on an iOS app using the AVFoundation framework for real-time audio processing. The app captures audio from the microphone, takes each buffer, passes it to a function that returns a ...
Sotiris Kaniras's user avatar
1 vote
0 answers
16 views

AVAudioEngine vs AudioToolbox audio units

I want to build a DAW for macos and I am wondering what would be the best approach. Using AudioToolbox and core audio functionalities or AVAudioEngine? I am bit confused because I've seen that AUgraph ...
jumeca's user avatar
  • 21
0 votes
0 answers
16 views

AVAudioEngine detachNode Crashes with 'required condition is false' Error in Swift

I'm working on an audio processing application using Swift and encountering an issue with AVAudioEngine when I try to detach an AVAudioPlayerNode. My application is a call simulator that plays audio ...
eugene_prg's user avatar
0 votes
0 answers
13 views

Can AVAudioPlayerNode make a one-to-many connetion

i try to mix the user mic and an AVAudioPlayerNode, and writing it to a file. at same time, i want keep both individual stream to do something. i use below to make connections. by using this ...
Mozalic Hu's user avatar
0 votes
0 answers
43 views

Swift AVAudioEngine not working as in Apple Documentation

I am trying to build a simple mp3 player using AVAudioEngine. I made one using AVAudioPlayer and it worked fine (eventually). I now need to move up to AVAudioEngine to give more functionality and I ...
Andy Z's user avatar
  • 11
0 votes
0 answers
49 views

Play AudioBuffer in AVAudioEngine

recently i encountered glitch sound when playing buffer with AURenderCallbackStruct. Therefore, i am trying another way to play the buffer. Is there any method to play AudioBuffer with AVAudioEngine? ...
WCY's user avatar
  • 23
0 votes
0 answers
13 views

AVAudioEngine playing audio on simulator - but not on physical Apple Watch

Given a class that plays a file named "WoodClaves.aif" repeatedly based on a given BPM value. import Foundation import SwiftUI import AVFoundation class MetronomTimerModel: ObservableObject ...
Womble Tristes's user avatar
0 votes
0 answers
87 views

Playing sound through AvAudioEngine in a .NET Maui calling app

My team and I are rewriting an app into .net Maui, in which it is possible to make phone calls using voip/softphone. Our old way of handling the in-call sound, resulted in some echo-problems when ...
Ruku92's user avatar
  • 1
0 votes
1 answer
47 views

Get name or ID of current audio output using swift

My application allows the user to select which Audio Output device is being used to play sound. I can’t find or figure out how to get the current Audio Output device being used by the system. Im using ...
33333's user avatar
  • 78
0 votes
0 answers
31 views

Is it possible to perform audio processing using AVAudioEngine on the audio being played while screen recording with ScreenCapturekit

My requirement is that, when you start recording using screencapturekit framework, I want to perform some modifications on the audio being played and then play the modified audio(say apply pitch ...
Babitha shetty k's user avatar
0 votes
0 answers
20 views

Detect and count noises while recording

I am trying to write an app that would detect when loud noise (i.e clap) has happened, via microphone, and how many noises have actually happen while recording users microphone. This is the code that ...
Jon Doe's user avatar
  • 113
0 votes
0 answers
23 views

AVAudioPlayerNode skip play with scheduleFile (not scheduleSegment)

I have a situation where I need to schedule multiple files in sequence. I do that by calling scheduleFile multiple times: let node = AVAudioPlayerNode() node.scheduleFile(theAudioFile1!, at: nil) ...
zak's user avatar
  • 83
0 votes
0 answers
41 views

swift - how to get audio output from mic on iphone at 8khz sample rate with buffer size of 16ms & 1 channel?

For a demo app on iphone, I want to get audio output from mic at 8khz, buffer size of 16ms so that it gives 128bytes of framelength at a time. I've tried this AVAudioEngine by installing a tap on the ...
ecyoj's user avatar
  • 1
0 votes
0 answers
36 views

AVAudioEngine: adding low pass filter on a song not working

In my iOS app, i need to filter low pass and high pass frequencies For that I am trying to play simple song from my bundle and applying filters using AVAudioengine and AVAudioUnitEQ Below is the code, ...
Arpit B Parekh's user avatar
0 votes
0 answers
21 views

how to diagnose a crash report in SKAudioNode

Can anyone help explain the below crash report? It happens rarely, and it's from a remote user so I don't have access to console output. I can't reproduce the bug. It appears to happen at SKAction....
Fault's user avatar
  • 1,148
0 votes
1 answer
74 views

AVAudioEngine correct way to disconnect nodes

I am confused by disconnect API of AVAudioEngine. I have the following code: engine.connect(engine.inputNode, to: engine.mainMixerNode, format: nil) I now need to disconnect these two nodes. What is ...
Deepak Sharma's user avatar
2 votes
0 answers
54 views

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 ...
granpaJones's user avatar
1 vote
1 answer
76 views

AVAudioEngine Cannot Create AVAudioFile from URL

I cannot seem to create an AVAudioFile from a URL to be played in an AVAudioEngine. Here is my complete code, following Apple's documentation. import UIKit import AVKit import AVFoundation class ...
Jacob Cavin's user avatar
  • 2,209
0 votes
2 answers
134 views

How do I play an mp3 from the file system on Xamarin Forms iOS?

I'm writing an app which plays an mp3 file. In Android this is straight forward: Use Xamarin.Essentials.FilePicker to pick the mp3 filepath Use Android.Media.MediaPlayer to play the mp3 filepath I ...
jho's user avatar
  • 197
0 votes
0 answers
96 views

How do I transcribe a big audio file in iOS app?

I've successfully used SFSpeechRecognizer to transcribe small audio files. But I want to transcribe speech to text from 30-minutes audio-file. I've come up with this solution, but it doesn't work at ...
MarK's user avatar
  • 179
2 votes
0 answers
118 views

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, ...
Dhruvi's user avatar
  • 21
1 vote
1 answer
444 views

Change Audio input programmatically doesn't change Audio engine input AVFoundation

I'm trying to change the audio input (microphone) between all the available devices from AVAudioSession.sharedInstance().availableInputs. I'm using AVAudioSession.routeChangeNotification to get ...
ajw's user avatar
  • 2,578
0 votes
1 answer
32 views

What is the best approach for rapid sound playback on iOS?

I have a UI that allows someone to move a dial and the dial 'snaps' to each 'mark' on the dial. I want to add sound to this and I've made a very short 'click' sound that is a fraction of a second. I ...
iOSProgrammingIsFun's user avatar
1 vote
1 answer
283 views

How to correctly handle when my app wants to play audio while another app (e.g. Apple Music app) is already playing audio?

Edit: From what I found out, starting the AVAudioEngine back up is causing the hang for 3 seconds after I enter back into my app and press the play button. I am building a music player app with ...
SwiftEnthusiast's user avatar
0 votes
0 answers
16 views

I want to give an input file, output a reverberation effects of files, but renderOffline:toBuffer always AVAudioEngineManualRenderingStatusError

I want to give an input file, output a reverberation effects of files, but renderOffline: always AVAudioEngineManualRenderingStatusError toBuffer method return status, how can I write to achieve ...
Jia he's user avatar
  • 1
0 votes
1 answer
35 views

AVAudioNode gets deallocated immediately

I can not create and attach AVAudioNode to AVAudioEngine as it gets deallocated immediately. I've created a subclass of AVAudioNode, added deinit and during debug it was triggered immediately. I've ...
Kakhi Kiknadze's user avatar
0 votes
1 answer
37 views

Accessing some of AVAudioEngine properties or methods causing a memory leak in Xcode Instruments

I'm not sure wether AVAudioEngine is internally causing some memory leaks or it is a bug of Xcode Instruments but I had a strange case where I was seeing memory leaks after launching the app. Finally ...
Kakhi Kiknadze's user avatar
0 votes
1 answer
49 views

how to save and share the proccessed audio in swift?

I'm trying to modify an iOS app that takes audio via text to speech and applies pitch and rate changes to it, and then allows the user to save and share the processed audio. The recording and ...
Sanjug Sonowal's user avatar
0 votes
0 answers
52 views

"Performing Offline Audio Processing" example using AVAudioEngine to process to a .wav file does not work

For context, I have been following along on Apple's documentation at. You can download the code there to reproduce this problem. https://developer.apple.com/documentation/avfaudio/audio_engine/...
Anthony Dito's user avatar
  • 3,620
0 votes
0 answers
36 views

AVAudioSinkNode causes the audio to get distorted when using effects

For some reason all audio effects used upstream of a sinknode cause distorted audio. I'm using AudioKit for my audio setup. I would like to use a AVAudioSinkNode to record audio to a file and create a ...
Rene's user avatar
  • 111
2 votes
0 answers
59 views

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 ...
Andi Wagner's user avatar
0 votes
0 answers
79 views

Unknown error when appending AVAssetWriterInput

I'm trying to convert AVAudioPCMBuffer I got from AVAudioNode's tap block into CMSampleBuffer to append audio input of AVAssetWriter. I'm also creating a new sample buffer with the correct timing - ...
Kakhi Kiknadze's user avatar
1 vote
1 answer
691 views

AVAudioSession_iOS.mm:2382 Failed to set category, error: -50 when category set to .record

do { // Activate the session. audioSession = AVAudioSession.sharedInstance() guard let audioSession = audioSession else { return } try audioSession.setActive(false) ...
erotsppa's user avatar
  • 14.5k
0 votes
1 answer
197 views

Installing the BASS audio library into a Swift Xcode Project (Mac & iOS)

There is a BASS audio library (written in C) from un4seen.com that, in my experience, has much better performance and efficiency than AVAudioEngine. However, I have experienced great difficulty in ...
KeithB's user avatar
  • 462
2 votes
2 answers
381 views

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 ...
Kakhi Kiknadze's user avatar
0 votes
0 answers
31 views

How to give a audio file as a input and perform a filter get the output in a audio file using audio kit?

I am trying to implement a low pass filter to a audio file and get the input as a audio file using audio kit I have tried with live audio from and with that I'm only getting the data using a data ...
PIKakNIGHT's user avatar
-1 votes
1 answer
48 views

In watchos, Can we implement the action when the screen is covered with hand?

In watchos we can back to clock(homescreen) by two way. click dial cover screen with hand My app record audio with avaudioengine. But when i try to back to clock by two way written above. App didn't ...
용근유's user avatar
0 votes
1 answer
104 views

AudioKit in combination with an AVAudioSinkNode

I'm trying to use an AVAudioSinkNode in combination with AudioKit. In the code below this is the flow: Input > Fader > Output. While the SinkNode gets attached to the Fader. The SinkNode works ...
Rene's user avatar
  • 111
0 votes
0 answers
102 views

Xamarin.Ios. AVAudioEngine. The operation couldn’t be completed. (com.apple.coreaudio.avfaudio error -10851.)'

When developing an application in Xamarin.Forms, I had a problem. On ios 12, when trying to start AVAudioEngine, the application crashes with an error (com.apple.coreaudio.avfaudio error -10851.). The ...
Kazus's user avatar
  • 39
1 vote
3 answers
396 views

AVAudioPlayerNode causing distortion

I have an AVAudioPlayerNode attached to an AVAudioEngine. Sample buffers are provided to playerNode via the scheduleBuffer() method. However, it seems like playerNode is distorting the audio. Rather ...
Hundley's user avatar
  • 3,267
0 votes
0 answers
187 views

Playing beep sound using AVAudioEngine in SwiftUI

I am new to SWift and have tried to play beep sound with fixed frequency, say 600Hz. That's it. Any suggestion is welcome. Here is an example using AVFoundation I tried, but it plays no sound. I ...
user112002's user avatar
0 votes
0 answers
111 views

Selecting USB connected iphone as audio output for Mac

I am trying to build a project that will allow me to use an iphone USB connected to a Mac as an audio output device. There are options to do this wirelessly like "AirFoil" but they all ...
dassoop's user avatar
  • 11
1 vote
0 answers
79 views

Swift AVAudioUnitReverb's bypass property works incorrectly

Looks like bypass property for AVAudioUnitReverb works incorrectly. If AVAudioUnitReverb.bypass is set to true - it's switch off whole graph and no sound produced from the engine's output node. It is ...
sergii.tsyban's user avatar
1 vote
0 answers
146 views

How to update MPNowPlayingInfoCenter/MPRemoteCommandCenter play/pause controls with AVAudioPlayerNode?

I am making a simple music player app that just plays audio using AVAudioEngine. When I pause the AVAudioPlayerNode, it does not update the play/pause control of the MPNowPlayingInfoCenter/...
SwiftEnthusiast's user avatar
0 votes
0 answers
252 views

Built a very simple AVAudioEngine music player app. Resuming AVAudioEngine causing lag in the UI especially when resuming some time after pausing

Edit 2: When I don't pause the audio engine and just the player node and then resume the player node, there is no ui lag or anything at all. Smooth playback with no crackling. But I have to pause the ...
SwiftEnthusiast's user avatar
2 votes
0 answers
122 views

Crash on initialisation of microphone on iPhone Pro Max 14

I am seeing a new crash in Testflight on iPhone 14 Pro Max (iOS 16.1) devices, it seems to happen consistently and repeatedly on the anonymous user's device, although I haven't been able to get a ...
luko's user avatar
  • 43
3 votes
0 answers
229 views

iOS: Button Press on Bluetooth Headset not detected on playAndRecord category

I have an iOS application that uses an AVAudioSession of category playAndRecord and mode default to record and play audio from and to a Bluetooth headset. Now I want to for start and stop the ...
erksch's user avatar
  • 501
1 vote
0 answers
134 views

iOS crash: `com.apple.coreaudio.avfaudio: EXC_CRASH (SIGABRT): required condition is false: NULL != engine`

Our application uses speech recognition with .confirmation task hint. With the advent of iOS 16, the app starts crashing with com.apple.coreaudio.avfaudio: EXC_CRASH (SIGABRT): required condition is ...
Pavlo's user avatar
  • 11
1 vote
0 answers
152 views

How to play microphone audio through non default output speaker in MacOS?

I want to listen to the microphone audio through an output device which is not set as default device in system preference in MacOS. Ex: In system preference default output device is Macbook pro ...
yeasir arafat shahed's user avatar
0 votes
0 answers
141 views

file unit callback shows stereo channels in buffer, but the file loaded was 6 channel

We are trying to play an 5.1 (6 channels) AAC audio file using AUGraph. We also tried using AVAudioEngine. We have connected to 5.1 surround sound output device (Sony Speakers). The file is played as ...
Babitha shetty k's user avatar

1
2 3 4 5
11