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

150 Posts

Post

Replies

Boosts

Views

Activity

Audio Unit v2: FATAL ERROR:
Hey folks, I've been able to build and run the 'StarterAudioUnitExample' project provided by Apple, in Xcode 12.5.1, and run and load in Logic 10.6.3 on macOS 11.5.2. However, when trying to recreate the same plugin from a blank project, I'm having trouble with AUVAL or Logic actually instantiating and loading the component. See auval output below: validating Audio Unit Tremelo AUv2 by DAVE: AU Validation Tool Version: 1.8.0 Copyright 2003-2019, Apple Inc. All Rights Reserved. Specify -h (-help) for command options VALIDATING AUDIO UNIT: 'aufx' - 'trem' - 'DAVE' Manufacturer String: DAVE AudioUnit Name: Tremelo AUv2 Component Version: 1.0.0 (0x10000) PASS TESTING OPEN TIMES: COLD: FATAL ERROR: OpenAComponent: result: -1,0xFFFFFFFF validation result: couldn’t be opened Does anyone, hopefully someone from Apple, know what the error code <FATAL ERROR: OpenAComponent: result: -1,0xFFFFFFFF> actually refers too? I've been Googling for hours, and nothing I have found had worked for me so far. Also, here is the info.plist file too : Anyone that could help steer me in the right direction? Thanks, Dave
1
0
2.6k
Sep ’21
RemoteIO Glitch With Sound Recognition Feature
My app is using RemoteIO to record audio. It doesn’t do any playback. RemoteIO seems to be broadly compatible with the new Sound Recognition feature in iOS14, but I’m seeing a glitch when sound recognition is first enabled. If my app is started and I initialise RemoteIO, and then turn on Sound Recognition (say via control centre), the RemoteIO input callback is not called thereafter, until I tear down the audio unit and set it back up. So something like the following: Launch app RemoteIO is initialised and working, can record Turn on Sound Recognition via Settings or control centre widget Start recording with already-set up RemoteIO Recording callback is never again called Though no input callbacks are seen, kAudioOutputUnitProperty_IsRunning is reported as true, so the audio unit thinks it is active Tear down audio unit Set up audio unit again Recording works Buffer size is changed, reflecting some effect on the audio session of the Sound Recognition feature I also noticed that when Sound Recognition is enabled, I see several (usually 3) AVAudioSession.routeChangeNotifications in quick succession. When Sound Recognition is disabled while RemoteIO is set up, I don’t see this problem. I’m allocating my own buffers so it’s not a problem with their size. What could be going on here? Am I not handling a route change properly? There doesn’t seem to be a reliable sequence of events I can catch to know when to reset the audio unit. The only fix I’ve found here is to hack in a timer that checks for callback activity shortly after starting recording, and resets the audio unit if no callback activity is seen. Better than nothing, but not super reliable.
1
0
1.4k
Sep ’21
AUv3 with SwiftUI and Spritekit crash
I have the bare bones of an AUv3 plug in. I have used UIHostingController to allow me to add a SwiftUI view. Then from the SwiftUI I have added a SprikeKit scene which I want to use to start building an interface for the AU. It's a very basic GameScene for now. If I run one instance of it in Logic then it's OK. If I add another instance it crashes with a Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) error. This seems to be down to how I declare a SpriteNode variable. If I declare it within the GameScene as a "let" then it's fine. If I declare it outside the class - (see hashed code) then it will crash with two instances. It would be useful to me later on for this to be a public variable as I want to perform functions on it outside of the class. Is there a better way to declare the SpriteNode variable to make it stable? import SpriteKit //public var ball = SKShapeNode(circleOfRadius: 30) var ball = SKShapeNode(circleOfRadius: 30) class GameScene: SKScene {         let ball = SKShapeNode(circleOfRadius: 30)     override func didMove(to view: SKView) {            //physicsBody = SKPhysicsBody(edgeLoopFrom: frame)         ball.position = CGPoint(x: 200, y: 200)         ball.fillColor = .lightGray         self.addChild(ball)          }
0
0
664
Sep ’21
AudioUnit AudioComponentInstanceDispose crash
AudioUnit is kAudioUnitSubType_VoiceProcessingIO ExceptionHandling        0x7fff3bde6f31 -[NSExceptionHandler _handleException:mask:] + 364 ExceptionHandling        0x7fff3bde6cac NSExceptionHandlerUncaughtSignalHandler + 35 libsystem_platform.dylib    0x7fff203bad7d _sigtramp + 29 0x0000000000000000       0x7000043de580 0x0 + 123145373476224 CoreAudio            0x7fff220a1ee9 _ZN9HALDevice4DuckEfPK14AudioTimeStampf + 921 CoreAudio            0x7fff21c08598 AudioDeviceDuck + 843 AudioDSP            0x13ed3161f _Z14DuckOtherAudiojff + 51 AudioDSP            0x13ee64a3b _ZN16AUVoiceProcessor22DestroyAggregateDeviceEv + 829 AudioDSP            0x13ee65d59 _ZN16AUVoiceProcessorD2Ev + 415 AudioDSP            0x13ef43342 _ZN13ComponentBase8AP_CloseEPv + 30 AudioToolboxCore        0x7fff217b5c8c _ZN19APComponentInstance15disposeInstanceEv + 40 AudioToolboxCore        0x7fff218b92ef AudioComponentInstanceDispose + 40
0
0
664
Aug ’21
Issue finding available auv3 plugins on ios
Hi, I'm attempting to call audioComponentFindNext() from an iOS application (built with juce) to get a list of all available plugins. I've got an issue whereby the function is only returning the generic system plugins and missing any the 3rd party installed plugins. This issue is currently found when called from within another auv3 plugin though I have also seen it from within a normal iOS app. (Ran on iPad air 4), it the moment is working fine from an iOS app. I've tried setting microphone access and inter-app audio capabilities as I saw it suggested on similar forum posts though it has not solved my problem. Any advice would be very appreciated Thanks
0
0
673
Jul ’21
A problem I confront while using the speakers of iPhones
I write to consult on a problem I confront while using the speakers of iPhones. The project I am working on depends largely on the sound fidelity of phone speakers. Nevertheless, a problem stands in the way: when I play through iPhone speakers an audio file (whose waveforms are illustrated in Figure 1), I get the distorted waveforms in Figure 2. The volume difference of around 5db between the first and second half of the original file somehow disappear. However, when played through the high-fidelity speakers, the audio waveforms remain undistorted. It seems the distortion of sound volume is a feature of the iPhone speakers. So I write to confirm whether this is the case and is there a way to get rid of the distorting effects. Figure 1: Figure 2:
1
0
723
Jul ’21
AudioUnit SDK
Hi All, The AudioUnit SDK is now available via GitHub, it is designed to be a slimmed down AudioUnit (version 2) focused replacement for the 'Core Audio Utility Classes', which should now be considered deprecated. Overview The AudioUnitSDK contains a set of base classes as well as utility sources required for Audio Unit development. These utility classes extend or wrap Core Audio API's providing developers with the essential scaffolding to create audio effects, instruments, and generators on Apple platforms. They provide an easier to implement C++ class model wrapping the C framework APIs. Link: AudioUnitSDK Jam
0
0
967
Jul ’21
GarageBand aborts when clicking on any SwiftUI button in AudioUnit plugin
I'm developing an AudioUnit plugin using SwiftUI for the front end. When I run my plugin in GarageBand on macOS, clicking on any SwiftUI buttons in the interface causes GarageBand to abort -- I see this message near the top of the Problem Report: abort() called Unrecognized selector -[_TtC7SwiftUIP33_9FEBA96B0BC70E1682E82D239F242E7311Coordinator lastClickedParameterView] It appears that something in GarageBand expects a method named lastClickedParameterView to be implemented somewhere? Am I supposed to implement this method? If so, where do I implement it, and where can I find documentation for it? The plugin has a small host application as part of the project, and when I run that host application in Xcode or from DerivedData, buttons work normally and as I expect. AudioUnits, strictly speaking, don't seem to require this method -- it seems to be something that only GarageBand and Logic require? I ran into this problem in GarageBand 10.3.5 on macOS 10.15.7 with an app built in Xcode 12.4 to target macOS 10.15. I upgraded to macOS 11.4, Xcode 12.5, and GarageBand 10.4.3, and built the app targeting macos 11.3, and see the same problem.
2
0
999
Jul ’21
Audio Unit v2: FATAL ERROR:
Hey folks, I've been able to build and run the 'StarterAudioUnitExample' project provided by Apple, in Xcode 12.5.1, and run and load in Logic 10.6.3 on macOS 11.5.2. However, when trying to recreate the same plugin from a blank project, I'm having trouble with AUVAL or Logic actually instantiating and loading the component. See auval output below: validating Audio Unit Tremelo AUv2 by DAVE: AU Validation Tool Version: 1.8.0 Copyright 2003-2019, Apple Inc. All Rights Reserved. Specify -h (-help) for command options VALIDATING AUDIO UNIT: 'aufx' - 'trem' - 'DAVE' Manufacturer String: DAVE AudioUnit Name: Tremelo AUv2 Component Version: 1.0.0 (0x10000) PASS TESTING OPEN TIMES: COLD: FATAL ERROR: OpenAComponent: result: -1,0xFFFFFFFF validation result: couldn’t be opened Does anyone, hopefully someone from Apple, know what the error code <FATAL ERROR: OpenAComponent: result: -1,0xFFFFFFFF> actually refers too? I've been Googling for hours, and nothing I have found had worked for me so far. Also, here is the info.plist file too : Anyone that could help steer me in the right direction? Thanks, Dave
Replies
1
Boosts
0
Views
2.6k
Activity
Sep ’21
RemoteIO Glitch With Sound Recognition Feature
My app is using RemoteIO to record audio. It doesn’t do any playback. RemoteIO seems to be broadly compatible with the new Sound Recognition feature in iOS14, but I’m seeing a glitch when sound recognition is first enabled. If my app is started and I initialise RemoteIO, and then turn on Sound Recognition (say via control centre), the RemoteIO input callback is not called thereafter, until I tear down the audio unit and set it back up. So something like the following: Launch app RemoteIO is initialised and working, can record Turn on Sound Recognition via Settings or control centre widget Start recording with already-set up RemoteIO Recording callback is never again called Though no input callbacks are seen, kAudioOutputUnitProperty_IsRunning is reported as true, so the audio unit thinks it is active Tear down audio unit Set up audio unit again Recording works Buffer size is changed, reflecting some effect on the audio session of the Sound Recognition feature I also noticed that when Sound Recognition is enabled, I see several (usually 3) AVAudioSession.routeChangeNotifications in quick succession. When Sound Recognition is disabled while RemoteIO is set up, I don’t see this problem. I’m allocating my own buffers so it’s not a problem with their size. What could be going on here? Am I not handling a route change properly? There doesn’t seem to be a reliable sequence of events I can catch to know when to reset the audio unit. The only fix I’ve found here is to hack in a timer that checks for callback activity shortly after starting recording, and resets the audio unit if no callback activity is seen. Better than nothing, but not super reliable.
Replies
1
Boosts
0
Views
1.4k
Activity
Sep ’21
AUv3 with SwiftUI and Spritekit crash
I have the bare bones of an AUv3 plug in. I have used UIHostingController to allow me to add a SwiftUI view. Then from the SwiftUI I have added a SprikeKit scene which I want to use to start building an interface for the AU. It's a very basic GameScene for now. If I run one instance of it in Logic then it's OK. If I add another instance it crashes with a Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) error. This seems to be down to how I declare a SpriteNode variable. If I declare it within the GameScene as a "let" then it's fine. If I declare it outside the class - (see hashed code) then it will crash with two instances. It would be useful to me later on for this to be a public variable as I want to perform functions on it outside of the class. Is there a better way to declare the SpriteNode variable to make it stable? import SpriteKit //public var ball = SKShapeNode(circleOfRadius: 30) var ball = SKShapeNode(circleOfRadius: 30) class GameScene: SKScene {         let ball = SKShapeNode(circleOfRadius: 30)     override func didMove(to view: SKView) {            //physicsBody = SKPhysicsBody(edgeLoopFrom: frame)         ball.position = CGPoint(x: 200, y: 200)         ball.fillColor = .lightGray         self.addChild(ball)          }
Replies
0
Boosts
0
Views
664
Activity
Sep ’21
AudioUnit AudioComponentInstanceDispose crash
AudioUnit is kAudioUnitSubType_VoiceProcessingIO ExceptionHandling        0x7fff3bde6f31 -[NSExceptionHandler _handleException:mask:] + 364 ExceptionHandling        0x7fff3bde6cac NSExceptionHandlerUncaughtSignalHandler + 35 libsystem_platform.dylib    0x7fff203bad7d _sigtramp + 29 0x0000000000000000       0x7000043de580 0x0 + 123145373476224 CoreAudio            0x7fff220a1ee9 _ZN9HALDevice4DuckEfPK14AudioTimeStampf + 921 CoreAudio            0x7fff21c08598 AudioDeviceDuck + 843 AudioDSP            0x13ed3161f _Z14DuckOtherAudiojff + 51 AudioDSP            0x13ee64a3b _ZN16AUVoiceProcessor22DestroyAggregateDeviceEv + 829 AudioDSP            0x13ee65d59 _ZN16AUVoiceProcessorD2Ev + 415 AudioDSP            0x13ef43342 _ZN13ComponentBase8AP_CloseEPv + 30 AudioToolboxCore        0x7fff217b5c8c _ZN19APComponentInstance15disposeInstanceEv + 40 AudioToolboxCore        0x7fff218b92ef AudioComponentInstanceDispose + 40
Replies
0
Boosts
0
Views
664
Activity
Aug ’21
AudioUnitInitialize return -66635
When I try to initialize audio unit, I'm getting this error, And status code is -66635. I can't find any description for this code. What does it mean? I have similar problems with both of the following devices Device Type:iPad7,11 Software Version:iOS 14.1 Device Type:iPad7,5 Software Version:iOS 13.4.1 Please Help!Thank you!
Replies
2
Boosts
0
Views
1.5k
Activity
Aug ’21
Issue finding available auv3 plugins on ios
Hi, I'm attempting to call audioComponentFindNext() from an iOS application (built with juce) to get a list of all available plugins. I've got an issue whereby the function is only returning the generic system plugins and missing any the 3rd party installed plugins. This issue is currently found when called from within another auv3 plugin though I have also seen it from within a normal iOS app. (Ran on iPad air 4), it the moment is working fine from an iOS app. I've tried setting microphone access and inter-app audio capabilities as I saw it suggested on similar forum posts though it has not solved my problem. Any advice would be very appreciated Thanks
Replies
0
Boosts
0
Views
673
Activity
Jul ’21
A problem I confront while using the speakers of iPhones
I write to consult on a problem I confront while using the speakers of iPhones. The project I am working on depends largely on the sound fidelity of phone speakers. Nevertheless, a problem stands in the way: when I play through iPhone speakers an audio file (whose waveforms are illustrated in Figure 1), I get the distorted waveforms in Figure 2. The volume difference of around 5db between the first and second half of the original file somehow disappear. However, when played through the high-fidelity speakers, the audio waveforms remain undistorted. It seems the distortion of sound volume is a feature of the iPhone speakers. So I write to confirm whether this is the case and is there a way to get rid of the distorting effects. Figure 1: Figure 2:
Replies
1
Boosts
0
Views
723
Activity
Jul ’21
AudioUnit SDK
Hi All, The AudioUnit SDK is now available via GitHub, it is designed to be a slimmed down AudioUnit (version 2) focused replacement for the 'Core Audio Utility Classes', which should now be considered deprecated. Overview The AudioUnitSDK contains a set of base classes as well as utility sources required for Audio Unit development. These utility classes extend or wrap Core Audio API's providing developers with the essential scaffolding to create audio effects, instruments, and generators on Apple platforms. They provide an easier to implement C++ class model wrapping the C framework APIs. Link: AudioUnitSDK Jam
Replies
0
Boosts
0
Views
967
Activity
Jul ’21
AudioOutputUnitStart fail
Our app AudioOutputUnitStart always return the invoke AVAudioSessionErrorCodeCannotStartRecording, we invoke this method is in the foreground is not in the background, when appear the problem, the background no app running, What is the reason and how to debug it.Thanks!
Replies
0
Boosts
0
Views
756
Activity
Jul ’21
GarageBand aborts when clicking on any SwiftUI button in AudioUnit plugin
I'm developing an AudioUnit plugin using SwiftUI for the front end. When I run my plugin in GarageBand on macOS, clicking on any SwiftUI buttons in the interface causes GarageBand to abort -- I see this message near the top of the Problem Report: abort() called Unrecognized selector -[_TtC7SwiftUIP33_9FEBA96B0BC70E1682E82D239F242E7311Coordinator lastClickedParameterView] It appears that something in GarageBand expects a method named lastClickedParameterView to be implemented somewhere? Am I supposed to implement this method? If so, where do I implement it, and where can I find documentation for it? The plugin has a small host application as part of the project, and when I run that host application in Xcode or from DerivedData, buttons work normally and as I expect. AudioUnits, strictly speaking, don't seem to require this method -- it seems to be something that only GarageBand and Logic require? I ran into this problem in GarageBand 10.3.5 on macOS 10.15.7 with an app built in Xcode 12.4 to target macOS 10.15. I upgraded to macOS 11.4, Xcode 12.5, and GarageBand 10.4.3, and built the app targeting macos 11.3, and see the same problem.
Replies
2
Boosts
0
Views
999
Activity
Jul ’21