AudioUnit

RSS for tag

Create audio unit extensions and add sophisticated audio manipulation and processing capabilities to your app using AudioUnit.

Posts under AudioUnit tag

139 Posts

Post

Replies

Boosts

Views

Activity

Caching the view for an out-of-process audio unit
I'm writing a macOS audio unit hosting app using the AVAudioUnit and AUAudioUnit APIs. I'm trying to use the NSView cacheDisplay(in:to:) function to capture an image of a plugin's view: func viewToImage(veiwToCapture: NSView) -> NSImage? {     var image: NSImage? = nil     if let rep = veiwToCapture.bitmapImageRepForCachingDisplay(in: veiwToCapture.bounds) {       veiwToCapture.cacheDisplay(in: veiwToCapture.bounds, to: rep)       image = NSImage(size: veiwToCapture.bounds.size)       image!.addRepresentation(rep)     }     return image   } } This works ok when a plugin is instantiated using the .loadInProcess option. If the plugin is instantiated using the .loadOutOfProcess option the resulting bitmapImageRep is blank. I'd much rather be loading plugins out-of-process for the enhanced stability. Is there any trick I'm missing to be able to capture the contents of the NSView from an out-of-process audio unit?
1
0
1.9k
Apr ’22
Audio Unit hosting: Mysterious Error thrown when key presses dispatched: (Is anyone from Apple out there ?) ...
In our audio unit host, we're seeing the following error thrown when keypresses are dispatched to an audio unit view , does anyone know what it means and more importantly what might be causing it ? .... I can only guess that perhaps an object has been released or not retained properly somewhere but cannot find a solution. This is error message when caught in the debugger _Thread 1: "assertion failed: '<AUAudioUnitRemoteViewController: 0x600002b00c60> does not conform to AUAudioUnitViewControllerHostInterface' in -[NSRemoteView ensureClientExportedObject] on line 7080 of file /AppleInternal/Library/BuildRoots/66382bca-8bca-11ec-aade-6613bcf0e2ee/Library/Caches/com.apple.xbs/Sources/ViewBridge/NSRemoteView.m"
2
0
2.1k
Apr ’22
Unplug the headphones stop audio play and record
When i make a call within our VOIP application (ipadOS app on MacOS and M1 - MBP 16) all is fine. If i make a call with plugged in headphones - all is fine. If i unplug the headphones during the call - whole audio just stop working. If i hang up the call, make the call again - audio is there with no problems. On iPhone and iPad work correctly. Where can be a problem? HALC_ShellDevice::CreateIOContextDescription: failed to get a description from the server HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: 0x6E6F7065 HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: 0x6E6F7065 HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: 0x6E6F7065 AudioObjectGetPropertyDataSize: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 0 [auvp] AUVPAggregate.cpp:4413 Failed to get current tap stream physical format, err=2003332927 AudioObjectGetPropertyDataSize: no object with given ID 66 AudioObjectGetPropertyData: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 AudioObjectRemovePropertyListener: no object with given ID 66 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectGetPropertyDataSize: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 HALC_ProxySystem::GetObjectInfo: got an error from the server, Error: 560947818 (!obj) AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 HALC_ShellObject::HasProperty: there is no proxy object AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6912 error 2003332927 getting input sample rate AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6922 error 2003332927 getting input latency AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6932 error 2003332927 getting input safety offset AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6944 error 2003332927 getting tap stream input latency AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6954 error 2003332927 getting tap stream input safety offset AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6965 error 2003332927 getting output sample rate AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6975 error 2003332927 getting output latency AudioObjectHasProperty: no object with given ID 66 AudioDeviceDuck: no device with given ID [auvp] AUVPAggregate.cpp:6985 error 2003332927 getting output safety offset AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectsPublishedAndDied: no such owning object AudioObjectsPublishedAndDied: no such owning object AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6912 error 2003332927 getting input sample rate AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6922 error 2003332927 getting input latency AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6932 error 2003332927 getting input safety offset AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6944 error 2003332927 getting tap stream input latency AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6954 error 2003332927 getting tap stream input safety offset AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6965 error 2003332927 getting output sample rate AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6975 error 2003332927 getting output latency AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6985 error 2003332927 getting output safety offset AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectPropertiesChanged: no such object [auvp] AUVPAggregate.cpp:2799 AggCompChanged wait failed AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectSetPropertyData: no object with given ID 73 [auvp] AUVPUtilities.cpp:472 SetDeviceMuteState(73) false: (err=560947818) AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPUtilities.cpp:560 SetCFNumberValueForKeyInDescriptionDictionary(73); doesn't support 'cdes' AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectGetPropertyDataSize: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPUtilities.cpp:560 SetCFNumberValueForKeyInDescriptionDictionary(66); doesn't support 'cdes' AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:3523 VP block error num input channels is unexpected (err=-66784) [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo HALC_ProxySystem::GetObjectInfo: got an error from the server, Error: 560947818 (!obj) HALC_ShellDevice::RebuildStreamLists: there is no device [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo
0
1
1.7k
Apr ’22
why AudioComponentInstanceNew return -1
AudioComponentDescription desc = {kAudioUnitType_Output, kAudioUnitSubType_VoiceProcessingIO, kAudioUnitManufacturer_Apple, 0, 0}; AudioComponent comp = AudioComponentFindNext(NULL, &desc); OSStatus error = AudioComponentInstanceNew(comp, &myAudioUnit);   In special case the returned error value is -1, I searched the https://www.osstatus.com/, but didn't get relevent info. my question is: what's the meanning of -1 in the case ? myAudioUnit is a nullptr this time ?
0
0
1.2k
Mar ’22
Logic Pro input monitoring noise
Hi, I've developed a AU plugin which has an issue when input monitoring is turned on. The output is noisy when my plugin is processing audio and the input monitoring on. There is no noise with if either one of these is turned off. Any idea what changes in Logic when input monitoring is turned on which might have an effect on an AU plugin?
0
0
743
Mar ’22
How do you add a Audio Player to Xcode?
How can you add a live audio player to Xcode where they will have a interactive UI to control the audio and they will be able to exit out of the app and or turn their device off and it will keep playing? Is their a framework or API that will work for this? Thanks! Really need help with this…. 🤩 I have looked everywhere and haven’t found something that works….
0
0
1.5k
Mar ’22
MIDI processor passthru AudioUnit doesn't receive MIDI events
I'm trying to create a simple pure MIDI Audio Unit (AUv3) that could act as a pipe between for example an AVMusicTrack (played by an AVAudioSequencer) and an AVAudioUnitSampler. I used the default audio extension template generated by XCode 13.2.1 and modified just a few things: My audio unit has type kAudioUnitType_MIDIProcessor (aumi), from what I read it's the right candidate and the only one I can connect to a sampler. Else the app will crash with the Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: graphNodeSrc->IsMIDIProcessorNode() message. Maybe I'm missing something here, any suggestion? I overrode handleMIDIEvent() function in my AU's DSP Kernel just to print something when I receive MIDI events: void handleMIDIEvent(const AUMIDIEvent &midiEvent) override { cout << "MIDI Event" << endl; } I declared a MIDIOutputNames properly My goal is to follow the MIDI playing context from this AU, and edit some note messages depending on the context. My host provides AUMIDIOutputEventBlock, AUHostTransportStateBlock and AUHostMusicalContextBlock so that the AU can read the state and context and output MIDI to the host. If I make my AU a kAudioUnitType_MusicDevice (aumu), I do receive note events from the music track (even if I cannot connect my AU to the sampler as it's not a MIDI processor). But with a MIDI processor, I don't. Any clue why this is?
0
0
1.5k
Mar ’22
The audio unit of kAudioUnitSubType_VoiceProcessingIO can't query Audio Workgroup
I know the VoiceProcessingIO audio unit will create a aggregate audio device. But there are error kAudioUnitErr_InvalidProperty (-10789) during getting kAudioOutputUnitProperty_OSWorkgroup property in recent macOS Monterey 12.2.1 or BigSur 11.6.4. os_workgroup_t workgroup = NULL; UInt32  sSize; OSStatus sStatus; sSize = sizeof(os_workgroup_t); sStatus = AudioUnitGetProperty(mAudioUnit, kAudioOutputUnitProperty_OSWorkgroup, kAudioUnitScope_Global, 1, &workgroup, &sSize); if (sStatus != noErr) { NSLog(@"Error %d", sStatus); } And the same code works fine on iOS 15.3.1 but not macOS. Have you any hint to resolve this issue?
0
0
1.4k
Mar ’22
Explaining MALLOC_NANO
Could someone explain what 'MALLOC_NANO' is? A snippet from the crash report this was contained in is here: Crashed Thread: 50 myThread 0x1722ac000 - 0x17244ffff Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000600015c9e340 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Bus error: 10 Termination Reason: Namespace SIGNAL, Code 0xa Terminating Process: exc handler [35195] VM Regions Near 0x600015c9e340: MALLOC_NANO 600008000000-600010000000 [128.0M] rw-/rwx SM=PRV --> MALLOC_NANO 600010000000-600018000000 [128.0M] rw-/rwx SM=SHM MALLOC_NANO 600018000000-600020000000 [128.0M] rw-/rwx SM=PRV I'm guessing the root cause for this crash is using a deallocated object but I'd really like to just know more about MALLOC_NANO as I couldn't find much information elsewhere. Much appreciated!
0
0
1.3k
Feb ’22
Change AudioUnit from VPIO to RemoteIO occurs the volume was reduced (iOS 14 only)
When I change audio unit from VPIO(VoiceProcessingIO) to remoteIO, the volume was reduced and can not restore to normal level. There's a workaround by this post: h ttps://trac.pjsip.org/repos/ticket/1697 I use the workaround in my code and according flowing steps: stop and destory all the running IO AudioUnit (remoteIO and VPIO) run workaround code [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryRecord error:nil]; [[AVAudioSession sharedInstance] setActive:NO error:nil]; [[AVAudioSession sharedInstance] setActive:YES error:nil]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; 3. setup remoteIO and run. and it work perfectly! The volume of remoteIO was go to normally. But sadness happens on iOS 14, the workaround is not work at all.
1
0
2.4k
Feb ’22
Audio Unit callback freezes when connecting bluetooth device
Hi, Not sure if this is by design or not, but whenever I connect a Bluetooth device to the app the AU callback stops producing frames for several seconds until the device is connected. I'm building a recording app that uses AVAssetWriter with fragmented segments (HLS buffers). When the callback freezes it suppose to create a gap in the audio but for some reason, the segment that is created does not contain an audio gap, and the audio just "jumps" in timestamps.
0
0
913
Jan ’22
Parameter string on an Audio Unit
I have an audio unit that I can retrieve parameters and save those parameters in Logic Pro X. The values are boolean, float and integer. What I want to do is be able to save a string value, just like what Logic Pro X is doing with thier MIDI-FX plugin Scripter. Is this possible?
0
0
626
Jan ’22
internalRenderBlock sometimes not called for MIDI FX plugins in Logic Pro
Hi, I've released an open-source AUv3 MIDI processor plugin for iOS and macOS that records and plays MIDI messages in a sample accurate fashion and doesn't ever apply any quantization. I've tested this plugin with 120 beta testers and everything seemed to work fine. However, now that I've released it, there seems to be a problem in Logic Pro X on some Mac computers with MIDI FX processor plugins that are using Catalyst. You can find my plugin here: http://uwyn.com/mtr/ ... and the source code here: https://github.com/gbevin/MIDITapeRecorder When I trace the AUv3 instantiation, I see Logic Pro X obtaining the internalRenderBlock several times, but then never ever calling it. This means there's no render callback and there's never any MIDI parameter events received. I've talked to the developer of ZOA, which is also a MIDI processor plugin using Catalyst and he's running into exactly the same problem: https://www.audiosymmetric.com/zoa.html Another developer that’s working on a MIDI processor plugin has been trying to track this down for weeks also. When I test this on my M1 Max MacBook Pro, is always internalRenderBlock, however an my M1 MacBook Air and Intel 2019 MacBook Pro, it is never called. Any thoughts or ideas to work around this would be really helpful. Thanks!
1
0
1.5k
Jan ’22
AU host crashes in IOThread in macOS 11 and later
Hi, I've problem with an AU host (based on Audio Toolbox/Core Audio, not AVFoundation) when running on macOS 11 or later and Apple Silicon – it crashes after some operations in GUI. The weird is, it crashes in IOThread. Could this be caused by some inappropriate operation in GUI (eg. outside the main thread) that effects the IOThread? Sounds quite improbable to me. And I did not find anything suspicious in the code. There are two logs in the debugger: [AUHostingService Client] connection interrupted. rt_sender::signal_wait failed: 89 ... And here is the crash log: Crash log: ... Thanks, Tomas
0
0
1.4k
Jan ’22
The output volume is abnormal when VPIO is switched to RemoteIO
The voice call in our game has such a usage scenario: when the player does not wear the headset or Bluetooth, we use the VPIO mode to turn on the microphone. On the contrary, the player wears the headset or Bluetooth, and the remoteIO mode is used to turn on the microphone. So we have a switch between VPIO and RemoteIO。When we only use RemoteIO (the player has been wearing headphones or Bluetooth since the game), the output volume does not change before and after the microphone is switched on. When we only use the VPIO mode (the player has not been wearing headphones or Bluetooth since the game), before and after turning on the microphone, the output volume will reduce a little (because turning on the microphone will cause the phone to enter the VPIO and the echo cancellation will be turned on), the performance of the output volume in the above two scenarios is normal。However, when we switched between VPIO and RemotoIO (the player didn’t wear headphones or Bluetooth at the beginning, and brought headphones or Bluetooth in the middle of the game), we encountered some problems: As long as I have used VPIO mode before RemotoIO mode, the output volume in RemoteIO mode after turning on the microphone will be the same as in VPIO mode (normally the output volume in RemoteIO should be greater than in VPIO mode), turn off the microphone ,The output volume will become normal.What confuses me is: My understanding is that when we use RemoteIO, the mobile phone should not do some suppression-like speech algorithms, so when we only use RemoteIO, the output volume of the mobile phone does not change. When we use VPIO, the mobile phone will use echo Algorithms, and perhaps dynamic compression and some gain algorithm processing. At this time, the output volume will be reduced to better handle the echo. This behavior is normal. However, when I switch between VPIO and RemotIO, I feel that when I use RemoteIO (VPIO resources are released), some of the previous VPIO algorithm processing is still reserved (may be dynamic compression or gain algorithm), which finally leads to the output volume under RemoteIO is the same as that under VPIO, and this only happens on all of IOS14, the previous version is normal (anytime you enter the remoteIO mode, the volume does not change). I want to know, For IOS14 this behavior (VPIO and RemoteIO switching causes the volume of RemoteIO to decrease) is normal? If it is not normal, how can we solve it?
1
0
1.7k
Nov ’21
Mac Catalyst + Audio Unit v3 plug-in not working as expected.
I'm having trouble getting my iPad app / AUv3 synth working on macOS via Mac Catalyst. The app works fine in standalone mode but the DAWs aren't able to load. Error both from GarageBand and Logic Pro are too cryptic to decipher what's going wrong. This is on Big Sur. This is from Logic Pro auval: validating Audio Unit Mela 2 by Nikolozi:     AU Validation Tool     Version: 1.8.0      Copyright 2003-2019, Apple Inc. All Rights Reserved.     Specify -h (-help) for command options -------------------------------------------------- VALIDATING AUDIO UNIT: 'aumu' - 'Mel2' - 'NKLZ' -------------------------------------------------- Manufacturer String: Nikolozi AudioUnit Name: Mela 2 Component Version: 1.6.0 (0x10600) * * PASS -------------------------------------------------- TESTING OPEN TIMES: COLD: FATAL ERROR: OpenAComponent: result: 4,0x4 validation result: couldn’t be opened From GarageBand logs I have this (this happens when I try to load the synth as an instrument plug-in): 2021-06-13 10:23:12.078357+0400 GarageBand[99801:5732544] [lifecycle] [u 589AF1E2-2BE5-451F-A613-EC9BA71325E9:m (null)]  [com.nikolozi.Mela.InstrumentExtension(1.0)] Failed to start plugin; pkd returned an error: Error Domain=PlugInKit Code=4 "RBSLaunchRequest error trying to launch plugin com.nikolozi.Mela.InstrumentExtension(589AF1E2-2BE5-451F-A613-EC9BA71325E9): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7faa9232ca40 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}" UserInfo={NSLocalizedDescription=RBSLaunchRequest error trying to launch plugin com.nikolozi.Mela.InstrumentExtension(589AF1E2-2BE5-451F-A613-EC9BA71325E9): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7faa9232ca40 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}} 2021-06-13 10:23:12.078518+0400 GarageBand[99801:5732544] [plugin] Unable to acquire process assertion in beginUsing: with plugin identifier: com.nikolozi.Mela.InstrumentExtension, killing plugin 2021-06-13 10:23:12.078814+0400 GarageBand[99801:5732544] [plugin] PlugInKit error in beginUsing: with plugin identifier: com.nikolozi.Mela.InstrumentExtension, killing plugin 2021-06-13 10:23:12.153420+0400 GarageBand[99801:5730475] Failed to instantiate AU. Description: RBSLaunchRequest error trying to launch plugin com.nikolozi.Mela.InstrumentExtension(589AF1E2-2BE5-451F-A613-EC9BA71325E9): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7faa9232ca40 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}} Reason: (null) I've tried Apple's sample code AUv3Filter. And turned on Mac Catalyst for the AUv3Filter iOS target. And it runs fine in Logic Pro. I'm not sure what's incompatible in my code that fails to work as AUv3 in Mac catalyst. Any known issues for Mac Catalyst+AUv3 combo that I should be aware of / investigate?
3
0
3.3k
Nov ’21
AUv3 extension based on AVAudioUnitSampler not registered
I created a multi-timbral instrument application based on multiple AVAudioUnitSampler instances (one per Midi channel), wrapped in a custom AVSampler class. I want to expose it also as an AUv3. I followed some articles and samples and put the view controller and other classes in a Framework target, created an AudioUnit extension target (with a dummy/empty class file as I've no implementation to provide). In the extension's Info.plist (NSExtensionAttributes) I added AudioComponentBundle (points to the AUFramework) and AudioComponents item with factoryFunction (points to $(PRODUCT_MODULE_NAME).MultiSamplerViewController), aumu type. Also added NSExtensionPrincipalClass pointing to AUFramework.MultiSamplerViewController. In the shared MultiSamplerViewController I implemented (AUAudioUnit *)createAudioUnitWithComponentDescription:(AudioComponentDescription)desc error:(NSError **)error {     return [[[multiSampler engine] outputNode] AUAudioUnit]; } It also contains an - (id)initWithCoder:(NSCoder*)decoder method, that instantiates the wrapping MultiSampler and starts an enclosed MidiManager. The host application target runs fine, however the AU extension plugin isn't listed in GarageBand (even after runnig the host application once). The target platform is iPad. I added code to load the appex plugin bundle, however it doesn't seem enough to register the plugin. Also I cannot use the AUAudioUnit registerSubclass as I've no concrete AU implementation class (I could pass [[[multiSampler engine] outputNode] AUAudioUnit] ?) I'm in the same configuration as an application built on AudioKit framework (that originally wrapped AVAudioUnitSampler - and now uses a custom implementation).
3
0
1.3k
Nov ’21
Caching the view for an out-of-process audio unit
I'm writing a macOS audio unit hosting app using the AVAudioUnit and AUAudioUnit APIs. I'm trying to use the NSView cacheDisplay(in:to:) function to capture an image of a plugin's view: func viewToImage(veiwToCapture: NSView) -> NSImage? {     var image: NSImage? = nil     if let rep = veiwToCapture.bitmapImageRepForCachingDisplay(in: veiwToCapture.bounds) {       veiwToCapture.cacheDisplay(in: veiwToCapture.bounds, to: rep)       image = NSImage(size: veiwToCapture.bounds.size)       image!.addRepresentation(rep)     }     return image   } } This works ok when a plugin is instantiated using the .loadInProcess option. If the plugin is instantiated using the .loadOutOfProcess option the resulting bitmapImageRep is blank. I'd much rather be loading plugins out-of-process for the enhanced stability. Is there any trick I'm missing to be able to capture the contents of the NSView from an out-of-process audio unit?
Replies
1
Boosts
0
Views
1.9k
Activity
Apr ’22
Monterey Update Jan 19, 2022 - Major Bluetooth issues and Sytem Preference issues
Hi Update complete today and Magic Mouse is no longer scrolling Accessibility, Sound, Keyboard in Preferences can't be accessed iPods Pro can't be connected as well as any other device for audio Photos not synching Keyboard audio regulation switched off, unless on a wire Really? Yes, nothing changed with 12.1
Replies
2
Boosts
0
Views
1.8k
Activity
Apr ’22
Audio Unit hosting: Mysterious Error thrown when key presses dispatched: (Is anyone from Apple out there ?) ...
In our audio unit host, we're seeing the following error thrown when keypresses are dispatched to an audio unit view , does anyone know what it means and more importantly what might be causing it ? .... I can only guess that perhaps an object has been released or not retained properly somewhere but cannot find a solution. This is error message when caught in the debugger _Thread 1: "assertion failed: '<AUAudioUnitRemoteViewController: 0x600002b00c60> does not conform to AUAudioUnitViewControllerHostInterface' in -[NSRemoteView ensureClientExportedObject] on line 7080 of file /AppleInternal/Library/BuildRoots/66382bca-8bca-11ec-aade-6613bcf0e2ee/Library/Caches/com.apple.xbs/Sources/ViewBridge/NSRemoteView.m"
Replies
2
Boosts
0
Views
2.1k
Activity
Apr ’22
Unplug the headphones stop audio play and record
When i make a call within our VOIP application (ipadOS app on MacOS and M1 - MBP 16) all is fine. If i make a call with plugged in headphones - all is fine. If i unplug the headphones during the call - whole audio just stop working. If i hang up the call, make the call again - audio is there with no problems. On iPhone and iPad work correctly. Where can be a problem? HALC_ShellDevice::CreateIOContextDescription: failed to get a description from the server HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: 0x6E6F7065 HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: 0x6E6F7065 HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error: 0x6E6F7065 AudioObjectGetPropertyDataSize: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 0 [auvp] AUVPAggregate.cpp:4413 Failed to get current tap stream physical format, err=2003332927 AudioObjectGetPropertyDataSize: no object with given ID 66 AudioObjectGetPropertyData: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 AudioObjectRemovePropertyListener: no object with given ID 66 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectGetPropertyDataSize: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 HALC_ProxySystem::GetObjectInfo: got an error from the server, Error: 560947818 (!obj) AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 HALC_ShellObject::HasProperty: there is no proxy object AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6912 error 2003332927 getting input sample rate AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6922 error 2003332927 getting input latency AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6932 error 2003332927 getting input safety offset AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6944 error 2003332927 getting tap stream input latency AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6954 error 2003332927 getting tap stream input safety offset AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6965 error 2003332927 getting output sample rate AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6975 error 2003332927 getting output latency AudioObjectHasProperty: no object with given ID 66 AudioDeviceDuck: no device with given ID [auvp] AUVPAggregate.cpp:6985 error 2003332927 getting output safety offset AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectsPublishedAndDied: no such owning object AudioObjectsPublishedAndDied: no such owning object AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6912 error 2003332927 getting input sample rate AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6922 error 2003332927 getting input latency AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6932 error 2003332927 getting input safety offset AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6944 error 2003332927 getting tap stream input latency AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6954 error 2003332927 getting tap stream input safety offset AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPAggregate.cpp:6965 error 2003332927 getting output sample rate AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6975 error 2003332927 getting output latency AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:6985 error 2003332927 getting output safety offset AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectPropertiesChanged: no such object [auvp] AUVPAggregate.cpp:2799 AggCompChanged wait failed AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectSetPropertyData: no object with given ID 73 [auvp] AUVPUtilities.cpp:472 SetDeviceMuteState(73) false: (err=560947818) AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 [auvp] AUVPUtilities.cpp:560 SetCFNumberValueForKeyInDescriptionDictionary(73); doesn't support 'cdes' AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectHasProperty: no object with given ID 73 AudioObjectGetPropertyDataSize: no object with given ID 73 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPUtilities.cpp:560 SetCFNumberValueForKeyInDescriptionDictionary(66); doesn't support 'cdes' AudioObjectHasProperty: no object with given ID 66 AudioObjectHasProperty: no object with given ID 66 [auvp] AUVPAggregate.cpp:3523 VP block error num input channels is unexpected (err=-66784) [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo HALC_ProxySystem::GetObjectInfo: got an error from the server, Error: 560947818 (!obj) HALC_ShellDevice::RebuildStreamLists: there is no device [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo [vp] vpStrategyManager.mm:358 Error code 2003332927 reported at GetPropertyInfo
Replies
0
Boosts
1
Views
1.7k
Activity
Apr ’22
why AudioComponentInstanceNew return -1
AudioComponentDescription desc = {kAudioUnitType_Output, kAudioUnitSubType_VoiceProcessingIO, kAudioUnitManufacturer_Apple, 0, 0}; AudioComponent comp = AudioComponentFindNext(NULL, &desc); OSStatus error = AudioComponentInstanceNew(comp, &myAudioUnit);   In special case the returned error value is -1, I searched the https://www.osstatus.com/, but didn't get relevent info. my question is: what's the meanning of -1 in the case ? myAudioUnit is a nullptr this time ?
Replies
0
Boosts
0
Views
1.2k
Activity
Mar ’22
Logic Pro input monitoring noise
Hi, I've developed a AU plugin which has an issue when input monitoring is turned on. The output is noisy when my plugin is processing audio and the input monitoring on. There is no noise with if either one of these is turned off. Any idea what changes in Logic when input monitoring is turned on which might have an effect on an AU plugin?
Replies
0
Boosts
0
Views
743
Activity
Mar ’22
How do you add a Audio Player to Xcode?
How can you add a live audio player to Xcode where they will have a interactive UI to control the audio and they will be able to exit out of the app and or turn their device off and it will keep playing? Is their a framework or API that will work for this? Thanks! Really need help with this…. 🤩 I have looked everywhere and haven’t found something that works….
Replies
0
Boosts
0
Views
1.5k
Activity
Mar ’22
MIDI processor passthru AudioUnit doesn't receive MIDI events
I'm trying to create a simple pure MIDI Audio Unit (AUv3) that could act as a pipe between for example an AVMusicTrack (played by an AVAudioSequencer) and an AVAudioUnitSampler. I used the default audio extension template generated by XCode 13.2.1 and modified just a few things: My audio unit has type kAudioUnitType_MIDIProcessor (aumi), from what I read it's the right candidate and the only one I can connect to a sampler. Else the app will crash with the Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: graphNodeSrc->IsMIDIProcessorNode() message. Maybe I'm missing something here, any suggestion? I overrode handleMIDIEvent() function in my AU's DSP Kernel just to print something when I receive MIDI events: void handleMIDIEvent(const AUMIDIEvent &midiEvent) override { cout << "MIDI Event" << endl; } I declared a MIDIOutputNames properly My goal is to follow the MIDI playing context from this AU, and edit some note messages depending on the context. My host provides AUMIDIOutputEventBlock, AUHostTransportStateBlock and AUHostMusicalContextBlock so that the AU can read the state and context and output MIDI to the host. If I make my AU a kAudioUnitType_MusicDevice (aumu), I do receive note events from the music track (even if I cannot connect my AU to the sampler as it's not a MIDI processor). But with a MIDI processor, I don't. Any clue why this is?
Replies
0
Boosts
0
Views
1.5k
Activity
Mar ’22
The audio unit of kAudioUnitSubType_VoiceProcessingIO can't query Audio Workgroup
I know the VoiceProcessingIO audio unit will create a aggregate audio device. But there are error kAudioUnitErr_InvalidProperty (-10789) during getting kAudioOutputUnitProperty_OSWorkgroup property in recent macOS Monterey 12.2.1 or BigSur 11.6.4. os_workgroup_t workgroup = NULL; UInt32  sSize; OSStatus sStatus; sSize = sizeof(os_workgroup_t); sStatus = AudioUnitGetProperty(mAudioUnit, kAudioOutputUnitProperty_OSWorkgroup, kAudioUnitScope_Global, 1, &workgroup, &sSize); if (sStatus != noErr) { NSLog(@"Error %d", sStatus); } And the same code works fine on iOS 15.3.1 but not macOS. Have you any hint to resolve this issue?
Replies
0
Boosts
0
Views
1.4k
Activity
Mar ’22
Explaining MALLOC_NANO
Could someone explain what 'MALLOC_NANO' is? A snippet from the crash report this was contained in is here: Crashed Thread: 50 myThread 0x1722ac000 - 0x17244ffff Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000600015c9e340 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Bus error: 10 Termination Reason: Namespace SIGNAL, Code 0xa Terminating Process: exc handler [35195] VM Regions Near 0x600015c9e340: MALLOC_NANO 600008000000-600010000000 [128.0M] rw-/rwx SM=PRV --> MALLOC_NANO 600010000000-600018000000 [128.0M] rw-/rwx SM=SHM MALLOC_NANO 600018000000-600020000000 [128.0M] rw-/rwx SM=PRV I'm guessing the root cause for this crash is using a deallocated object but I'd really like to just know more about MALLOC_NANO as I couldn't find much information elsewhere. Much appreciated!
Replies
0
Boosts
0
Views
1.3k
Activity
Feb ’22
Change AudioUnit from VPIO to RemoteIO occurs the volume was reduced (iOS 14 only)
When I change audio unit from VPIO(VoiceProcessingIO) to remoteIO, the volume was reduced and can not restore to normal level. There's a workaround by this post: h ttps://trac.pjsip.org/repos/ticket/1697 I use the workaround in my code and according flowing steps: stop and destory all the running IO AudioUnit (remoteIO and VPIO) run workaround code [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryRecord error:nil]; [[AVAudioSession sharedInstance] setActive:NO error:nil]; [[AVAudioSession sharedInstance] setActive:YES error:nil]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; 3. setup remoteIO and run. and it work perfectly! The volume of remoteIO was go to normally. But sadness happens on iOS 14, the workaround is not work at all.
Replies
1
Boosts
0
Views
2.4k
Activity
Feb ’22
Audio Unit callback freezes when connecting bluetooth device
Hi, Not sure if this is by design or not, but whenever I connect a Bluetooth device to the app the AU callback stops producing frames for several seconds until the device is connected. I'm building a recording app that uses AVAssetWriter with fragmented segments (HLS buffers). When the callback freezes it suppose to create a gap in the audio but for some reason, the segment that is created does not contain an audio gap, and the audio just "jumps" in timestamps.
Replies
0
Boosts
0
Views
913
Activity
Jan ’22
Parameter string on an Audio Unit
I have an audio unit that I can retrieve parameters and save those parameters in Logic Pro X. The values are boolean, float and integer. What I want to do is be able to save a string value, just like what Logic Pro X is doing with thier MIDI-FX plugin Scripter. Is this possible?
Replies
0
Boosts
0
Views
626
Activity
Jan ’22
internalRenderBlock sometimes not called for MIDI FX plugins in Logic Pro
Hi, I've released an open-source AUv3 MIDI processor plugin for iOS and macOS that records and plays MIDI messages in a sample accurate fashion and doesn't ever apply any quantization. I've tested this plugin with 120 beta testers and everything seemed to work fine. However, now that I've released it, there seems to be a problem in Logic Pro X on some Mac computers with MIDI FX processor plugins that are using Catalyst. You can find my plugin here: http://uwyn.com/mtr/ ... and the source code here: https://github.com/gbevin/MIDITapeRecorder When I trace the AUv3 instantiation, I see Logic Pro X obtaining the internalRenderBlock several times, but then never ever calling it. This means there's no render callback and there's never any MIDI parameter events received. I've talked to the developer of ZOA, which is also a MIDI processor plugin using Catalyst and he's running into exactly the same problem: https://www.audiosymmetric.com/zoa.html Another developer that’s working on a MIDI processor plugin has been trying to track this down for weeks also. When I test this on my M1 Max MacBook Pro, is always internalRenderBlock, however an my M1 MacBook Air and Intel 2019 MacBook Pro, it is never called. Any thoughts or ideas to work around this would be really helpful. Thanks!
Replies
1
Boosts
0
Views
1.5k
Activity
Jan ’22
AU host crashes in IOThread in macOS 11 and later
Hi, I've problem with an AU host (based on Audio Toolbox/Core Audio, not AVFoundation) when running on macOS 11 or later and Apple Silicon – it crashes after some operations in GUI. The weird is, it crashes in IOThread. Could this be caused by some inappropriate operation in GUI (eg. outside the main thread) that effects the IOThread? Sounds quite improbable to me. And I did not find anything suspicious in the code. There are two logs in the debugger: [AUHostingService Client] connection interrupted. rt_sender::signal_wait failed: 89 ... And here is the crash log: Crash log: ... Thanks, Tomas
Replies
0
Boosts
0
Views
1.4k
Activity
Jan ’22
The output volume is abnormal when VPIO is switched to RemoteIO
The voice call in our game has such a usage scenario: when the player does not wear the headset or Bluetooth, we use the VPIO mode to turn on the microphone. On the contrary, the player wears the headset or Bluetooth, and the remoteIO mode is used to turn on the microphone. So we have a switch between VPIO and RemoteIO。When we only use RemoteIO (the player has been wearing headphones or Bluetooth since the game), the output volume does not change before and after the microphone is switched on. When we only use the VPIO mode (the player has not been wearing headphones or Bluetooth since the game), before and after turning on the microphone, the output volume will reduce a little (because turning on the microphone will cause the phone to enter the VPIO and the echo cancellation will be turned on), the performance of the output volume in the above two scenarios is normal。However, when we switched between VPIO and RemotoIO (the player didn’t wear headphones or Bluetooth at the beginning, and brought headphones or Bluetooth in the middle of the game), we encountered some problems: As long as I have used VPIO mode before RemotoIO mode, the output volume in RemoteIO mode after turning on the microphone will be the same as in VPIO mode (normally the output volume in RemoteIO should be greater than in VPIO mode), turn off the microphone ,The output volume will become normal.What confuses me is: My understanding is that when we use RemoteIO, the mobile phone should not do some suppression-like speech algorithms, so when we only use RemoteIO, the output volume of the mobile phone does not change. When we use VPIO, the mobile phone will use echo Algorithms, and perhaps dynamic compression and some gain algorithm processing. At this time, the output volume will be reduced to better handle the echo. This behavior is normal. However, when I switch between VPIO and RemotIO, I feel that when I use RemoteIO (VPIO resources are released), some of the previous VPIO algorithm processing is still reserved (may be dynamic compression or gain algorithm), which finally leads to the output volume under RemoteIO is the same as that under VPIO, and this only happens on all of IOS14, the previous version is normal (anytime you enter the remoteIO mode, the volume does not change). I want to know, For IOS14 this behavior (VPIO and RemoteIO switching causes the volume of RemoteIO to decrease) is normal? If it is not normal, how can we solve it?
Replies
1
Boosts
0
Views
1.7k
Activity
Nov ’21
Mac Catalyst + Audio Unit v3 plug-in not working as expected.
I'm having trouble getting my iPad app / AUv3 synth working on macOS via Mac Catalyst. The app works fine in standalone mode but the DAWs aren't able to load. Error both from GarageBand and Logic Pro are too cryptic to decipher what's going wrong. This is on Big Sur. This is from Logic Pro auval: validating Audio Unit Mela 2 by Nikolozi:     AU Validation Tool     Version: 1.8.0      Copyright 2003-2019, Apple Inc. All Rights Reserved.     Specify -h (-help) for command options -------------------------------------------------- VALIDATING AUDIO UNIT: 'aumu' - 'Mel2' - 'NKLZ' -------------------------------------------------- Manufacturer String: Nikolozi AudioUnit Name: Mela 2 Component Version: 1.6.0 (0x10600) * * PASS -------------------------------------------------- TESTING OPEN TIMES: COLD: FATAL ERROR: OpenAComponent: result: 4,0x4 validation result: couldn’t be opened From GarageBand logs I have this (this happens when I try to load the synth as an instrument plug-in): 2021-06-13 10:23:12.078357+0400 GarageBand[99801:5732544] [lifecycle] [u 589AF1E2-2BE5-451F-A613-EC9BA71325E9:m (null)]  [com.nikolozi.Mela.InstrumentExtension(1.0)] Failed to start plugin; pkd returned an error: Error Domain=PlugInKit Code=4 "RBSLaunchRequest error trying to launch plugin com.nikolozi.Mela.InstrumentExtension(589AF1E2-2BE5-451F-A613-EC9BA71325E9): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7faa9232ca40 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}" UserInfo={NSLocalizedDescription=RBSLaunchRequest error trying to launch plugin com.nikolozi.Mela.InstrumentExtension(589AF1E2-2BE5-451F-A613-EC9BA71325E9): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7faa9232ca40 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}} 2021-06-13 10:23:12.078518+0400 GarageBand[99801:5732544] [plugin] Unable to acquire process assertion in beginUsing: with plugin identifier: com.nikolozi.Mela.InstrumentExtension, killing plugin 2021-06-13 10:23:12.078814+0400 GarageBand[99801:5732544] [plugin] PlugInKit error in beginUsing: with plugin identifier: com.nikolozi.Mela.InstrumentExtension, killing plugin 2021-06-13 10:23:12.153420+0400 GarageBand[99801:5730475] Failed to instantiate AU. Description: RBSLaunchRequest error trying to launch plugin com.nikolozi.Mela.InstrumentExtension(589AF1E2-2BE5-451F-A613-EC9BA71325E9): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7faa9232ca40 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}} Reason: (null) I've tried Apple's sample code AUv3Filter. And turned on Mac Catalyst for the AUv3Filter iOS target. And it runs fine in Logic Pro. I'm not sure what's incompatible in my code that fails to work as AUv3 in Mac catalyst. Any known issues for Mac Catalyst+AUv3 combo that I should be aware of / investigate?
Replies
3
Boosts
0
Views
3.3k
Activity
Nov ’21
AUv3 extension based on AVAudioUnitSampler not registered
I created a multi-timbral instrument application based on multiple AVAudioUnitSampler instances (one per Midi channel), wrapped in a custom AVSampler class. I want to expose it also as an AUv3. I followed some articles and samples and put the view controller and other classes in a Framework target, created an AudioUnit extension target (with a dummy/empty class file as I've no implementation to provide). In the extension's Info.plist (NSExtensionAttributes) I added AudioComponentBundle (points to the AUFramework) and AudioComponents item with factoryFunction (points to $(PRODUCT_MODULE_NAME).MultiSamplerViewController), aumu type. Also added NSExtensionPrincipalClass pointing to AUFramework.MultiSamplerViewController. In the shared MultiSamplerViewController I implemented (AUAudioUnit *)createAudioUnitWithComponentDescription:(AudioComponentDescription)desc error:(NSError **)error {     return [[[multiSampler engine] outputNode] AUAudioUnit]; } It also contains an - (id)initWithCoder:(NSCoder*)decoder method, that instantiates the wrapping MultiSampler and starts an enclosed MidiManager. The host application target runs fine, however the AU extension plugin isn't listed in GarageBand (even after runnig the host application once). The target platform is iPad. I added code to load the appex plugin bundle, however it doesn't seem enough to register the plugin. Also I cannot use the AUAudioUnit registerSubclass as I've no concrete AU implementation class (I could pass [[[multiSampler engine] outputNode] AUAudioUnit] ?) I'm in the same configuration as an application built on AudioKit framework (that originally wrapped AVAudioUnitSampler - and now uses a custom implementation).
Replies
3
Boosts
0
Views
1.3k
Activity
Nov ’21