Questions tagged [core-audio]
Core Audio is a low-level API for dealing with sound in Apple's macOS and iOS operating systems.
2,483
questions
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 ...
0
votes
0
answers
138
views
CAReportingClient.mm:532 Attempted to remove a reporter not created by this client
After I've updated my iPhone to iOS 17 I started seeing a message being printed in Xcode. In bursts of a few or once every seconds.
I'm listening to CLLocationManager updates but don't do much with it ...
1
vote
0
answers
30
views
How to use macOS audio work groups with an AudioServerPlugin
I have a USB driver for a soundcard that is built using DriverKit and a AudioServerPlugin that enables macOS to use the soundcard for audio input and output.
The AudioServerPlugin works fine using ...
0
votes
0
answers
110
views
CoreAudio simple mic input code cold not work
I make simple microphone input to tap operation program.
but engine.start() says
The operation couldn’t be completed. (com.apple.coreaudio.avfaudio error -10875.)
What am i wrong?
the code is
var ...
2
votes
2
answers
98
views
How do I output audio from multiple devices in CoreAudio?
Audio Midi Setup allows a single sound source to be output from multiple devices, but is there a way to do this in CoreAudio?
Could this be done by attaching the same playerNode to two AVAudioEngine? ...
0
votes
1
answer
36
views
I want to implement a volume level meter in CoreAudio using Swift
I have looked into using installTap in AVAudioNode, but how can I get the volume level in real time in installTap in?
player.installTap(onBus: 0, bufferSize: 1024, format: player.outputFormat(forBus: ...
3
votes
1
answer
102
views
Switching output audio device with CoreAudio in macOS
I have been using CoreAudio to switch the output device for audio output, but this technique is no longer available in macOS 13 Ventura.
How can I switch the output device in Ventura as well?
correct ...
1
vote
0
answers
18
views
Apple Allow Audio output Device programmatically handling?
I am trying to understand. Apple allow the Change Audio output device programmatically? Or Applye only allow input devices.
my applciation have the Video calling feature and now i want to seprate ...
2
votes
0
answers
49
views
AVAudioConverter's channelMap results in lower pitch
I'm using AVAudioConverter to convert audio between formats, and I've come across an issue where the pitch of my audio becomes lower under a specific condition.
Input format is uncompressed two ...
0
votes
0
answers
76
views
AVFAudio: AVAE_RaiseException(NSString*, ...) + 52
When I click on Start Recording button I want to append the conversation to a textView using the SpeechRecognizer functionality from Apple.
The problem is that my app crash sometimes and I don't know ...
0
votes
0
answers
21
views
Float data from AVAudioPCMBuffer is to small even when it clips on audio interface
I couldn’t really find information about this so I decided to ask the question here.
I’m getting the values from the float data. Double-checked in AudioKit and they’re doing the same thing and I’ve ...
0
votes
0
answers
39
views
How do I install CoreAudio on newer versions of macOS?
I need to install the CoreAudio driver for my project. I opened Apple website, opened this page and downloaded the archive. Then, when I tried to install it according to the instructions on this page, ...
0
votes
0
answers
28
views
Convert audio from iOS Broadcast Extension to be used with WebRTC
I have set up an iOS broadcast extension and audio data is coming in through processSampleBuffer as a CMSampleBuffer.
I am sending this data through a Websocket connection to a Pion WebRTC sink, ...
0
votes
1
answer
76
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 ...
1
vote
0
answers
155
views
macOS: Capture system audio and use it in Electron.js
I Know this is a complex topic it is not possible directly in Electron.js on macOS.
I am looking for any solution where I can achieve it is using a virtual device or a aggregate device but we should ...
0
votes
0
answers
26
views
Create AUv3 audio unit supporting multiple channels
Assuming I've got AVAudioInputNode with N channels (In the current example it's 4) I want to connect it to my custom AUv3 audio unit where I could manipulate them, how could I achieve that?
I've tried
...
1
vote
0
answers
44
views
Can't set bluetooth headset as default output device in OS X using CoreAudio API
I am having difficulty programmatically setting my Bluetooth headset (Apple Airpods) as the default audio output device on my OSX. I have attempted to use the CoreAudio API to set the device as ...
0
votes
2
answers
165
views
AVCaptureDevice.DiscoverySession().devices not returning any devices
I have the following Swift code:
let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInMicrophone, .externalUnknown], mediaType: .audio, position: .unspecified).devices
print("...
0
votes
0
answers
64
views
On Mac, Audio output is not working, Not a simple problem
So its already been months. this glitch stays for 20-30 days and then disappears automatically and suddenly it appears one day.
I spoke with Apple care genius and in the name of troubleshooting they ...
0
votes
0
answers
61
views
PortAudio distorted/clipped/poor sound output
I am trying to perform some basic IO within PortAudio. I currently select an audio output and then write some noise to that output via a stream and an outputCallback function. The issue is my audio ...
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 ...
1
vote
1
answer
136
views
How should I update my code to avoid these "function is deprecated" warnings when compiling my CoreAudio program?
I've got a MacOS/X program that uses CoreAudio to do sound output. It works fine, but whenever I compile it, the compiler emits the "XXX is deprecated" warnings shown below.
My question is, ...
0
votes
0
answers
108
views
Record and add audio effects at the same time in iOS with audio unit
I'm getting error -1 oostatus from AudioUnitRender in the following context.
The only major difference in my project is that I'm also using the Remote I/O unit for audio output. The audio output works ...
0
votes
0
answers
319
views
Integrating Voice Isolation with Speech Recognition in Swift
I'm trying to integrate voice isolation with speech recognition in Swift. My goal is to make IOS's built-in speech recognition have a better quality because we all know how inaccurate it can be, ...
0
votes
1
answer
467
views
How to get the list of input devices on MacOS using coreaudio?
I'm trying to get the list of audio devices in MacOS using core audio, but for whatever reason, I'm only able to get the output devices.
I'm doing a Swift UI project in XCode 13, and my code looks ...
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 ...
0
votes
0
answers
38
views
What is the most accurate way to get a repeated timed task?
I am porting an Android application to iOS that plays a sequence of notes in the midi protocol.
To do this on Android I open a thread, and inside I put a while loop that restarts whenever the number ...
1
vote
1
answer
112
views
MacOS custom Audio Driver doesn't process our hardware audio stream
We are developing a custom audio driver for a USB microphone in order to do simple processing (EQs) on the input audio stream (comparable to an APO for Windows). Our code is based on the ...
1
vote
1
answer
42
views
Pitch changes when playing a fixed-frequency sine wave in Apple CoreAudio
thanks for reading my question.
I was using Apple CoreAudio to render a simple sine wave at 440Hz in real time. For the first 128 seconds of rendering, I was able to hear a nice 440Hz sine wave. But ...
0
votes
0
answers
34
views
inNumberFrames of performRender becomes 1 in aurioTouch sample codes
aurioTouch sample codes runs OK on iOS15 devices, but on iOS16, inNumberFrames of performRender always becomes 1.
On iOS15, inNumberFrames is usually 512 or 1024. Sometimes smaller or bigger, but not ...
3
votes
1
answer
132
views
MacOS custom Audio Driver doesn't override the default Driver
We are developing a custom audio driver for a USB microphone in order to do simple processing (EQs) on the input audio stream (comparable to an APO for Windows).
After some help, we managed to assign ...
0
votes
0
answers
46
views
How to merge two Audio Units into AudioBufferList for AURenderCallback
Please see code below. All I want to, is to merge bufflist1 and bufflist2, then inset to ioData. But I don't know how.
OSStatus PlayCallback(void *inRefCon,
...
1
vote
0
answers
73
views
Test-Flight crash: AVFAudio: AVAE_RaiseException(NSString*, ...) + 52
I create a app which record audio and play in swift
everything work fine in my real device but put in test-flight to test with other device it crash.
Here my code in swift 5.5
'''
func startRecording()...
1
vote
1
answer
456
views
How to convert to AVAudioPCMBuffer from AudioBufferList?
i am struggling to convert it.
I made AudioBufferList data using AudioUnit with refer This.
And It has filled audio buffer data by AudioUnitRender().
var bufferList = AudioBufferList(
...
0
votes
1
answer
572
views
AVAudioPlayerNode.play() causes crash after backgrounding and foregrounding the app
I'm working on a watchOS app which plays sound using an AVAudioPlayerNode. Whenever I put the app in the background, open it back again and try to play sound, the app crashes with the following ...
1
vote
0
answers
34
views
How to check if any other App is using VoiceProcessingIO AU (macOS)
If a VOIP app is using VoiceProcessingIO AU, then other app (not use VoiceProcessingIO) will be suppressed to deliver it's sound.
Is there any kAudioProperty to get, for developer to check if current ...
0
votes
0
answers
129
views
Is there a way to record the audio output of a certain application on OSX programmatically?
Is there a way to record the audio output of a certain application(for example only record chrome while chrome is playing video and apple music is playing music) on OSX programmatically? Does it need ...
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 ...
3
votes
1
answer
416
views
AudioUnitRender error kAudioUnitErr_CannotDoInCurrentContext on iPhone 14 only
We have a communications application that has been out for over 8 years now on the IOS platform, and recently we have run into an issue on the new iPhone 14.
We are using the audio session category ...
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 ...
0
votes
0
answers
153
views
AudioBufferList with two Buffers
I am receiving this ABSD from CMSampleBuffer which comes from a broadcasting session from the ReplayKit in iOS.
mFormatID = kAudioFormatLinearPCM,
mFormatFlags = 14,
mChannelsPerFrame = 2,
...
1
vote
1
answer
388
views
Creating an audio driver for macOS with TensorFlow Lite C
Ok, so here it goes. For the past couple of days I've been struggling with this issue immensely. Basically, what I've done is I have created an audio driver for macOS that successfully routes audio to ...
3
votes
0
answers
320
views
CoreAudio deadlock when opening a device
Some JUCE users including me are running into an occasional deadlock when opening a CoreAudio device (it happens often enough to be a real problem).
What happens is that the main thread waits on a ...
2
votes
0
answers
309
views
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 ...
2
votes
0
answers
139
views
Cannot render audio with VoiceProcessingIO AudioUnit on Mac
I'm currently attempting to use the VoiceProcessingIO AudioUnit to passthrough audio from the mic to another input device. I am using an userspace audio driver that proxies audio from output to input. ...
4
votes
0
answers
310
views
AVAudioEngine crash when connecting inputNode to mainMixerNode
I have the following code to connect inputNode to mainMixerNode of AVAudioEngine:
public func setupAudioEngine() {
self.engine = AVAudioEngine()
let format = engine.inputNode....
1
vote
1
answer
95
views
How do I properly mix two AVAudioSourceNode objects (Signal Generators) into stereo output?
I'm attempting to take Apple's Building a Signal Generator sample code and augment it so that I can play a different frequency in my left ear of the stereo channel from my right ear in the stereo ...
1
vote
0
answers
193
views
Why enabling Voice Processing on AVAudioInputNode changes channels count on its format?
I've noticed that enabling voice processing on AVAudioInputNode change the node's format - most noticeably channel count.
let inputNode = avEngine.inputNode
print("Format #1: \(inputNode....
0
votes
1
answer
240
views
Windows Microphone session volume change using wasapi
I implemented to change microphone volume using wasapi.
https://learn.microsoft.com/en-us/windows/win32/api/_coreaudio/
The program will get default mic device, and initialize IAudioClient.
...
1
vote
0
answers
1k
views
Macbook M1 Monterey – USB Audio dropouts Core Audio
I am trying to solve my USB audio problems on 2022 M1 MacBook Pro 14" with 16GB RAM/latest Monterey connected to an external DAC via USB which results in irregular audio dropouts. Audio gets ...