Dive into the technical aspects of audio on your device, including codecs, format support, and customization options.

Audio Documentation

Posts under Audio subtopic

Post

Replies

Boosts

Views

Activity

🎧Define if headphones is only playing device for current session
I need to apply headphone-specific scenario only when headphones are the sole active playback device in my iOS audio app. Problem that there is no absolute way to definitively understand that headphones are the sole active playback device AVAudioSession.currentRoute.outputs portTypes don't guarantee headphones: let session = AVAudioSession.sharedInstance() let outputs = session.currentRoute.outputs let headphonesOnly = outputs.count == 1 && (outputs.first?.portType == .headphones || outputs.first?.portType == .bluetoothA2DP || outputs.first?.portType == .bluetoothHFP || outputs.first?.portType == .bluetoothLE) The issue in code above that listed bluetooth profiles (A2DP, HFP, LE) can be used by any audio device, not only headphones Is there any public API on iOS that can: Distinguish Bluetooth headphones vs Bluetooth speakers when both use A2DP/LE? Expose the user’s “Device Type” classification (headphones / speaker / car stereo, etc.) that is shown in Settings → Bluetooth → Device Type? Provide a more reliable way to know “this route is definitely headphones” for A2DP devices, beyond portType and portName string heuristics?
1
0
284
2w
Audio DSP Processing Issue / Metallic Ringing Artifacts when recording acoustic instruments on iPhone 17 Pro Max
Description: I have identified a specific issue when recording acoustic guitar and other instruments on the iPhone 17 Pro Max using native applications (Voice Memos, Camera). The recordings contain an unnatural metallic resonance (ringing artifacts) that should not be present. Testing and Methodology: Hardware Verification: Initially, I suspected a hardware defect in the audio chip or microphone. However, extensive testing with third-party software suggests this is likely a software-level issue. AudioShare Test: I conducted a test using the AudioShare app in "Measurement Mode" (which bypasses standard iOS system-wide audio processing). In this mode, the audio remains perfectly clean, and the metallic ringing disappears entirely. Conclusion: The issue is rooted in the DSP (Digital Signal Processing) algorithms that iOS applies for noise suppression or voice enhancement. These algorithms appear to misinterpret the high-frequency overtones of acoustic instruments as background noise and attempt to "filter" them, resulting in audible digital artifacts. Comparison Results: This issue has not been observed on devices from other brands or on older iPhone models (preliminary tests suggest older versions handle this better). Notably, the problem persists even in GarageBand, as the app still utilizes certain system-level processing layers. Proposed Solution: I suggest adding a "Raw Audio" or "Instrument Mode" toggle within the Microphone/Audio settings for native apps. This mode should disable aggressive DSP processing, similar to how the AVAudioSession.Mode.measurement works in specialized apps. Attachments: I am attaching 4 archives, including a final "Measurement Mode" folder with comparative samples (Measurement Mode vs. Standard Mode). The artifacts are most prominent when monitored through headphones.
2
1
307
2w
Logic Pro is not displaying AUv3 currentPreset
I have an AUv3 plug-in that works on both iOS and macOS. Some users have complained that after they create a track in Logic Pro (on either iPad or Mac version) and insert my plug-in as an instrument, the track always shows "Untitled" instead of the name of the active preset. Even if the user changes the factory preset, it still says "Untitled". I started debugging my AUv3 API usage for presets, specifically currentPreset and factoryPresets and tried pretty much everything with no success. For example, I tried overriding and not overriding currentPreset, and I tried issuing KVO for currentPreset. But Logic Pro still shows "Untitled" in all cases. In the following screenshot, I'm selecting a factory preset using Logic's interface. Here we see the factory preset is selected and diplayed using the UI of my plug-in, but Logic's interface is still showing Untitled. I noticed AUv2 plug-ins don't seem to suffer from this issue. For example, FabFilter Pro-Q 3 doesn't expose its factory parameters, but I can create a custom preset inside it or load a factory preset and Logic's interface will display the name of the plug-in. I'm assuming the v2 API kAudioUnitProperty_PresentPreset doesn't suffer fron this issue? Here's Logic Pro showing Pro-Q 3's custom preset name I created using the plug-in interface. Is there a solution to this? Or is this a bug? And then whose bug is it Logic's or Core Audio?
1
0
567
2w
AUv3 UI issues on Desktop / Logic Pro for Mac
With the release of liquid glass last year, I was trying to migrate my AUv3 to use native toolbars, and I noticed on macOS, AUv3's toolbar wouldn't display in Logic Pro (pretty sure it was the same with Ableton Live). But on iOS, it was fine. In the end, I decided to continue to use my custom toolbar because I had more control, but I thought I'd mention it here in case it can be fixed and warn the other users hitting the same issue. Another thing I noticed on the desktop is that presentation animations were removed. For example, AUv3 trying to show a popover on macOS inside, say Logic Pro, would make the popover appear instantly, with no animation. But animations worked great on iPadOS, however.
1
0
84
2w
AVAudioInputNode setup
What's the best way of dealing with AVAudioInputNode from resources perspective? Ideally, to install it as soon as it is necessary for microphone access and use it as long as it is necessary (for example, when you have a long voice chat where users exchange voice messages intermittently AVAudioInputNode should be installed at the beginning and kept until the chat ends) Or is it better to setup it inputNode.installTap( onBus: bus, bufferSize: bufferSize, format: format, block: { buffer, _ in } ) everytime user accessing microphone with push to talk The question is what's better from a performance perspective
1
0
75
2w
Real-time audio monitoring
My app provides real-time microphone monitoring and level metering on iPhone, iPad, and Mac using AVAudioEngine. When users switch between built-in microphones, USB microphones, Bluetooth microphones, and Continuity Camera audio, the audio route often changes before audio buffers begin flowing. This can result in a brief period where the app sees a valid route but receives no audio data. What is Apple's recommended approach in iOS 26 and macOS 26 for determining when an input route is truly ready for real-time monitoring after a route change?
1
0
73
2w
AirPods Custom EQ in iOS 27 beta: is AirPods Max supported?
Hi Apple team, I’m testing iOS 27 Developer Beta 1 and I’m trying to understand the new AirPods Custom EQ feature announced for iOS 27. I’m using AirPods Max, but I can’t find the Custom EQ setting in the AirPods settings page. I have a few questions: Where exactly should the AirPods Custom EQ setting appear in iOS 27? Does this feature require a specific AirPods firmware version? Is AirPods Custom EQ supported on AirPods Max, including the USB-C model? If the EQ option does not appear on AirPods Max while running iOS 27 Developer Beta 1, is this expected behavior or should I file feedback? Thanks.
1
1
114
2w
Error -50 writing to AVAudioFile
I'm trying to write 16-bit interleaved 2-channel data captured from a LiveSwitch audio source to a AVAudioFile. The buffer and file formats match but I get a bad parameter error from the API. Does this API not support the specified format or is there some other issue? Here is the debugger output. (lldb) po audioFile.url ▿ file:///private/var/mobile/Containers/Data/Application/1EB14379-0CF2-41B6-B742-4C9A80728DB3/tmp/Heart%20Sounds%201 - _url : file:///private/var/mobile/Containers/Data/Application/1EB14379-0CF2-41B6-B742-4C9A80728DB3/tmp/Heart%20Sounds%201 - _parseInfo : nil - _baseParseInfo : nil (lldb) po error Error Domain=com.apple.coreaudio.avfaudio Code=-50 "(null)" UserInfo={failed call=ExtAudioFileWrite(_impl->_extAudioFile, buffer.frameLength, buffer.audioBufferList)} (lldb) po buffer.format <AVAudioFormat 0x302a12b20: 2 ch, 44100 Hz, Int16, interleaved> (lldb) po audioFile.fileFormat <AVAudioFormat 0x302a515e0: 2 ch, 44100 Hz, Int16, interleaved> (lldb) po buffer.frameLength 882 (lldb) po buffer.audioBufferList ▿ 0x0000000300941e60 - pointerValue : 12894608992 This code handles the details of converting the Live Switch frame into an AVAudioPCMBuffer. extension FMLiveSwitchAudioFrame { func convertedToPCMBuffer() -> AVAudioPCMBuffer { Self.convertToAVAudioPCMBuffer(from: self)! } static func convertToAVAudioPCMBuffer(from frame: FMLiveSwitchAudioFrame) -> AVAudioPCMBuffer? { // Retrieve the audio buffer and format details from the FMLiveSwitchAudioFrame guard let buffer = frame.buffer(), let format = buffer.format() as? FMLiveSwitchAudioFormat else { return nil } // Extract PCM format details from FMLiveSwitchAudioFormat let sampleRate = Double(format.clockRate()) let channelCount = AVAudioChannelCount(format.channelCount()) // Determine bytes per sample based on bit depth let bitsPerSample = 16 let bytesPerSample = bitsPerSample / 8 let bytesPerFrame = bytesPerSample * Int(channelCount) let frameLength = AVAudioFrameCount(Int(buffer.dataBuffer().length()) / bytesPerFrame) // Create an AVAudioFormat from the FMLiveSwitchAudioFormat guard let avAudioFormat = AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: sampleRate, channels: channelCount, interleaved: true) else { return nil } // Create an AudioBufferList to wrap the existing buffer let audioBufferList = UnsafeMutablePointer<AudioBufferList>.allocate(capacity: 1) audioBufferList.pointee.mNumberBuffers = 1 audioBufferList.pointee.mBuffers.mNumberChannels = channelCount audioBufferList.pointee.mBuffers.mDataByteSize = UInt32(buffer.dataBuffer().length()) audioBufferList.pointee.mBuffers.mData = buffer.dataBuffer().data().mutableBytes // Directly use LiveSwitch buffer // Transfer ownership of the buffer to AVAudioPCMBuffer let pcmBuffer = AVAudioPCMBuffer(pcmFormat: avAudioFormat, bufferListNoCopy: audioBufferList) /* { buffer in // Ensure the buffer is freed when AVAudioPCMBuffer is deallocated buffer.deallocate() // Only call this if LiveSwitch allows manual deallocation } */ pcmBuffer?.frameLength = frameLength return pcmBuffer } } This is the handler that is invoked with every frame in order to convert it for use with AVAudioFile and optionally update a scrolling signal display on the screen. private func onRaisedFrame(obj: Any!) -> Void { // Bail out early if no one is interested in the data. guard isMonitoring else { return } // Convert LS frame to AVAudioPCMBuffer (no-copy) let frame = obj as! FMLiveSwitchAudioFrame let buffer = frame.convertedToPCMBuffer() // Hand subscribers a reference to the buffer for rendering to display. bufferPublisher?.send(buffer) // If we have and output file, store the data there, as well. guard let audioFile = self.audioFile else { return } do { try audioFile.write(from: buffer) // FIXME: This call is throwing error -50 } catch { FMLiveSwitchLog.error(withMessage: "Failed to write buffer to audio file at \(audioFile.url): \(error)") self.audioFile = nil } } This is how the audio file is being setup. static var recordingFormat: AVAudioFormat = { AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: 44_100, channels: 2, interleaved: true)! }() let audioFile = try AVAudioFile(forWriting: outputURL, settings: Self.recordingFormat.settings)
1
0
599
2w
Learning and practice resources
Hello team! Wanted to ask you if there is any resource to learn and practice PHASE, the theory in the official site is great but not much is out there to put it into practice with a real project, for instance. Thank you!
1
0
88
2w
AVPlayerNode + AVAudioEngine
What's the best way of detecting if player node / audio engine is in broken state (for example as a result of AVAudioSession.mediaServicesWereResetNotification). Sometimes it requires being reset, but from time to time it is not enought to just reset it for example playerNode.reset() engine.reset() But also required to reinitialize it playerNode.reset() playerNode = .init() engine.reset() engine = .init() Can we subscribe on the broken states and reinitialize them proactively?
1
0
76
2w
kAudioUnitProperty_ParameterList vs AUParameterTree
This is kind of related to my other question, where I think AUv3's KVO to AUv2 C API notification mapping doesn't seem to work. For example, Reaper supports AUv3 plug-ins but I think it uses AUv2 APIs, and the developer told me that they observe these: kAudioUnitEvent_PropertyChange / kAudioUnitScope_Global / kAudioUnitProperty_ParameterList If one of them changes, they will rescan the parameter list/tree. My AUv3 Mela has a dynamic parameter tree, and changes based on the preset loaded, and it works well enough in Logic Pro for iPad/Mac and AUM on iOS. I know it sends out KVOs for the parameterTree property and I've also tried sending out allParameterValues KVOs but it seems Reaper is not getting these notifications. Anything I can do? (Reaper forum discussion, check last few messages https://forum.cockos.com/showthread.php?t=300840)
1
0
54
2w
Is there plans to evolve AUv3 API?
AUv3 was introduced back when iOS 9 came out, and it only had very minor updates. In a way, it didn't seem important enough for the desktop world, as they continue to use AUv2, and only iOS musicians/developers embraced AUv3. Even Logic Pro doesn't feel like it fully embraces it. It is almost like there was no good enough reason for the desktop world to switch over. Also, because of this, I think many bugs remain. One of the bugs I keep hitting, I think, is an AUv2 to AUv3 API mapping issue. Where AUv3 uses KVO for certain properties, and somehow doesn't work well if the host uses the C API. Here's one example: https://developer.apple.com/forums/thread/828549
1
0
84
2w
a problem
Handling multilingual text. When a user selects a block of text that is mostly Chinese but contains embedded English words (e.g., technical terms in parentheses), the system reader often stutters, stops, or skips the English entirely. What is the best way to handle mixed-language text processing so that the speech engine can seamlessly and fluidly read Chinese and English together without dropping words?
0
0
56
2w
Native diarization in '27?
I'm working on a macOS transcription utility that uses Apple's Speech framework (SpeechAnalyzer) for speech-to-text. This is for meetings/interviews/podcasts where speaker identification is critical. The current limitation is speaker attribution — I need to identify which speaker is producing each segment of transcribed text. I have three questions: Native diarization in iOS 27 / macOS Golden Gate Is native diarization coming in the fall release? I've reviewed the WWDC 2026 session catalog and found no mention of diarization in SpeechAnalyzer or elsewhere. I'm probably going to use FluidAudio for speaker attribution, but I'd strongly prefer a native solution if one exists or is planned. Do I need to stay with third-party libraries, or is this coming? Core AI and custom models The new Core AI framework was announced for on-device model deployment. Can I train or integrate a custom diarization model via Core AI? If yes, are there sample implementations or documentation for audio-processing models? Core Audio framework updates Were there any Core Audio API-level additions announced at WWDC 2026 that might support audio analysis or speaker detection downstream? I saw no dedicated session, but wanted to verify. Thanks for any guidance on this.
0
0
32
2w
How to Fix the Emotionless and Cold Tone of Machine-Read Text?
I am designing an educational app. I notice that current system text-to-speech (like AVSpeechSynthesizer) often sounds too mechanical because the time intervals between characters are strictly equal, making it lack natural human prosody, phrasing, and warmth-which is a huge dealbreaker for sensitive users like children. How can we customize text-to-speech to break this uniform word-spacing, manage prosody dynamically, and make the Al voice sound more emotionally engaging and natural rather than a cold robot? I really want to create an elegant listening experience that feels like a real human storytelling, not just machine reading.
0
0
54
2w
Native diarization in '27?
I'm working on a macOS transcription utility that uses Apple's Speech framework (SpeechAnalyzer) for speech-to-text. This is for meetings/interviews/podcasts where speaker identification is critical. The current challenge is speaker attribution — I need to identify which speaker is producing each segment of transcribed text, and Apple doesn't support this in '26. I have three questions: Is native diarization coming in the fall release? I've reviewed the WWDC 2026 session catalog and found no mention of diarization in SpeechAnalyzer or elsewhere. I'm probably going to use FluidAudio for speaker attribution, but strongly prefer a native solution if one exists or is planned. Do I need to stay with third-party libraries, or is this coming? Core AI and custom models The new Core AI framework was announced for on-device model deployment. Can I train or integrate a custom diarization model via Core AI? If yes, are there sample implementations or documentation for audio-processing models? Core Audio framework updates Were there any Core Audio API-level additions announced at WWDC 2026 that might support audio analysis or speaker detection downstream? I saw no dedicated session, but wanted to verify. Thanks for any guidance on this.
0
0
35
2w
Real-time Audio Analysis of Audio Played by Other Apps on iPhone
I’m evaluating a simple iOS application that would perform real-time beat detection and audio analysis. My question is: Can an App Store-compliant iOS application access or analyze audio that is being played by other applications on the same device (e.g. Spotify, Apple Music, YouTube, TikTok, Safari, etc.) in real time, without using the microphone? Specifically: Is there any Apple-supported framework that allows access to system audio for real-time beat detection or frequency analysis? Can ReplayKit be used to analyze audio buffers from other applications in real time without recording or saving the audio? If direct access is not permitted, what Apple-approved architecture would be recommended for synchronizing external hardware with music being played on the iPhone? Would such an implementation be acceptable under App Store Review Guidelines? I am trying to determine whether real-time beat detection from audio played by other apps is technically and policy-wise supported on iOS. Thank you.
0
1
211
3w
Push Notification sounds with AVAudioSession, AVAudioEngine
I am using AVAudioSession, AVAudioEngine and SpeechAnalyzer to listen to commands, also when the phone is locked. In the same time, I can receive PushNotifications with pre-defined sound. However, the pre-defined sound is not played when the AVAudioEngine is running and the phone is locked. In the code below, I have made many experiments, all of them are "Receive Push Notification while the phone is locked", and I have the following results: If audioEngine has started - I only see the alert, but no sound. If I comment out audioEngine.start, all works as expected and I hear the apns sound on the speaker. If I change the AVAudioSession category to 'record' I don't receive the push message at all! I wonder if anyone has seen it. Here is my code: private func doStartListening() async { print("SpeechService: doStartListening called") guard !audioEngine.isRunning else { print("SpeechService: Audio engine already running") return } do { try configureAudioSession() let recordingFormat = audioEngine.inputNode.outputFormat(forBus: 0) audioEngine.inputNode.removeTap(onBus: 0) guard let locale = await SpeechTranscriber.supportedLocale(equivalentTo: Locale(identifier: "en-US")) else { print("English is not supported on this device") return } let transcriber = SpeechTranscriber(locale: locale, preset: .transcription) if let installationRequest = try await AssetInventory.assetInstallationRequest(supporting: [transcriber]) { try await installationRequest.downloadAndInstall() } let (inputSequence, inputBuilder) = AsyncStream.makeStream(of: AnalyzerInput.self) let audioFormat = await SpeechAnalyzer.bestAvailableAudioFormat(compatibleWith: [transcriber]) let analyzer = SpeechAnalyzer(modules: [transcriber]) // Initialize the modern SpeechAnalyzer self.analyzer = analyzer task = Task { print("SpeechService: Starting analyzer results loop") do { for try await result in transcriber.results { if Task.isCancelled { break } self.handleAnalyzerResult(result) } } catch { print("SpeechService: Analyzer error: \(error.localizedDescription)") let nsError = error as NSError if nsError.domain == "kAFAssistantErrorDomain" && nsError.code == 203 { self.addLog(NSLocalizedString("error_siri_disabled", comment: "")) Task { await self.stopListening() } } else if self.isListening { self.restartRecognition() } } } audioEngine.inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) { [weak self]buffer, _ in guard let audioFormat else { return } do { let converted = try self!.converter.convertBuffer(buffer, to: audioFormat) inputBuilder.yield(AnalyzerInput(buffer: converted)) } catch { print("Exception when converting audio") } } audioEngine.prepare() try audioEngine.start() print("SpeechService: Audio engine started") try await analyzer.start(inputSequence: inputSequence) isListening = true addLog(NSLocalizedString("waiting_wakeup", comment: "")) } catch { print("SpeechService: Error starting listening: \(error.localizedDescription)") addLog("Error starting listening: \(error.localizedDescription)") lastError = error.localizedDescription isListening = false } } private func configureAudioSession() throws { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory(.playAndRecord, mode: .default, options: [.mixWithOthers, .defaultToSpeaker]) try audioSession.setActive(true, options: .notifyOthersOnDeactivation) }
0
0
556
4w
🎧Define if headphones is only playing device for current session
I need to apply headphone-specific scenario only when headphones are the sole active playback device in my iOS audio app. Problem that there is no absolute way to definitively understand that headphones are the sole active playback device AVAudioSession.currentRoute.outputs portTypes don't guarantee headphones: let session = AVAudioSession.sharedInstance() let outputs = session.currentRoute.outputs let headphonesOnly = outputs.count == 1 && (outputs.first?.portType == .headphones || outputs.first?.portType == .bluetoothA2DP || outputs.first?.portType == .bluetoothHFP || outputs.first?.portType == .bluetoothLE) The issue in code above that listed bluetooth profiles (A2DP, HFP, LE) can be used by any audio device, not only headphones Is there any public API on iOS that can: Distinguish Bluetooth headphones vs Bluetooth speakers when both use A2DP/LE? Expose the user’s “Device Type” classification (headphones / speaker / car stereo, etc.) that is shown in Settings → Bluetooth → Device Type? Provide a more reliable way to know “this route is definitely headphones” for A2DP devices, beyond portType and portName string heuristics?
Replies
1
Boosts
0
Views
284
Activity
2w
Audio DSP Processing Issue / Metallic Ringing Artifacts when recording acoustic instruments on iPhone 17 Pro Max
Description: I have identified a specific issue when recording acoustic guitar and other instruments on the iPhone 17 Pro Max using native applications (Voice Memos, Camera). The recordings contain an unnatural metallic resonance (ringing artifacts) that should not be present. Testing and Methodology: Hardware Verification: Initially, I suspected a hardware defect in the audio chip or microphone. However, extensive testing with third-party software suggests this is likely a software-level issue. AudioShare Test: I conducted a test using the AudioShare app in "Measurement Mode" (which bypasses standard iOS system-wide audio processing). In this mode, the audio remains perfectly clean, and the metallic ringing disappears entirely. Conclusion: The issue is rooted in the DSP (Digital Signal Processing) algorithms that iOS applies for noise suppression or voice enhancement. These algorithms appear to misinterpret the high-frequency overtones of acoustic instruments as background noise and attempt to "filter" them, resulting in audible digital artifacts. Comparison Results: This issue has not been observed on devices from other brands or on older iPhone models (preliminary tests suggest older versions handle this better). Notably, the problem persists even in GarageBand, as the app still utilizes certain system-level processing layers. Proposed Solution: I suggest adding a "Raw Audio" or "Instrument Mode" toggle within the Microphone/Audio settings for native apps. This mode should disable aggressive DSP processing, similar to how the AVAudioSession.Mode.measurement works in specialized apps. Attachments: I am attaching 4 archives, including a final "Measurement Mode" folder with comparative samples (Measurement Mode vs. Standard Mode). The artifacts are most prominent when monitored through headphones.
Replies
2
Boosts
1
Views
307
Activity
2w
Logic Pro is not displaying AUv3 currentPreset
I have an AUv3 plug-in that works on both iOS and macOS. Some users have complained that after they create a track in Logic Pro (on either iPad or Mac version) and insert my plug-in as an instrument, the track always shows "Untitled" instead of the name of the active preset. Even if the user changes the factory preset, it still says "Untitled". I started debugging my AUv3 API usage for presets, specifically currentPreset and factoryPresets and tried pretty much everything with no success. For example, I tried overriding and not overriding currentPreset, and I tried issuing KVO for currentPreset. But Logic Pro still shows "Untitled" in all cases. In the following screenshot, I'm selecting a factory preset using Logic's interface. Here we see the factory preset is selected and diplayed using the UI of my plug-in, but Logic's interface is still showing Untitled. I noticed AUv2 plug-ins don't seem to suffer from this issue. For example, FabFilter Pro-Q 3 doesn't expose its factory parameters, but I can create a custom preset inside it or load a factory preset and Logic's interface will display the name of the plug-in. I'm assuming the v2 API kAudioUnitProperty_PresentPreset doesn't suffer fron this issue? Here's Logic Pro showing Pro-Q 3's custom preset name I created using the plug-in interface. Is there a solution to this? Or is this a bug? And then whose bug is it Logic's or Core Audio?
Replies
1
Boosts
0
Views
567
Activity
2w
ASAF Panner Pro Tools Plug In
A recent WWDC session "Learn about Apple Immersive Video technologies" showed a Apple Spatial Audio Format Panner plugin for Pro Tools. The presenter stated that it's available on a per-user license. Where can users access this?
Replies
3
Boosts
3
Views
522
Activity
2w
AUv3 UI issues on Desktop / Logic Pro for Mac
With the release of liquid glass last year, I was trying to migrate my AUv3 to use native toolbars, and I noticed on macOS, AUv3's toolbar wouldn't display in Logic Pro (pretty sure it was the same with Ableton Live). But on iOS, it was fine. In the end, I decided to continue to use my custom toolbar because I had more control, but I thought I'd mention it here in case it can be fixed and warn the other users hitting the same issue. Another thing I noticed on the desktop is that presentation animations were removed. For example, AUv3 trying to show a popover on macOS inside, say Logic Pro, would make the popover appear instantly, with no animation. But animations worked great on iPadOS, however.
Replies
1
Boosts
0
Views
84
Activity
2w
AVAudioInputNode setup
What's the best way of dealing with AVAudioInputNode from resources perspective? Ideally, to install it as soon as it is necessary for microphone access and use it as long as it is necessary (for example, when you have a long voice chat where users exchange voice messages intermittently AVAudioInputNode should be installed at the beginning and kept until the chat ends) Or is it better to setup it inputNode.installTap( onBus: bus, bufferSize: bufferSize, format: format, block: { buffer, _ in } ) everytime user accessing microphone with push to talk The question is what's better from a performance perspective
Replies
1
Boosts
0
Views
75
Activity
2w
Real-time audio monitoring
My app provides real-time microphone monitoring and level metering on iPhone, iPad, and Mac using AVAudioEngine. When users switch between built-in microphones, USB microphones, Bluetooth microphones, and Continuity Camera audio, the audio route often changes before audio buffers begin flowing. This can result in a brief period where the app sees a valid route but receives no audio data. What is Apple's recommended approach in iOS 26 and macOS 26 for determining when an input route is truly ready for real-time monitoring after a route change?
Replies
1
Boosts
0
Views
73
Activity
2w
AirPods Custom EQ in iOS 27 beta: is AirPods Max supported?
Hi Apple team, I’m testing iOS 27 Developer Beta 1 and I’m trying to understand the new AirPods Custom EQ feature announced for iOS 27. I’m using AirPods Max, but I can’t find the Custom EQ setting in the AirPods settings page. I have a few questions: Where exactly should the AirPods Custom EQ setting appear in iOS 27? Does this feature require a specific AirPods firmware version? Is AirPods Custom EQ supported on AirPods Max, including the USB-C model? If the EQ option does not appear on AirPods Max while running iOS 27 Developer Beta 1, is this expected behavior or should I file feedback? Thanks.
Replies
1
Boosts
1
Views
114
Activity
2w
Error -50 writing to AVAudioFile
I'm trying to write 16-bit interleaved 2-channel data captured from a LiveSwitch audio source to a AVAudioFile. The buffer and file formats match but I get a bad parameter error from the API. Does this API not support the specified format or is there some other issue? Here is the debugger output. (lldb) po audioFile.url ▿ file:///private/var/mobile/Containers/Data/Application/1EB14379-0CF2-41B6-B742-4C9A80728DB3/tmp/Heart%20Sounds%201 - _url : file:///private/var/mobile/Containers/Data/Application/1EB14379-0CF2-41B6-B742-4C9A80728DB3/tmp/Heart%20Sounds%201 - _parseInfo : nil - _baseParseInfo : nil (lldb) po error Error Domain=com.apple.coreaudio.avfaudio Code=-50 "(null)" UserInfo={failed call=ExtAudioFileWrite(_impl->_extAudioFile, buffer.frameLength, buffer.audioBufferList)} (lldb) po buffer.format <AVAudioFormat 0x302a12b20: 2 ch, 44100 Hz, Int16, interleaved> (lldb) po audioFile.fileFormat <AVAudioFormat 0x302a515e0: 2 ch, 44100 Hz, Int16, interleaved> (lldb) po buffer.frameLength 882 (lldb) po buffer.audioBufferList ▿ 0x0000000300941e60 - pointerValue : 12894608992 This code handles the details of converting the Live Switch frame into an AVAudioPCMBuffer. extension FMLiveSwitchAudioFrame { func convertedToPCMBuffer() -> AVAudioPCMBuffer { Self.convertToAVAudioPCMBuffer(from: self)! } static func convertToAVAudioPCMBuffer(from frame: FMLiveSwitchAudioFrame) -> AVAudioPCMBuffer? { // Retrieve the audio buffer and format details from the FMLiveSwitchAudioFrame guard let buffer = frame.buffer(), let format = buffer.format() as? FMLiveSwitchAudioFormat else { return nil } // Extract PCM format details from FMLiveSwitchAudioFormat let sampleRate = Double(format.clockRate()) let channelCount = AVAudioChannelCount(format.channelCount()) // Determine bytes per sample based on bit depth let bitsPerSample = 16 let bytesPerSample = bitsPerSample / 8 let bytesPerFrame = bytesPerSample * Int(channelCount) let frameLength = AVAudioFrameCount(Int(buffer.dataBuffer().length()) / bytesPerFrame) // Create an AVAudioFormat from the FMLiveSwitchAudioFormat guard let avAudioFormat = AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: sampleRate, channels: channelCount, interleaved: true) else { return nil } // Create an AudioBufferList to wrap the existing buffer let audioBufferList = UnsafeMutablePointer<AudioBufferList>.allocate(capacity: 1) audioBufferList.pointee.mNumberBuffers = 1 audioBufferList.pointee.mBuffers.mNumberChannels = channelCount audioBufferList.pointee.mBuffers.mDataByteSize = UInt32(buffer.dataBuffer().length()) audioBufferList.pointee.mBuffers.mData = buffer.dataBuffer().data().mutableBytes // Directly use LiveSwitch buffer // Transfer ownership of the buffer to AVAudioPCMBuffer let pcmBuffer = AVAudioPCMBuffer(pcmFormat: avAudioFormat, bufferListNoCopy: audioBufferList) /* { buffer in // Ensure the buffer is freed when AVAudioPCMBuffer is deallocated buffer.deallocate() // Only call this if LiveSwitch allows manual deallocation } */ pcmBuffer?.frameLength = frameLength return pcmBuffer } } This is the handler that is invoked with every frame in order to convert it for use with AVAudioFile and optionally update a scrolling signal display on the screen. private func onRaisedFrame(obj: Any!) -> Void { // Bail out early if no one is interested in the data. guard isMonitoring else { return } // Convert LS frame to AVAudioPCMBuffer (no-copy) let frame = obj as! FMLiveSwitchAudioFrame let buffer = frame.convertedToPCMBuffer() // Hand subscribers a reference to the buffer for rendering to display. bufferPublisher?.send(buffer) // If we have and output file, store the data there, as well. guard let audioFile = self.audioFile else { return } do { try audioFile.write(from: buffer) // FIXME: This call is throwing error -50 } catch { FMLiveSwitchLog.error(withMessage: "Failed to write buffer to audio file at \(audioFile.url): \(error)") self.audioFile = nil } } This is how the audio file is being setup. static var recordingFormat: AVAudioFormat = { AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: 44_100, channels: 2, interleaved: true)! }() let audioFile = try AVAudioFile(forWriting: outputURL, settings: Self.recordingFormat.settings)
Replies
1
Boosts
0
Views
599
Activity
2w
Learning and practice resources
Hello team! Wanted to ask you if there is any resource to learn and practice PHASE, the theory in the official site is great but not much is out there to put it into practice with a real project, for instance. Thank you!
Replies
1
Boosts
0
Views
88
Activity
2w
.sf3 sound font
...when will they be supported natively?
Replies
1
Boosts
0
Views
44
Activity
2w
AVPlayerNode + AVAudioEngine
What's the best way of detecting if player node / audio engine is in broken state (for example as a result of AVAudioSession.mediaServicesWereResetNotification). Sometimes it requires being reset, but from time to time it is not enought to just reset it for example playerNode.reset() engine.reset() But also required to reinitialize it playerNode.reset() playerNode = .init() engine.reset() engine = .init() Can we subscribe on the broken states and reinitialize them proactively?
Replies
1
Boosts
0
Views
76
Activity
2w
kAudioUnitProperty_ParameterList vs AUParameterTree
This is kind of related to my other question, where I think AUv3's KVO to AUv2 C API notification mapping doesn't seem to work. For example, Reaper supports AUv3 plug-ins but I think it uses AUv2 APIs, and the developer told me that they observe these: kAudioUnitEvent_PropertyChange / kAudioUnitScope_Global / kAudioUnitProperty_ParameterList If one of them changes, they will rescan the parameter list/tree. My AUv3 Mela has a dynamic parameter tree, and changes based on the preset loaded, and it works well enough in Logic Pro for iPad/Mac and AUM on iOS. I know it sends out KVOs for the parameterTree property and I've also tried sending out allParameterValues KVOs but it seems Reaper is not getting these notifications. Anything I can do? (Reaper forum discussion, check last few messages https://forum.cockos.com/showthread.php?t=300840)
Replies
1
Boosts
0
Views
54
Activity
2w
Is there plans to evolve AUv3 API?
AUv3 was introduced back when iOS 9 came out, and it only had very minor updates. In a way, it didn't seem important enough for the desktop world, as they continue to use AUv2, and only iOS musicians/developers embraced AUv3. Even Logic Pro doesn't feel like it fully embraces it. It is almost like there was no good enough reason for the desktop world to switch over. Also, because of this, I think many bugs remain. One of the bugs I keep hitting, I think, is an AUv2 to AUv3 API mapping issue. Where AUv3 uses KVO for certain properties, and somehow doesn't work well if the host uses the C API. Here's one example: https://developer.apple.com/forums/thread/828549
Replies
1
Boosts
0
Views
84
Activity
2w
a problem
Handling multilingual text. When a user selects a block of text that is mostly Chinese but contains embedded English words (e.g., technical terms in parentheses), the system reader often stutters, stops, or skips the English entirely. What is the best way to handle mixed-language text processing so that the speech engine can seamlessly and fluidly read Chinese and English together without dropping words?
Replies
0
Boosts
0
Views
56
Activity
2w
Native diarization in '27?
I'm working on a macOS transcription utility that uses Apple's Speech framework (SpeechAnalyzer) for speech-to-text. This is for meetings/interviews/podcasts where speaker identification is critical. The current limitation is speaker attribution — I need to identify which speaker is producing each segment of transcribed text. I have three questions: Native diarization in iOS 27 / macOS Golden Gate Is native diarization coming in the fall release? I've reviewed the WWDC 2026 session catalog and found no mention of diarization in SpeechAnalyzer or elsewhere. I'm probably going to use FluidAudio for speaker attribution, but I'd strongly prefer a native solution if one exists or is planned. Do I need to stay with third-party libraries, or is this coming? Core AI and custom models The new Core AI framework was announced for on-device model deployment. Can I train or integrate a custom diarization model via Core AI? If yes, are there sample implementations or documentation for audio-processing models? Core Audio framework updates Were there any Core Audio API-level additions announced at WWDC 2026 that might support audio analysis or speaker detection downstream? I saw no dedicated session, but wanted to verify. Thanks for any guidance on this.
Replies
0
Boosts
0
Views
32
Activity
2w
How to Fix the Emotionless and Cold Tone of Machine-Read Text?
I am designing an educational app. I notice that current system text-to-speech (like AVSpeechSynthesizer) often sounds too mechanical because the time intervals between characters are strictly equal, making it lack natural human prosody, phrasing, and warmth-which is a huge dealbreaker for sensitive users like children. How can we customize text-to-speech to break this uniform word-spacing, manage prosody dynamically, and make the Al voice sound more emotionally engaging and natural rather than a cold robot? I really want to create an elegant listening experience that feels like a real human storytelling, not just machine reading.
Replies
0
Boosts
0
Views
54
Activity
2w
Native diarization in '27?
I'm working on a macOS transcription utility that uses Apple's Speech framework (SpeechAnalyzer) for speech-to-text. This is for meetings/interviews/podcasts where speaker identification is critical. The current challenge is speaker attribution — I need to identify which speaker is producing each segment of transcribed text, and Apple doesn't support this in '26. I have three questions: Is native diarization coming in the fall release? I've reviewed the WWDC 2026 session catalog and found no mention of diarization in SpeechAnalyzer or elsewhere. I'm probably going to use FluidAudio for speaker attribution, but strongly prefer a native solution if one exists or is planned. Do I need to stay with third-party libraries, or is this coming? Core AI and custom models The new Core AI framework was announced for on-device model deployment. Can I train or integrate a custom diarization model via Core AI? If yes, are there sample implementations or documentation for audio-processing models? Core Audio framework updates Were there any Core Audio API-level additions announced at WWDC 2026 that might support audio analysis or speaker detection downstream? I saw no dedicated session, but wanted to verify. Thanks for any guidance on this.
Replies
0
Boosts
0
Views
35
Activity
2w
Real-time Audio Analysis of Audio Played by Other Apps on iPhone
I’m evaluating a simple iOS application that would perform real-time beat detection and audio analysis. My question is: Can an App Store-compliant iOS application access or analyze audio that is being played by other applications on the same device (e.g. Spotify, Apple Music, YouTube, TikTok, Safari, etc.) in real time, without using the microphone? Specifically: Is there any Apple-supported framework that allows access to system audio for real-time beat detection or frequency analysis? Can ReplayKit be used to analyze audio buffers from other applications in real time without recording or saving the audio? If direct access is not permitted, what Apple-approved architecture would be recommended for synchronizing external hardware with music being played on the iPhone? Would such an implementation be acceptable under App Store Review Guidelines? I am trying to determine whether real-time beat detection from audio played by other apps is technically and policy-wise supported on iOS. Thank you.
Replies
0
Boosts
1
Views
211
Activity
3w
Push Notification sounds with AVAudioSession, AVAudioEngine
I am using AVAudioSession, AVAudioEngine and SpeechAnalyzer to listen to commands, also when the phone is locked. In the same time, I can receive PushNotifications with pre-defined sound. However, the pre-defined sound is not played when the AVAudioEngine is running and the phone is locked. In the code below, I have made many experiments, all of them are "Receive Push Notification while the phone is locked", and I have the following results: If audioEngine has started - I only see the alert, but no sound. If I comment out audioEngine.start, all works as expected and I hear the apns sound on the speaker. If I change the AVAudioSession category to 'record' I don't receive the push message at all! I wonder if anyone has seen it. Here is my code: private func doStartListening() async { print("SpeechService: doStartListening called") guard !audioEngine.isRunning else { print("SpeechService: Audio engine already running") return } do { try configureAudioSession() let recordingFormat = audioEngine.inputNode.outputFormat(forBus: 0) audioEngine.inputNode.removeTap(onBus: 0) guard let locale = await SpeechTranscriber.supportedLocale(equivalentTo: Locale(identifier: "en-US")) else { print("English is not supported on this device") return } let transcriber = SpeechTranscriber(locale: locale, preset: .transcription) if let installationRequest = try await AssetInventory.assetInstallationRequest(supporting: [transcriber]) { try await installationRequest.downloadAndInstall() } let (inputSequence, inputBuilder) = AsyncStream.makeStream(of: AnalyzerInput.self) let audioFormat = await SpeechAnalyzer.bestAvailableAudioFormat(compatibleWith: [transcriber]) let analyzer = SpeechAnalyzer(modules: [transcriber]) // Initialize the modern SpeechAnalyzer self.analyzer = analyzer task = Task { print("SpeechService: Starting analyzer results loop") do { for try await result in transcriber.results { if Task.isCancelled { break } self.handleAnalyzerResult(result) } } catch { print("SpeechService: Analyzer error: \(error.localizedDescription)") let nsError = error as NSError if nsError.domain == "kAFAssistantErrorDomain" && nsError.code == 203 { self.addLog(NSLocalizedString("error_siri_disabled", comment: "")) Task { await self.stopListening() } } else if self.isListening { self.restartRecognition() } } } audioEngine.inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) { [weak self]buffer, _ in guard let audioFormat else { return } do { let converted = try self!.converter.convertBuffer(buffer, to: audioFormat) inputBuilder.yield(AnalyzerInput(buffer: converted)) } catch { print("Exception when converting audio") } } audioEngine.prepare() try audioEngine.start() print("SpeechService: Audio engine started") try await analyzer.start(inputSequence: inputSequence) isListening = true addLog(NSLocalizedString("waiting_wakeup", comment: "")) } catch { print("SpeechService: Error starting listening: \(error.localizedDescription)") addLog("Error starting listening: \(error.localizedDescription)") lastError = error.localizedDescription isListening = false } } private func configureAudioSession() throws { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory(.playAndRecord, mode: .default, options: [.mixWithOthers, .defaultToSpeaker]) try audioSession.setActive(true, options: .notifyOthersOnDeactivation) }
Replies
0
Boosts
0
Views
556
Activity
4w