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

iOS 27 USB-C EarPods volume stuck loud during DRM playback (iPhone 18 Pro)
I have filed FB25826888 with a sysdiagnose captured immediately after reproducing this issue, and I am posting here to check whether this is a known Core Audio / USB-C audio routing regression in iOS 27 or if additional diagnostics would help. Environment • Device: iPhone 18 Pro • OS: iOS 27.2.1 Build (24B156) • Audio Output: Apple EarPods (USB-C), connected directly Symptom During DRM-protected video playback—reproduced in Apple's own Apple TV app as well as Netflix and Crunchyroll—media volume over Apple USB-C EarPods does not scale down properly. Lowering the volume slider (via side buttons or Control Center) down to the lowest step above mute leaves output unusually loud until it drops straight to mute. Additionally, when minimizing the app immediately after playback, system UI sounds (such as keyboard clicks) remain abnormally loud for a few seconds before returning to normal. This suggests the USB-C audio hardware gain or active protected-session routing state is not attenuating or tearing down cleanly when the media session yields. Control Tests (Working Normally) • Same USB-C EarPods scale volume normally in non-DRM apps (YouTube, Spotify). • Same DRM apps (Apple TV, Netflix, Crunchyroll) scale volume normally over Bluetooth headphones (Sony) and built-in iPhone speakers. • Issue persists across force-closing apps and rebooting the device. Steps to Reproduce Connect Apple USB-C EarPods to iPhone 18 Pro running iOS 27. Play any DRM-protected title in the Apple TV app (or Netflix / Crunchyroll). Lower media volume to the lowest audible notch above mute. Minimize the app and trigger keyboard clicks within 2–3 seconds. Questions Is this a known iOS 27 USB-C audio / AVAudioSession volume-scaling issue for protected media routes? Would attaching an additional Audio / Core Audio profile log to FB25826888 help the team investigate?
0
0
92
14h
AirPlay route drops to iPhone speaker when Siri is invoked (AVQueuePlayer, .playback category)
Hi, my app plays local audio files (MP3/M4A) with an AVQueuePlayer. The audio session is set once at launch with AVAudioSession.sharedInstance().setCategory(.playback, mode: .default). Playback continues fine, and the AirPlay route works for track changes, track ends and manual skipping. Problem: When I invoke Siri while the music is playing over AirPlay (to an AirPlay speaker), the iPhone keeps playing, but the output route switches to the iPhone speaker. About 9 seconds later it switches back to the AirPlay speaker. Environment: iOS [Version], iPhone [Modell] Xcode [Version], Swift 5 language mode Audio session: category .playback, mode .default, no options Route change log (my app records every AVAudioSession.routeChangeNotification with its reason and the current outputs): 13:08:44 Category: Speaker → AirPlay speaker 13:08:44 Category unchanged (category, mode and options are the same as set at launch) 13:08:35 Category: AirPlay speaker → Speaker 13:08:35 Category unchanged 13:03:42 Device connected: Speaker → AirPlay speaker What I checked: The category, mode and categoryOptions of my session stay the same when the route changes. I read them back in the notification handler. AVAudioSession.interruptionNotification fires only with .began and .ended for other events. Siri does not seem to produce an interruption, because playback keeps running. Apple Music (on the same device, to the same AirPlay speaker) keeps the route during Siri invocation. Question: Which mechanism moves the route when Siri is called, and how can an app keep an AirPlay route in that situation? Is there a session setting or a pattern I am missing? Thanks in advance.
1
0
300
1d
Title: MusicKit Web v3 authorize() fails with AUTHORIZATION_ERROR after Allow — Windows Chrome/Edge (FB25267497)
Hello Apple engineers and fellow developers, I am developing CloudMusic Bridge, a Windows desktop music application integrating the official MusicKit Web v3 SDK. MusicKit initialization succeeds, but authorize() consistently rejects with AUTHORIZATION_ERROR after the user clicks Allow in Apple's official authorization window. Environment Windows, Google Chrome and Microsoft Edge MusicKit Web v3 from Apple's official CDN Local HTTPS origin: https://localhost:4318 Valid ES256 developer token with a matching origin claim MusicKit-enabled Media ID and associated Media Services key Active Apple Music subscription, with full-song playback working on music.apple.com Catalog API requests succeed (HTTP 200) Actual MusicKit SDK build: UNKNOWN Reproduction I created a standalone minimal reproduction that loads MusicKit, initializes it, obtains the instance and invokes instance.authorize() directly from a user click. The user signs in and clicks Allow, but the authorization Promise rejects. I also tested a separate page that explicitly allows https://play.itunes.apple.com in both CSP connect-src policies. This eliminated the previously observed document CSP violations during the comparison, but authorization still failed with AUTHORIZATION_ERROR after approximately 46.6 seconds. The application did not reach its 120-second timeout. Questions for Apple DTS How can I verify that my browser is loading the current supported stable MusicKit Web v3 build? Is there any additional developer configuration required for web authorization? How can I safely identify the underlying authorization exchange failure? Since this reproduces on Windows, what diagnostics should I provide instead of macOS sysdiagnose? Could an Apple engineer help investigate my existing report, FB25267497? I have already contacted Apple Developer Support and was directed to the Developer Forums for SDK-related technical assistance. I can provide a sanitized minimal reproduction and diagnostic timeline. Thank you for your help.
4
0
969
1d
RuFTraX DJ: Apple Music DJ integration question (iOS and tvOS)
Hello Apple Music team, RuFTraX LLC develops RuFTraX DJ, a DJ app for iPhone and iPad, with an Apple TV version in development. We would like to let Apple Music subscribers use their music in a two-deck DJ workflow. Could you tell us whether Apple is accepting new DJ-platform partners, and which team or application process we should use? Thank you, RuFTraX LLC
0
0
233
3d
visionOS: Microphone captures external audio accurately, but audio from Vision Pro's own speakers is significantly attenuated during simultaneous playback and recording
Hello, I'm developing a visionOS application that uses AVAudioEngine microphone input and Accelerate-based FFT analysis to drive a real-time 3D audio visualizer. I've encountered a significant difference in microphone capture behavior depending on whether audio is played from an external device or from the Vision Pro's own speakers. The issue: When audio plays from an external iPhone or iPad, the Vision Pro microphone captures a detailed, dynamic audio signal and the visualization responds accurately across the frequency spectrum. When the same audio plays through Vision Pro's built-in speakers, the microphone signal is substantially weaker, particularly at higher frequencies. I'm trying to determine whether visionOS applies additional microphone processing during simultaneous playback and recording, and whether there is a supported way to obtain a more faithful microphone signal. Application configuration Platform: visionOS 27 Audio category: AVAudioSession.Category.playAndRecord Audio-session mode: .default Input: BuiltInMic Output: Speaker I/O buffer duration: 10 ms Audio capture: AVAudioEngine using a low-latency Sink Node processing path FFT: 4096 samples with 512-sample hops Visualization: 70 independently analyzed frequency sub-bands, covering approximately 20 Hz–20 kHz The application analyzes the PCM samples delivered by the microphone input node. Experiments and results Test 1: Audio from an external iPhone Audio plays through an iPhone's speakers while the Vision Pro microphone captures the sound. Result: Excellent frequency response. The 70 visualization bars react dynamically across the entire spectrum, closely matching an equivalent macOS FFT visualization. Test 2: Audio from the Vision Pro speakers The same audio plays through Vision Pro's built-in speakers while the application captures microphone input. Result: The visualization is noticeably less responsive, especially in the midrange and upper frequencies. Increasing digital microphone gain before the FFT improves overall signal levels but does not fully restore the frequency balance and responsiveness observed with external playback. Test 3: Independent Mac microphone When audio plays from Vision Pro's speakers, a separate Mac running the equivalent FFT visualizer captures it very well. This suggests the Vision Pro speakers are producing a usable audio signal that an external microphone can analyze. Raw microphone recordings I added a diagnostic WAV recorder that captures the PCM samples delivered to the FFT processing pipeline, before application-level gain, normalization, noise rejection, or visualization enhancement. In an initial comparison: External iPhone playback: Average microphone RMS −41.4 dBFS Vision Pro internal playback: Average microphone RMS −60.4 dBFS The approximately 19 dB difference was measured from 48 kHz mono WAV recordings. More importantly, the attenuation was frequency-dependent. The 4–6 kHz and 6–20 kHz bands showed considerably greater reductions than the lowest-frequency bands. These were exploratory recordings rather than acoustically level-matched measurements, so the exact differences should not be treated as a calibrated device frequency response. Voice-processing diagnostics I checked the actual AVAudioEngine.inputNode before and after starting the engine. Both times, the results were: isVoiceProcessingEnabled = false isVoiceProcessingAGCEnabled = false isVoiceProcessingBypassed = false The active audio session reports: Mode: AVAudioSessionModeDefault Input: BuiltInMic Output: Speaker I/O: 10.00 ms Additional observations: .default audio-session mode produces better visualization responsiveness than .measurement. Requesting bypassed spatial audio did not produce a noticeable improvement. Increasing pre-FFT digital gain improves the amplitude but does not completely restore the missing audio dynamics. Questions for Apple audio engineers Does visionOS apply any system-level acoustic echo cancellation, speaker-reference suppression, microphone beamforming, or other signal processing when the Vision Pro speakers and microphones operate simultaneously, even when isVoiceProcessingEnabled is false? Is there a supported AVAudioSession configuration, microphone data source, capture mode, or other API that can provide a microphone signal with minimal suppression of audio originating from the Vision Pro's own speakers? Does the microphone array use different processing or directional characteristics for sounds originating from the headset's audio pods compared with external sound sources? Could the .playAndRecord category or simultaneous activation of playback and recording change the signal delivered by AVAudioEngine.inputNode? Is there a recommended architecture for a visionOS audio visualizer that needs to analyze audio while it plays through the headset, particularly when playback originates from a separate application or a WKWebView? I understand that audio delivered by the microphone is not necessarily unprocessed hardware audio, and that the physical speaker/microphone arrangement could contribute to these differences. I'm specifically trying to determine whether the observed behavior is expected, whether it can be configured differently, or whether it represents a limitation of simultaneous internal speaker playback and microphone capture on Vision Pro. Any guidance from the visionOS audio engineering team would be greatly appreciated. Thank you!
0
0
287
3d
ShazamKit for Android – Local playlists, metadata retention, background recognition and usage limits
Hello Apple Engineers and fellow developers, Following guidance from Apple Developer Support, I would appreciate some technical clarification regarding the official ShazamKit Android SDK for a free music discovery and organization application. I have reviewed the official ShazamKit documentation and would appreciate guidance on the following points: Local music history and playlists What is the recommended approach for maintaining a persistent music discovery history and personal playlists directly within an Android application, without requiring the Shazam app or an Apple Music subscription? Can recognized songs be organized into custom in-app playlists, including automatic organization based on user-selected criteria? Local metadata retention Can the following properties returned by ShazamKit be stored indefinitely on the user's device for personal music history, saved songs and playlists? Song title Artist Genre ISRC Shazam ID Apple Music ID Apple Music URL Are there any mandatory retention periods or deletion requirements for these properties? External metadata enrichment Can the recognized title, artist or ISRC be used to retrieve missing metadata, such as BPM or genre, from independently licensed third-party services? Can the resulting additional metadata be stored locally alongside the recognized song? Artwork URLs Can the artworkURL returned by ShazamKit be stored locally for subsequent display without permanently downloading or storing the actual image? Are there any retention restrictions or recommended methods for refreshing these URLs? Personal backup and restoration Can permitted song metadata and artwork URLs be included in a user-initiated JSON backup for personal use, allowing the user to restore their own music history and playlists? Continuous and background recognition Does ShazamKit support user-initiated periodic recognition at configurable intervals, including when the Android device screen is off and the appropriate microphone foreground service is active? Are there any maximum session durations or recommended recognition frequencies? Usage limits and costs Are there any documented limits on the number of recognition requests per minute, day or month, either per device, application or developer account? Are there any fair-use thresholds or additional usage-based fees beyond the annual Apple Developer Program membership? Music service links and attribution Provided that all required Apple Music links and ShazamKit attribution requirements are respected, can an application also offer independently obtained links to Spotify and YouTube? Android SDK compatibility Does the current official ShazamKit Android SDK support the 16 KB memory page size requirements for Google Play distribution, including integration with Flutter applications? The intended use is personal music discovery and organization, with user-specific local storage, without creating a shared ShazamKit metadata database or a competing audio recognition engine. Any technical guidance or references to the relevant official documentation and applicable terms would be greatly appreciated. Thank you very much for your time and assistance.
0
0
73
6d
iPhone 18 Pro: AVAudioEngine input tap returns all zeros after the Always-On Display turns off overnight
My app records audio overnight in the background: UIBackgroundModes audio, AVAudioSession category playAndRecord with mode measurement, and an AVAudioEngine with a tap on inputNode. On a customer's iPhone 18 Pro running iOS 27.2.1 (24B156), the tap starts delivering buffers of exact zeros about two hours into the night. It keeps delivering zeros until she picks the phone up in the morning. Her sysdiagnose shows the same sequence on three consecutive nights: powerd logs SmartPowerNap: enterSmartPowerNap. The backlight state changes from inactiveOnLive to suppressed, with the explanation "alwaysOn suppressed - SmartPowerNap". The panel reaches 0 nits about two seconds later. Under a second after that, every sample in the recording is 0. PowerLog's per-app mic RMS reads -240 from that point on. Hours later powerd logs Exiting SmartPowerNap. Session end reason MotionDetected. The display wakes and mic input returns within a second. Timing on the third night: 23:55:57.234 Smart Power Nap entry 23:55:59.14 panel at 0 nits 23:55:59.8 first zero sample in the recording 05:46:58.032 Smart Power Nap exit about 05:46:59 mic input returns During the silent hours: The app receives no interruption, route change, media services reset or AVAudioEngineConfigurationChange notification. The engine keeps running and the tap keeps firing on schedule. audiomxd logs no deactivation for the session and holds its power assertions throughout. The system never sleeps. I can't reproduce it. My iPhone 16 Pro on the same build logs "SmartPowerNap: feature not enabled or predictor not initialized" on every lock, so it never takes this path. Questions: Does iOS gate mic input by design while Smart Power Nap suppresses the Always-On Display? Can an app keep recording through it, or get a notification that input has stopped? Does restarting AVAudioEngine while the session stays active restore input in this state? I can detect a run of exact zeros and restart the engine, but I have no device to test it on. Has anyone else with iPhone 18 Pro users seen this? I filed FB25663635 with the sysdiagnose attached.
0
0
155
1w
Playback volume stays low with PlayAndRecord/VoiceChat and remains low for a few seconds after restoring SoloAmbient (iPhone Air, iOS 26)
Hello, I'm developing a speech recognition app with Unity 6000.0.58f2. The app also has other content besides speech recognition, so I switch the AVAudioSession only when the user needs to speak, and restore it once recording is no longer needed. On iPhone Air (iOS 26), I'm seeing the following issues: While the session is set to PlayAndRecord with VoiceChat mode, playback volume is consistently lower than normal. After restoring the session to SoloAmbient, playback volume stays low for a few seconds before returning to normal. I'd like to avoid this volume drop. Any advice or recommended approach would be greatly appreciated. [Implementation] I use a native iOS plugin (.mm file) called from Unity. When the user starts speaking, I enable recording with: success = [session setCategory:AVAudioSessionCategoryPlayAndRecord mode:AVAudioSessionModeVoiceChat options:AVAudioSessionCategoryOptionDefaultToSpeaker | AVAudioSessionCategoryOptionAllowBluetooth error:&error];After speaking ends, I restore the session with: success = [session setCategory:AVAudioSessionCategorySoloAmbient error:&error]; success = [session setMode:AVAudioSessionModeDefault error:&error];[Environment] Device: iPhone Air iOS: 26.[x] Unity: 6000.0.58f2 Reproduces on other devices / iOS versions: [Yes / No — e.g. iPhone 15 (iOS 18.x) does not reproduce] Output route: built-in speaker [/ Bluetooth: ___ ] [Questions] Is the lower playback volume in VoiceChat mode expected behavior due to voice processing (echo cancellation / ducking)? If so, is there a recommended way to keep playback volume at a normal level while recording for speech recognition (e.g. using a different mode such as Default or Measurement, or adjusting voice processing ducking)? What is the recommended sequence for restoring the session so that playback volume returns to normal immediately? For example, should I call setActive:NO (with NotifyOthersOnDeactivation) before changing the category, or set the category and mode together in a single call? Is there any behavior change in iOS 26 or anything specific to iPhone Air that could cause this? Thank you in advance.
0
0
185
1w
Feature Request: Allow Independent Bluetooth Microphone Input and Speaker Output on iPhone
I hope iphone can consider adding this feature in a future update. We are now living in the era of content creation and social media. With the growing popularity of Bluetooth wireless microphones, more and more people are using external microphones for gaming, live streaming, video calls, and content creation. However, there is a frustrating limitation: when connecting a Bluetooth microphone, the phone may automatically route audio output to the same Bluetooth device. This means users cannot freely use an external microphone for input while keeping the phone's built-in speakers for audio output. What we really need is the ability to independently select audio input and output devices at the system level, just like on a PC. For example: Audio input: DJI wireless microphone Audio output: Phone's built-in speakers This would be extremely useful for mobile gamers, streamers, content creators, and anyone who uses an external microphone regularly. I believe this is becoming an increasingly important feature as wireless microphones become more common. Please consider adding independent microphone input and audio output selection in a future update. Thank you!
0
0
72
2w
BlietoothHFP to MFi hearingaids
Is it possible to port a bluetooth microphone (BluetoothHFP) to MFi hearing aids connected to an iPhone. When I try to do that the BluetoothHFP grabs input and output. When I pull the output away (BluetoothA2DP) it gives up the input.
6
0
589
2w
Supported diagnostics for a natural playback transition failure in a WKWebView hosting music.apple.com
We are evaluating an unreleased iPhone app that embeds the complete official music.apple.com page in WKWebView. The official website displays its own lyrics. Our app retains an independent website sign-in and local listening tools. A JavaScript bridge observes playback metadata and provides explicit transport commands through the page's existing MusicKit instance. It does not create a developer-owned MusicKit instance or extract lyrics, credentials, protected audio addresses, or DRM data. On an iPhone 14 Pro Max running iOS 27.2.1, a foreground track can play to its natural end, after which the queue position advances but the next track remains stopped at time zero. A filtered error observation reports MKError with reason NETWORK_ERROR. This identifies the SDK error category, not the underlying cause or request owner. The failure was observed before Safari inspection was attached as well as during inspection. Safari Web Inspector can connect to the app's main page. Our metadata-only observations include a fetch row with HTTP 200 and several subsequent fetch rows with no displayed HTTP status. We have not captured request addresses, headers, cookies, response bodies, HAR files, lyric text, or raw stacks. These rows cannot currently be linked to the SDK error. An earlier actual-zero-user-script control with the full native model and layout completed one foreground transition and continued playing the next track for 51 seconds. This is not a current matched comparison and does not identify a specific bridge operation. The complete bridge can also complete transitions in a separate Mac host. We have no deterministic minimal reproducer establishing an Apple or WebKit defect. The official-website branch leaves Media Session and audio-session ownership to the website and does not issue automatic next-track commands. No proposed global fetch wrapper has been installed, because adding Promise rejection handlers changes observable rejection behavior. We are seeking guidance before expanding instrumentation or requesting more real-device test time. Questions concerning this single transition failure: Is full music.apple.com playback in a third-party WKWebView, alongside observation and explicit transport through the page's existing MusicKit instance, a supported integration pattern? If not, which supported integration preserves a website account independent of the iPhone's Media & Purchases account? Which public diagnostics can distinguish cancellation from transport failure at this transition without exposing protected resource addresses, authorization values, response content, or raw stacks? Are there documented event-listener reentrancy, WKWebView lifecycle, or audio-session constraints that this host should follow when observing the existing player? Environment: iPhone 14 Pro Max; iOS 27.2.1; macOS 27.2.1; Xcode 27.2 (27B52). Experimental app version 0.65, build 67, not submitted. The existing public version is unchanged. Attachments: None. This draft contains no account identifiers, device identifiers, real-session logs, signing material, or source attachments.
1
0
287
2w
Let Audio Units read the project's whole tempo and signature map (FB25609451)
I've filed FB25609451 and I'm posting it here so other Audio Unit developers can add their own feedback if they need the same. What I'd love in Logic Pro (and any AU host) is what REAPER already does for plug-ins: you insert the plug-in and it immediately knows the whole song, every bar's time signature and tempo, without playing anything, and it updates right away when you change a signature or tempo. In REAPER this works through its host interface (IReaperHostApplication): the plug-in calls TimeMap_GetMeasureInfo to read the start, time signature and tempo of any bar. For Audio Units today, HostCallback_GetBeatAndTempo / HostCallback_GetMusicalTimeLocation (AUv2) and musicalContextBlock / transportStateBlock (AUv3) give the current tempo and time signature, but nothing about the other bars. So a time-aware plug-in has to hear the song played through once, or the user pastes the Signature List into it and redoes it after every edit. Suggestion, read-only: A way for an Audio Unit to read the project's tempo and signature map (Signature track and Tempo track), for example a host callback for AUv2 and a block or property on AUAudioUnit for AUv3, returning every event with its position, time signature and tempo. A notification when the user edits them. Also useful: the current bar number in musicalContextBlock / HostCallback_GetMusicalTimeLocation, and the playback rate during Varispeed. It would help click and count-in tools, arpeggiators and sequencers, tempo-synced effects, and notation or visual displays. If you need this too, filing your own feedback that mentions FB25609451 helps. Leo Margarit, Margarit Audio (OddClick)
0
0
88
2w
AUHAL input callback teardown: when is inputProcRefCon safe to release?
I am developing a macOS application that captures audio through an AUHAL input AudioUnit. The application registers an input callback using kAudioOutputUnitProperty_SetInputCallback. The callback receives an application-owned context through inputProcRefCon and obtains input audio using AudioUnitRender. The intended shutdown sequence is: Close application-level callback admission. Call AudioOutputUnitStop. Remove the callback using AudioUnitSetProperty with a zero-initialized AURenderCallbackStruct. Wait for callbacks already entered by the application to finish. Call AudioUnitUninitialize and AudioComponentInstanceDispose. Release the application-owned callback context. We use an atomic active-callback counter, covering all context accesses made by callbacks that have entered the counted region. However, this counter cannot account for a callback that Core Audio may have already dispatched but that has not yet executed its first instruction. My question: Is there a supported AUHAL teardown sequence that guarantees no previously scheduled, dispatched, or executing input callback can subsequently access inputProcRefCon? Specifically, does successful return from AudioOutputUnitStop, callback removal, AudioUnitUninitialize, or AudioComponentInstanceDispose provide such a guarantee? Is passing an AURenderCallbackStruct with both fields set to NULL a supported way to remove the input callback, and does removal have any documented completion semantics? If none of these operations provides the required guarantee independently, what is the recommended lifetime-management pattern for safely releasing the application-owned callback context? I have prepared a small standalone AUHAL test project that compiles the relevant Core Audio operations and passes deterministic offline lifecycle tests. Physical AUHAL activation and native callback teardown have not yet been executed, so I am not claiming a reproduced crash or verified native behavior. I am primarily seeking clarification of the supported Core Audio API contract, rather than a diagnosis of an observed crash. Thank you.
0
0
130
2w
AVSpeechSynthesizer pulls words out of thin air.
Hi, I'm working on a project that uses the AVSpeechSynthesizer and AVSpeechUtterance. I discovered by chance that the AVSpeechSynthesizer automatically completes some words instead of just outputting what it's supposed to. These are abbreviations for days of the week or months, but not all of them. I don't want either of them automatically completed, but only the specified text. The completion transcends languages. I have written a short example program for demonstration purposes. import SwiftUI import AVFoundation import Foundation let synthesizer: AVSpeechSynthesizer = AVSpeechSynthesizer() struct ContentView: View { var body: some View { VStack { Button { utter("mon") } label: { Text("mon") } .buttonStyle(.borderedProminent) Button { utter("tue") } label: { Text("tue") } .buttonStyle(.borderedProminent) Button { utter("thu") } label: { Text("thu") } .buttonStyle(.borderedProminent) Button { utter("feb") } label: { Text("feb") } .buttonStyle(.borderedProminent) Button { utter("feb", lang: "de-DE") } label: { Text("feb DE") } .buttonStyle(.borderedProminent) Button { utter("wed") } label: { Text("wed") } .buttonStyle(.borderedProminent) } .padding() } private func utter(_ text: String, lang: String = "en-US") { let utterance = AVSpeechUtterance(string: text) let voice = AVSpeechSynthesisVoice(language: lang) utterance.voice = voice synthesizer.speak(utterance) } } #Preview { ContentView() } Thank you Christian
5
0
1.9k
2w
AVAudioSession ioBufferDuration always default to 512 samples on MacOS27 no matter what is requested
Hello, I develop an audio processing demo app that has been working fine on iOS/iPad and on Mac ("developed for iPad") until I upgraded to MacOS27. The app is demonstrating low latency / high temporal resolution audio spectral analysis. I am using AVAudioSession, I request the audio IO buffer to be 32 samples. This still works fine on iOS/iPadOS, but it seems that when running on MacOS27 the buffer size always defaults to 512 samples no matter what I request (smaller or larger). This applies to the "Designed for iPad" version running on MacOS and any version running in the iPhone and iPad simulators on MacOS. The app seems to be working as intended on physical iPhones and iPads. I made a catalyst version and used AudioObjectSetPropertyData to force the IO bugger sizes to 32 samples on the system's active hardware device. This seems to succeed but still results in incorrect behaviour in my app; I am still diagnosing but I believe it's because this leaves AVAudioSession with incorrect data, and I am using AudioKit which relies on AVAudioSession (not confirmed). Regardless, is this change in behaviour intentional in MacOS27? Is there a way around it? The whole point of my app is to demonstrate efficient audio processing with very low latency - I need small input buffer size for that. Thank you for any help with this
2
0
481
3w
macOS 27.2 makes AUv3 plug-ins completely useless as soon as the user accesses a button with a native submenu.
https://youtu.be/HnNGgYZQBvYJust submitted a bug report FB25497228, and posting it here in hopes to get Apple engineers' attention because it's such a bad bug that macOS 27.2 introduced, and don't think it has a workaround unless Apple fixes it. This wasn't an issue in 27.0. Summary: Opening a native submenu in an out-of-process AUv3 plug-in and dismissing it without selecting anything will make the plug-in UI completely unresponsive to mouse input, and any animation will stop also. Only restart solves it. I can reproduce this with Mela in both Logic Pro and Ableton Live 12. I've attached a demo project to the bug report. It's Xcode Audio Unti extension template with a small modification, just added a button with a submenu. Mela can be found here if needed: https://apps.apple.com/us/app/mela-auv3-synth-fx-midi/id1668299428 Steps to reproduce with the attached project Load Mela as an AU instrument in Logic Pro or Ableton Live Open a factory patch. Open a module’s Actions menu (ellipsis buttons) Hover over Insert or Replace until the submenu appears, then dismiss it without selecting anything. Expected result Mela's UI continues to be interactive, e.g. parameters can be easily adjusted and modulation animations continue to work. Actual result No interaction can be performed, wether adjusting a prameter or dragging a module or pressing a button. Animations also stop. This bug renders my plug-in completely useless on macOS as it makes heavy use of submenus. Please fix it! Here's a link to the video demo of the issue: https://youtu.be/HnNGgYZQBvY
1
0
180
3w
iOS 27 Public Beta 6: CallKit UI remains after ending two outgoing calls in modified Apple Speakerbox sample
Summary On an iPhone 17 running iOS 27 Public Beta 6, the system CallKit UI remains visible after ending two outgoing calls individually. This is reproducible using Apple's “Making and Receiving VoIP Calls with CallKit” sample (Speakerbox), with only two minimal changes to support multiple simultaneous calls. After both calls end, Speakerbox displays “No Calls”, but the system CallKit UI still shows 111, and the Dynamic Island retains a call-related status. Environment Device: iPhone 17 (physical device) OS: iOS 27 Public Beta 6 App: Apple's Speakerbox sample with the modifications below Backend: None. The sample's original simulated calls are used; no external VoIP SDK is involved. Changes to the original sample Only two files were modified. 1. ProviderDelegate.swift Added: providerConfiguration.maximumCallGroups = 3 The original setting remains unchanged: providerConfiguration.maximumCallsPerCallGroup = 1 2. SpeakerboxCallManager.swift Before starting a new outgoing call, hold existing calls that are not already on hold. The hold actions and new start action are submitted in the same transaction: let transaction = CXTransaction() for call in calls where !call.isOnHold { transaction.addAction( CXSetHeldCallAction(call: call.uuid, onHold: true) ) } transaction.addAction(startCallAction) requestTransaction(transaction) No changes were made to the simulated connection timing, startedConnectingAt/connectedAt reporting, CXEndCallAction handling, call removal, or audio handling. The original end-call handler finds the call by UUID, calls endSpeakerboxCall(), fulfills the end action, and removes the call from the app's list. Steps to reproduce Launch the modified Speakerbox sample. Create an outgoing call to 111. Create a second outgoing call to 222. The first call is placed on hold. Wait until Speakerbox shows 111 — On Hold and 222 — Active, with call durations displayed. In Speakerbox, select 222 - End Call. Select 111 - End Call. Confirm that Speakerbox displays “No Calls”. Open the app switcher and inspect the system CallKit UI. Also inspect the Dynamic Island. Open the remaining system call UI and tap End. Expected result After both calls end, the system should no longer display an ongoing call in the CallKit UI or Dynamic Island. Actual result Speakerbox displays “No Calls”. The system CallKit UI continues to display the first call, 111. The Dynamic Island continues to show a call-related “Hold” status. Tapping End in the remaining system call UI does not clear the residual state during the recording. The issue occurs even after waiting for both simulated calls to connect before ending them. This is the system-provided CallKit UI, not an active-call view implemented by the sample app. Reproduction video Recording: 4b03d30e507b874d9c19c0523632e9d6.mp4 00:24–00:26 (approximately): Both calls are present; 111 is on hold and 222 is active. 00:26–00:31 (approximately): End 222, then end 111. Speakerbox displays “No Calls”. 00:31–01:03 (approximately): The system CallKit UI and Dynamic Island retain the call state despite further attempts to end it. Questions Is this an iOS 27 regression, or is additional lifecycle handling required when extending Speakerbox to support multiple calls? Please advise what additional diagnostics would help investigate why the system UI retains an ongoing-call state after both calls have been ended using the sample's original end-call handling. Source and video downloads https://github.com/willbin/callkit-ios27-repro/releases/tag/repro-v1
6
0
1.4k
3w
AVAudioIONode presentationLatency discrepancy
The documentation for -[AVAudioIONode presentationLatency] states that it accounts for both kAudioDevicePropertyLatency and kAudioStreamPropertyLatency. On my MBP the following values are reported for the speakers in the output scope: kAudioDevicePropertyLatency: 11 kAudioStreamPropertyLatency: 390 At the device's nominal sample rate of 44.1 kHz that equates to approximately 9.09 msec. However, the output node on a running AVAudioEngine reports presentationLatency as approximately 0.25 msec. This appears to be the device latency only. Is it necessary to compensate for the stream latency manually despite the documentation?
0
0
254
3w
Is MusicKit playback allowed on Meta Quest, and can a preview play as background music for a profile panorama?
I'm building Welink, a mixed-reality app for Meta Quest where people who opt in see each other's profile cards in person. Users connect Apple Music through MusicKit JS, and their card shows recently played songs with Apple Music links, attribution and tap-to-play 30-second previews (streamed, never saved). A few policy questions: Is MusicKit (MusicKit for Android or MusicKit JS in the headset browser) supported and permitted on Meta Quest's Android-based OS for full playback by Apple Music subscribers? Guideline 5.2.5 says previews can't be used for "entertainment value." Would playing a user-chosen song (preview, or the full song for subscribers) when a viewer steps into that person's 360° panorama be allowed, given that the viewer starts it, can stop it, and full attribution is shown? Is it fine to show a user's recently played songs (metadata and cover art) to people they meet, when the user turned that on and can turn it off at any time? Can previews and cover art be cached on-device for about 24 hours for offline demos? Can the Apple Music panel appear in a public demo video, following the Apple Music Identity Guidelines? Any pointers to the right docs or team would be appreciated. Thanks!
0
1
157
3w
MusicKit JS authorize() returns AUTHORIZATION_ERROR "Unauthorized" (no Music User Token) — catalog works
Hi all — hoping someone has hit this. Our MusicKit JS (v3) web app calls authorize() and it rejects with AUTHORIZATION_ERROR / "Unauthorized" (no Music User Token is issued), even though the same developer token returns HTTP 200 for catalog requests (/v1/catalog/us/search) — so the token itself is valid. Setup (all verified): MusicKit JS v3 from js-cdn.music.apple.com/musickit/v3/musickit.js; MusicKit.configure() succeeds, storefront resolves to "us". Developer token is ES256, valid, and includes the origin claim for our exact site origin. Our MusicKit key is enabled for Media Services and tied to a Media ID that has MusicKit enabled. Referrer-Policy: strict-origin-when-cross-origin. Repro: sign in with an active Apple Music subscriber and tap Allow -> authorize() rejects. Reproduces for two subscriber Apple IDs, in Chrome and Edge, with third-party cookies allowed. Error object: { name: "AUTHORIZATION_ERROR", message: "Unauthorized", isMKError: true }, thrown inside musickit.js during the authorize() flow. The served MusicKit build is a prerelease (3.2526.0-prerelease.x). We've ruled out the usual suspects on our side (origin claim, referrer policy, token validity, API version, cookies, and portal provisioning). Has anyone resolved this, or is there an additional server-side enablement needed for a team/Media ID to issue web user tokens? Also filed as FB23587284. Thanks!
4
0
1.2k
3w
iOS 27 USB-C EarPods volume stuck loud during DRM playback (iPhone 18 Pro)
I have filed FB25826888 with a sysdiagnose captured immediately after reproducing this issue, and I am posting here to check whether this is a known Core Audio / USB-C audio routing regression in iOS 27 or if additional diagnostics would help. Environment • Device: iPhone 18 Pro • OS: iOS 27.2.1 Build (24B156) • Audio Output: Apple EarPods (USB-C), connected directly Symptom During DRM-protected video playback—reproduced in Apple's own Apple TV app as well as Netflix and Crunchyroll—media volume over Apple USB-C EarPods does not scale down properly. Lowering the volume slider (via side buttons or Control Center) down to the lowest step above mute leaves output unusually loud until it drops straight to mute. Additionally, when minimizing the app immediately after playback, system UI sounds (such as keyboard clicks) remain abnormally loud for a few seconds before returning to normal. This suggests the USB-C audio hardware gain or active protected-session routing state is not attenuating or tearing down cleanly when the media session yields. Control Tests (Working Normally) • Same USB-C EarPods scale volume normally in non-DRM apps (YouTube, Spotify). • Same DRM apps (Apple TV, Netflix, Crunchyroll) scale volume normally over Bluetooth headphones (Sony) and built-in iPhone speakers. • Issue persists across force-closing apps and rebooting the device. Steps to Reproduce Connect Apple USB-C EarPods to iPhone 18 Pro running iOS 27. Play any DRM-protected title in the Apple TV app (or Netflix / Crunchyroll). Lower media volume to the lowest audible notch above mute. Minimize the app and trigger keyboard clicks within 2–3 seconds. Questions Is this a known iOS 27 USB-C audio / AVAudioSession volume-scaling issue for protected media routes? Would attaching an additional Audio / Core Audio profile log to FB25826888 help the team investigate?
Replies
0
Boosts
0
Views
92
Activity
14h
AirPlay route drops to iPhone speaker when Siri is invoked (AVQueuePlayer, .playback category)
Hi, my app plays local audio files (MP3/M4A) with an AVQueuePlayer. The audio session is set once at launch with AVAudioSession.sharedInstance().setCategory(.playback, mode: .default). Playback continues fine, and the AirPlay route works for track changes, track ends and manual skipping. Problem: When I invoke Siri while the music is playing over AirPlay (to an AirPlay speaker), the iPhone keeps playing, but the output route switches to the iPhone speaker. About 9 seconds later it switches back to the AirPlay speaker. Environment: iOS [Version], iPhone [Modell] Xcode [Version], Swift 5 language mode Audio session: category .playback, mode .default, no options Route change log (my app records every AVAudioSession.routeChangeNotification with its reason and the current outputs): 13:08:44 Category: Speaker → AirPlay speaker 13:08:44 Category unchanged (category, mode and options are the same as set at launch) 13:08:35 Category: AirPlay speaker → Speaker 13:08:35 Category unchanged 13:03:42 Device connected: Speaker → AirPlay speaker What I checked: The category, mode and categoryOptions of my session stay the same when the route changes. I read them back in the notification handler. AVAudioSession.interruptionNotification fires only with .began and .ended for other events. Siri does not seem to produce an interruption, because playback keeps running. Apple Music (on the same device, to the same AirPlay speaker) keeps the route during Siri invocation. Question: Which mechanism moves the route when Siri is called, and how can an app keep an AirPlay route in that situation? Is there a session setting or a pattern I am missing? Thanks in advance.
Replies
1
Boosts
0
Views
300
Activity
1d
Title: MusicKit Web v3 authorize() fails with AUTHORIZATION_ERROR after Allow — Windows Chrome/Edge (FB25267497)
Hello Apple engineers and fellow developers, I am developing CloudMusic Bridge, a Windows desktop music application integrating the official MusicKit Web v3 SDK. MusicKit initialization succeeds, but authorize() consistently rejects with AUTHORIZATION_ERROR after the user clicks Allow in Apple's official authorization window. Environment Windows, Google Chrome and Microsoft Edge MusicKit Web v3 from Apple's official CDN Local HTTPS origin: https://localhost:4318 Valid ES256 developer token with a matching origin claim MusicKit-enabled Media ID and associated Media Services key Active Apple Music subscription, with full-song playback working on music.apple.com Catalog API requests succeed (HTTP 200) Actual MusicKit SDK build: UNKNOWN Reproduction I created a standalone minimal reproduction that loads MusicKit, initializes it, obtains the instance and invokes instance.authorize() directly from a user click. The user signs in and clicks Allow, but the authorization Promise rejects. I also tested a separate page that explicitly allows https://play.itunes.apple.com in both CSP connect-src policies. This eliminated the previously observed document CSP violations during the comparison, but authorization still failed with AUTHORIZATION_ERROR after approximately 46.6 seconds. The application did not reach its 120-second timeout. Questions for Apple DTS How can I verify that my browser is loading the current supported stable MusicKit Web v3 build? Is there any additional developer configuration required for web authorization? How can I safely identify the underlying authorization exchange failure? Since this reproduces on Windows, what diagnostics should I provide instead of macOS sysdiagnose? Could an Apple engineer help investigate my existing report, FB25267497? I have already contacted Apple Developer Support and was directed to the Developer Forums for SDK-related technical assistance. I can provide a sanitized minimal reproduction and diagnostic timeline. Thank you for your help.
Replies
4
Boosts
0
Views
969
Activity
1d
RuFTraX DJ: Apple Music DJ integration question (iOS and tvOS)
Hello Apple Music team, RuFTraX LLC develops RuFTraX DJ, a DJ app for iPhone and iPad, with an Apple TV version in development. We would like to let Apple Music subscribers use their music in a two-deck DJ workflow. Could you tell us whether Apple is accepting new DJ-platform partners, and which team or application process we should use? Thank you, RuFTraX LLC
Replies
0
Boosts
0
Views
233
Activity
3d
visionOS: Microphone captures external audio accurately, but audio from Vision Pro's own speakers is significantly attenuated during simultaneous playback and recording
Hello, I'm developing a visionOS application that uses AVAudioEngine microphone input and Accelerate-based FFT analysis to drive a real-time 3D audio visualizer. I've encountered a significant difference in microphone capture behavior depending on whether audio is played from an external device or from the Vision Pro's own speakers. The issue: When audio plays from an external iPhone or iPad, the Vision Pro microphone captures a detailed, dynamic audio signal and the visualization responds accurately across the frequency spectrum. When the same audio plays through Vision Pro's built-in speakers, the microphone signal is substantially weaker, particularly at higher frequencies. I'm trying to determine whether visionOS applies additional microphone processing during simultaneous playback and recording, and whether there is a supported way to obtain a more faithful microphone signal. Application configuration Platform: visionOS 27 Audio category: AVAudioSession.Category.playAndRecord Audio-session mode: .default Input: BuiltInMic Output: Speaker I/O buffer duration: 10 ms Audio capture: AVAudioEngine using a low-latency Sink Node processing path FFT: 4096 samples with 512-sample hops Visualization: 70 independently analyzed frequency sub-bands, covering approximately 20 Hz–20 kHz The application analyzes the PCM samples delivered by the microphone input node. Experiments and results Test 1: Audio from an external iPhone Audio plays through an iPhone's speakers while the Vision Pro microphone captures the sound. Result: Excellent frequency response. The 70 visualization bars react dynamically across the entire spectrum, closely matching an equivalent macOS FFT visualization. Test 2: Audio from the Vision Pro speakers The same audio plays through Vision Pro's built-in speakers while the application captures microphone input. Result: The visualization is noticeably less responsive, especially in the midrange and upper frequencies. Increasing digital microphone gain before the FFT improves overall signal levels but does not fully restore the frequency balance and responsiveness observed with external playback. Test 3: Independent Mac microphone When audio plays from Vision Pro's speakers, a separate Mac running the equivalent FFT visualizer captures it very well. This suggests the Vision Pro speakers are producing a usable audio signal that an external microphone can analyze. Raw microphone recordings I added a diagnostic WAV recorder that captures the PCM samples delivered to the FFT processing pipeline, before application-level gain, normalization, noise rejection, or visualization enhancement. In an initial comparison: External iPhone playback: Average microphone RMS −41.4 dBFS Vision Pro internal playback: Average microphone RMS −60.4 dBFS The approximately 19 dB difference was measured from 48 kHz mono WAV recordings. More importantly, the attenuation was frequency-dependent. The 4–6 kHz and 6–20 kHz bands showed considerably greater reductions than the lowest-frequency bands. These were exploratory recordings rather than acoustically level-matched measurements, so the exact differences should not be treated as a calibrated device frequency response. Voice-processing diagnostics I checked the actual AVAudioEngine.inputNode before and after starting the engine. Both times, the results were: isVoiceProcessingEnabled = false isVoiceProcessingAGCEnabled = false isVoiceProcessingBypassed = false The active audio session reports: Mode: AVAudioSessionModeDefault Input: BuiltInMic Output: Speaker I/O: 10.00 ms Additional observations: .default audio-session mode produces better visualization responsiveness than .measurement. Requesting bypassed spatial audio did not produce a noticeable improvement. Increasing pre-FFT digital gain improves the amplitude but does not completely restore the missing audio dynamics. Questions for Apple audio engineers Does visionOS apply any system-level acoustic echo cancellation, speaker-reference suppression, microphone beamforming, or other signal processing when the Vision Pro speakers and microphones operate simultaneously, even when isVoiceProcessingEnabled is false? Is there a supported AVAudioSession configuration, microphone data source, capture mode, or other API that can provide a microphone signal with minimal suppression of audio originating from the Vision Pro's own speakers? Does the microphone array use different processing or directional characteristics for sounds originating from the headset's audio pods compared with external sound sources? Could the .playAndRecord category or simultaneous activation of playback and recording change the signal delivered by AVAudioEngine.inputNode? Is there a recommended architecture for a visionOS audio visualizer that needs to analyze audio while it plays through the headset, particularly when playback originates from a separate application or a WKWebView? I understand that audio delivered by the microphone is not necessarily unprocessed hardware audio, and that the physical speaker/microphone arrangement could contribute to these differences. I'm specifically trying to determine whether the observed behavior is expected, whether it can be configured differently, or whether it represents a limitation of simultaneous internal speaker playback and microphone capture on Vision Pro. Any guidance from the visionOS audio engineering team would be greatly appreciated. Thank you!
Replies
0
Boosts
0
Views
287
Activity
3d
ShazamKit for Android – Local playlists, metadata retention, background recognition and usage limits
Hello Apple Engineers and fellow developers, Following guidance from Apple Developer Support, I would appreciate some technical clarification regarding the official ShazamKit Android SDK for a free music discovery and organization application. I have reviewed the official ShazamKit documentation and would appreciate guidance on the following points: Local music history and playlists What is the recommended approach for maintaining a persistent music discovery history and personal playlists directly within an Android application, without requiring the Shazam app or an Apple Music subscription? Can recognized songs be organized into custom in-app playlists, including automatic organization based on user-selected criteria? Local metadata retention Can the following properties returned by ShazamKit be stored indefinitely on the user's device for personal music history, saved songs and playlists? Song title Artist Genre ISRC Shazam ID Apple Music ID Apple Music URL Are there any mandatory retention periods or deletion requirements for these properties? External metadata enrichment Can the recognized title, artist or ISRC be used to retrieve missing metadata, such as BPM or genre, from independently licensed third-party services? Can the resulting additional metadata be stored locally alongside the recognized song? Artwork URLs Can the artworkURL returned by ShazamKit be stored locally for subsequent display without permanently downloading or storing the actual image? Are there any retention restrictions or recommended methods for refreshing these URLs? Personal backup and restoration Can permitted song metadata and artwork URLs be included in a user-initiated JSON backup for personal use, allowing the user to restore their own music history and playlists? Continuous and background recognition Does ShazamKit support user-initiated periodic recognition at configurable intervals, including when the Android device screen is off and the appropriate microphone foreground service is active? Are there any maximum session durations or recommended recognition frequencies? Usage limits and costs Are there any documented limits on the number of recognition requests per minute, day or month, either per device, application or developer account? Are there any fair-use thresholds or additional usage-based fees beyond the annual Apple Developer Program membership? Music service links and attribution Provided that all required Apple Music links and ShazamKit attribution requirements are respected, can an application also offer independently obtained links to Spotify and YouTube? Android SDK compatibility Does the current official ShazamKit Android SDK support the 16 KB memory page size requirements for Google Play distribution, including integration with Flutter applications? The intended use is personal music discovery and organization, with user-specific local storage, without creating a shared ShazamKit metadata database or a competing audio recognition engine. Any technical guidance or references to the relevant official documentation and applicable terms would be greatly appreciated. Thank you very much for your time and assistance.
Replies
0
Boosts
0
Views
73
Activity
6d
iPhone 18 Pro: AVAudioEngine input tap returns all zeros after the Always-On Display turns off overnight
My app records audio overnight in the background: UIBackgroundModes audio, AVAudioSession category playAndRecord with mode measurement, and an AVAudioEngine with a tap on inputNode. On a customer's iPhone 18 Pro running iOS 27.2.1 (24B156), the tap starts delivering buffers of exact zeros about two hours into the night. It keeps delivering zeros until she picks the phone up in the morning. Her sysdiagnose shows the same sequence on three consecutive nights: powerd logs SmartPowerNap: enterSmartPowerNap. The backlight state changes from inactiveOnLive to suppressed, with the explanation "alwaysOn suppressed - SmartPowerNap". The panel reaches 0 nits about two seconds later. Under a second after that, every sample in the recording is 0. PowerLog's per-app mic RMS reads -240 from that point on. Hours later powerd logs Exiting SmartPowerNap. Session end reason MotionDetected. The display wakes and mic input returns within a second. Timing on the third night: 23:55:57.234 Smart Power Nap entry 23:55:59.14 panel at 0 nits 23:55:59.8 first zero sample in the recording 05:46:58.032 Smart Power Nap exit about 05:46:59 mic input returns During the silent hours: The app receives no interruption, route change, media services reset or AVAudioEngineConfigurationChange notification. The engine keeps running and the tap keeps firing on schedule. audiomxd logs no deactivation for the session and holds its power assertions throughout. The system never sleeps. I can't reproduce it. My iPhone 16 Pro on the same build logs "SmartPowerNap: feature not enabled or predictor not initialized" on every lock, so it never takes this path. Questions: Does iOS gate mic input by design while Smart Power Nap suppresses the Always-On Display? Can an app keep recording through it, or get a notification that input has stopped? Does restarting AVAudioEngine while the session stays active restore input in this state? I can detect a run of exact zeros and restart the engine, but I have no device to test it on. Has anyone else with iPhone 18 Pro users seen this? I filed FB25663635 with the sysdiagnose attached.
Replies
0
Boosts
0
Views
155
Activity
1w
Playback volume stays low with PlayAndRecord/VoiceChat and remains low for a few seconds after restoring SoloAmbient (iPhone Air, iOS 26)
Hello, I'm developing a speech recognition app with Unity 6000.0.58f2. The app also has other content besides speech recognition, so I switch the AVAudioSession only when the user needs to speak, and restore it once recording is no longer needed. On iPhone Air (iOS 26), I'm seeing the following issues: While the session is set to PlayAndRecord with VoiceChat mode, playback volume is consistently lower than normal. After restoring the session to SoloAmbient, playback volume stays low for a few seconds before returning to normal. I'd like to avoid this volume drop. Any advice or recommended approach would be greatly appreciated. [Implementation] I use a native iOS plugin (.mm file) called from Unity. When the user starts speaking, I enable recording with: success = [session setCategory:AVAudioSessionCategoryPlayAndRecord mode:AVAudioSessionModeVoiceChat options:AVAudioSessionCategoryOptionDefaultToSpeaker | AVAudioSessionCategoryOptionAllowBluetooth error:&error];After speaking ends, I restore the session with: success = [session setCategory:AVAudioSessionCategorySoloAmbient error:&error]; success = [session setMode:AVAudioSessionModeDefault error:&error];[Environment] Device: iPhone Air iOS: 26.[x] Unity: 6000.0.58f2 Reproduces on other devices / iOS versions: [Yes / No — e.g. iPhone 15 (iOS 18.x) does not reproduce] Output route: built-in speaker [/ Bluetooth: ___ ] [Questions] Is the lower playback volume in VoiceChat mode expected behavior due to voice processing (echo cancellation / ducking)? If so, is there a recommended way to keep playback volume at a normal level while recording for speech recognition (e.g. using a different mode such as Default or Measurement, or adjusting voice processing ducking)? What is the recommended sequence for restoring the session so that playback volume returns to normal immediately? For example, should I call setActive:NO (with NotifyOthersOnDeactivation) before changing the category, or set the category and mode together in a single call? Is there any behavior change in iOS 26 or anything specific to iPhone Air that could cause this? Thank you in advance.
Replies
0
Boosts
0
Views
185
Activity
1w
Feature Request: Allow Independent Bluetooth Microphone Input and Speaker Output on iPhone
I hope iphone can consider adding this feature in a future update. We are now living in the era of content creation and social media. With the growing popularity of Bluetooth wireless microphones, more and more people are using external microphones for gaming, live streaming, video calls, and content creation. However, there is a frustrating limitation: when connecting a Bluetooth microphone, the phone may automatically route audio output to the same Bluetooth device. This means users cannot freely use an external microphone for input while keeping the phone's built-in speakers for audio output. What we really need is the ability to independently select audio input and output devices at the system level, just like on a PC. For example: Audio input: DJI wireless microphone Audio output: Phone's built-in speakers This would be extremely useful for mobile gamers, streamers, content creators, and anyone who uses an external microphone regularly. I believe this is becoming an increasingly important feature as wireless microphones become more common. Please consider adding independent microphone input and audio output selection in a future update. Thank you!
Replies
0
Boosts
0
Views
72
Activity
2w
BlietoothHFP to MFi hearingaids
Is it possible to port a bluetooth microphone (BluetoothHFP) to MFi hearing aids connected to an iPhone. When I try to do that the BluetoothHFP grabs input and output. When I pull the output away (BluetoothA2DP) it gives up the input.
Replies
6
Boosts
0
Views
589
Activity
2w
Supported diagnostics for a natural playback transition failure in a WKWebView hosting music.apple.com
We are evaluating an unreleased iPhone app that embeds the complete official music.apple.com page in WKWebView. The official website displays its own lyrics. Our app retains an independent website sign-in and local listening tools. A JavaScript bridge observes playback metadata and provides explicit transport commands through the page's existing MusicKit instance. It does not create a developer-owned MusicKit instance or extract lyrics, credentials, protected audio addresses, or DRM data. On an iPhone 14 Pro Max running iOS 27.2.1, a foreground track can play to its natural end, after which the queue position advances but the next track remains stopped at time zero. A filtered error observation reports MKError with reason NETWORK_ERROR. This identifies the SDK error category, not the underlying cause or request owner. The failure was observed before Safari inspection was attached as well as during inspection. Safari Web Inspector can connect to the app's main page. Our metadata-only observations include a fetch row with HTTP 200 and several subsequent fetch rows with no displayed HTTP status. We have not captured request addresses, headers, cookies, response bodies, HAR files, lyric text, or raw stacks. These rows cannot currently be linked to the SDK error. An earlier actual-zero-user-script control with the full native model and layout completed one foreground transition and continued playing the next track for 51 seconds. This is not a current matched comparison and does not identify a specific bridge operation. The complete bridge can also complete transitions in a separate Mac host. We have no deterministic minimal reproducer establishing an Apple or WebKit defect. The official-website branch leaves Media Session and audio-session ownership to the website and does not issue automatic next-track commands. No proposed global fetch wrapper has been installed, because adding Promise rejection handlers changes observable rejection behavior. We are seeking guidance before expanding instrumentation or requesting more real-device test time. Questions concerning this single transition failure: Is full music.apple.com playback in a third-party WKWebView, alongside observation and explicit transport through the page's existing MusicKit instance, a supported integration pattern? If not, which supported integration preserves a website account independent of the iPhone's Media & Purchases account? Which public diagnostics can distinguish cancellation from transport failure at this transition without exposing protected resource addresses, authorization values, response content, or raw stacks? Are there documented event-listener reentrancy, WKWebView lifecycle, or audio-session constraints that this host should follow when observing the existing player? Environment: iPhone 14 Pro Max; iOS 27.2.1; macOS 27.2.1; Xcode 27.2 (27B52). Experimental app version 0.65, build 67, not submitted. The existing public version is unchanged. Attachments: None. This draft contains no account identifiers, device identifiers, real-session logs, signing material, or source attachments.
Replies
1
Boosts
0
Views
287
Activity
2w
Let Audio Units read the project's whole tempo and signature map (FB25609451)
I've filed FB25609451 and I'm posting it here so other Audio Unit developers can add their own feedback if they need the same. What I'd love in Logic Pro (and any AU host) is what REAPER already does for plug-ins: you insert the plug-in and it immediately knows the whole song, every bar's time signature and tempo, without playing anything, and it updates right away when you change a signature or tempo. In REAPER this works through its host interface (IReaperHostApplication): the plug-in calls TimeMap_GetMeasureInfo to read the start, time signature and tempo of any bar. For Audio Units today, HostCallback_GetBeatAndTempo / HostCallback_GetMusicalTimeLocation (AUv2) and musicalContextBlock / transportStateBlock (AUv3) give the current tempo and time signature, but nothing about the other bars. So a time-aware plug-in has to hear the song played through once, or the user pastes the Signature List into it and redoes it after every edit. Suggestion, read-only: A way for an Audio Unit to read the project's tempo and signature map (Signature track and Tempo track), for example a host callback for AUv2 and a block or property on AUAudioUnit for AUv3, returning every event with its position, time signature and tempo. A notification when the user edits them. Also useful: the current bar number in musicalContextBlock / HostCallback_GetMusicalTimeLocation, and the playback rate during Varispeed. It would help click and count-in tools, arpeggiators and sequencers, tempo-synced effects, and notation or visual displays. If you need this too, filing your own feedback that mentions FB25609451 helps. Leo Margarit, Margarit Audio (OddClick)
Replies
0
Boosts
0
Views
88
Activity
2w
AUHAL input callback teardown: when is inputProcRefCon safe to release?
I am developing a macOS application that captures audio through an AUHAL input AudioUnit. The application registers an input callback using kAudioOutputUnitProperty_SetInputCallback. The callback receives an application-owned context through inputProcRefCon and obtains input audio using AudioUnitRender. The intended shutdown sequence is: Close application-level callback admission. Call AudioOutputUnitStop. Remove the callback using AudioUnitSetProperty with a zero-initialized AURenderCallbackStruct. Wait for callbacks already entered by the application to finish. Call AudioUnitUninitialize and AudioComponentInstanceDispose. Release the application-owned callback context. We use an atomic active-callback counter, covering all context accesses made by callbacks that have entered the counted region. However, this counter cannot account for a callback that Core Audio may have already dispatched but that has not yet executed its first instruction. My question: Is there a supported AUHAL teardown sequence that guarantees no previously scheduled, dispatched, or executing input callback can subsequently access inputProcRefCon? Specifically, does successful return from AudioOutputUnitStop, callback removal, AudioUnitUninitialize, or AudioComponentInstanceDispose provide such a guarantee? Is passing an AURenderCallbackStruct with both fields set to NULL a supported way to remove the input callback, and does removal have any documented completion semantics? If none of these operations provides the required guarantee independently, what is the recommended lifetime-management pattern for safely releasing the application-owned callback context? I have prepared a small standalone AUHAL test project that compiles the relevant Core Audio operations and passes deterministic offline lifecycle tests. Physical AUHAL activation and native callback teardown have not yet been executed, so I am not claiming a reproduced crash or verified native behavior. I am primarily seeking clarification of the supported Core Audio API contract, rather than a diagnosis of an observed crash. Thank you.
Replies
0
Boosts
0
Views
130
Activity
2w
AVSpeechSynthesizer pulls words out of thin air.
Hi, I'm working on a project that uses the AVSpeechSynthesizer and AVSpeechUtterance. I discovered by chance that the AVSpeechSynthesizer automatically completes some words instead of just outputting what it's supposed to. These are abbreviations for days of the week or months, but not all of them. I don't want either of them automatically completed, but only the specified text. The completion transcends languages. I have written a short example program for demonstration purposes. import SwiftUI import AVFoundation import Foundation let synthesizer: AVSpeechSynthesizer = AVSpeechSynthesizer() struct ContentView: View { var body: some View { VStack { Button { utter("mon") } label: { Text("mon") } .buttonStyle(.borderedProminent) Button { utter("tue") } label: { Text("tue") } .buttonStyle(.borderedProminent) Button { utter("thu") } label: { Text("thu") } .buttonStyle(.borderedProminent) Button { utter("feb") } label: { Text("feb") } .buttonStyle(.borderedProminent) Button { utter("feb", lang: "de-DE") } label: { Text("feb DE") } .buttonStyle(.borderedProminent) Button { utter("wed") } label: { Text("wed") } .buttonStyle(.borderedProminent) } .padding() } private func utter(_ text: String, lang: String = "en-US") { let utterance = AVSpeechUtterance(string: text) let voice = AVSpeechSynthesisVoice(language: lang) utterance.voice = voice synthesizer.speak(utterance) } } #Preview { ContentView() } Thank you Christian
Replies
5
Boosts
0
Views
1.9k
Activity
2w
AVAudioSession ioBufferDuration always default to 512 samples on MacOS27 no matter what is requested
Hello, I develop an audio processing demo app that has been working fine on iOS/iPad and on Mac ("developed for iPad") until I upgraded to MacOS27. The app is demonstrating low latency / high temporal resolution audio spectral analysis. I am using AVAudioSession, I request the audio IO buffer to be 32 samples. This still works fine on iOS/iPadOS, but it seems that when running on MacOS27 the buffer size always defaults to 512 samples no matter what I request (smaller or larger). This applies to the "Designed for iPad" version running on MacOS and any version running in the iPhone and iPad simulators on MacOS. The app seems to be working as intended on physical iPhones and iPads. I made a catalyst version and used AudioObjectSetPropertyData to force the IO bugger sizes to 32 samples on the system's active hardware device. This seems to succeed but still results in incorrect behaviour in my app; I am still diagnosing but I believe it's because this leaves AVAudioSession with incorrect data, and I am using AudioKit which relies on AVAudioSession (not confirmed). Regardless, is this change in behaviour intentional in MacOS27? Is there a way around it? The whole point of my app is to demonstrate efficient audio processing with very low latency - I need small input buffer size for that. Thank you for any help with this
Replies
2
Boosts
0
Views
481
Activity
3w
macOS 27.2 makes AUv3 plug-ins completely useless as soon as the user accesses a button with a native submenu.
https://youtu.be/HnNGgYZQBvYJust submitted a bug report FB25497228, and posting it here in hopes to get Apple engineers' attention because it's such a bad bug that macOS 27.2 introduced, and don't think it has a workaround unless Apple fixes it. This wasn't an issue in 27.0. Summary: Opening a native submenu in an out-of-process AUv3 plug-in and dismissing it without selecting anything will make the plug-in UI completely unresponsive to mouse input, and any animation will stop also. Only restart solves it. I can reproduce this with Mela in both Logic Pro and Ableton Live 12. I've attached a demo project to the bug report. It's Xcode Audio Unti extension template with a small modification, just added a button with a submenu. Mela can be found here if needed: https://apps.apple.com/us/app/mela-auv3-synth-fx-midi/id1668299428 Steps to reproduce with the attached project Load Mela as an AU instrument in Logic Pro or Ableton Live Open a factory patch. Open a module’s Actions menu (ellipsis buttons) Hover over Insert or Replace until the submenu appears, then dismiss it without selecting anything. Expected result Mela's UI continues to be interactive, e.g. parameters can be easily adjusted and modulation animations continue to work. Actual result No interaction can be performed, wether adjusting a prameter or dragging a module or pressing a button. Animations also stop. This bug renders my plug-in completely useless on macOS as it makes heavy use of submenus. Please fix it! Here's a link to the video demo of the issue: https://youtu.be/HnNGgYZQBvY
Replies
1
Boosts
0
Views
180
Activity
3w
iOS 27 Public Beta 6: CallKit UI remains after ending two outgoing calls in modified Apple Speakerbox sample
Summary On an iPhone 17 running iOS 27 Public Beta 6, the system CallKit UI remains visible after ending two outgoing calls individually. This is reproducible using Apple's “Making and Receiving VoIP Calls with CallKit” sample (Speakerbox), with only two minimal changes to support multiple simultaneous calls. After both calls end, Speakerbox displays “No Calls”, but the system CallKit UI still shows 111, and the Dynamic Island retains a call-related status. Environment Device: iPhone 17 (physical device) OS: iOS 27 Public Beta 6 App: Apple's Speakerbox sample with the modifications below Backend: None. The sample's original simulated calls are used; no external VoIP SDK is involved. Changes to the original sample Only two files were modified. 1. ProviderDelegate.swift Added: providerConfiguration.maximumCallGroups = 3 The original setting remains unchanged: providerConfiguration.maximumCallsPerCallGroup = 1 2. SpeakerboxCallManager.swift Before starting a new outgoing call, hold existing calls that are not already on hold. The hold actions and new start action are submitted in the same transaction: let transaction = CXTransaction() for call in calls where !call.isOnHold { transaction.addAction( CXSetHeldCallAction(call: call.uuid, onHold: true) ) } transaction.addAction(startCallAction) requestTransaction(transaction) No changes were made to the simulated connection timing, startedConnectingAt/connectedAt reporting, CXEndCallAction handling, call removal, or audio handling. The original end-call handler finds the call by UUID, calls endSpeakerboxCall(), fulfills the end action, and removes the call from the app's list. Steps to reproduce Launch the modified Speakerbox sample. Create an outgoing call to 111. Create a second outgoing call to 222. The first call is placed on hold. Wait until Speakerbox shows 111 — On Hold and 222 — Active, with call durations displayed. In Speakerbox, select 222 - End Call. Select 111 - End Call. Confirm that Speakerbox displays “No Calls”. Open the app switcher and inspect the system CallKit UI. Also inspect the Dynamic Island. Open the remaining system call UI and tap End. Expected result After both calls end, the system should no longer display an ongoing call in the CallKit UI or Dynamic Island. Actual result Speakerbox displays “No Calls”. The system CallKit UI continues to display the first call, 111. The Dynamic Island continues to show a call-related “Hold” status. Tapping End in the remaining system call UI does not clear the residual state during the recording. The issue occurs even after waiting for both simulated calls to connect before ending them. This is the system-provided CallKit UI, not an active-call view implemented by the sample app. Reproduction video Recording: 4b03d30e507b874d9c19c0523632e9d6.mp4 00:24–00:26 (approximately): Both calls are present; 111 is on hold and 222 is active. 00:26–00:31 (approximately): End 222, then end 111. Speakerbox displays “No Calls”. 00:31–01:03 (approximately): The system CallKit UI and Dynamic Island retain the call state despite further attempts to end it. Questions Is this an iOS 27 regression, or is additional lifecycle handling required when extending Speakerbox to support multiple calls? Please advise what additional diagnostics would help investigate why the system UI retains an ongoing-call state after both calls have been ended using the sample's original end-call handling. Source and video downloads https://github.com/willbin/callkit-ios27-repro/releases/tag/repro-v1
Replies
6
Boosts
0
Views
1.4k
Activity
3w
AVAudioIONode presentationLatency discrepancy
The documentation for -[AVAudioIONode presentationLatency] states that it accounts for both kAudioDevicePropertyLatency and kAudioStreamPropertyLatency. On my MBP the following values are reported for the speakers in the output scope: kAudioDevicePropertyLatency: 11 kAudioStreamPropertyLatency: 390 At the device's nominal sample rate of 44.1 kHz that equates to approximately 9.09 msec. However, the output node on a running AVAudioEngine reports presentationLatency as approximately 0.25 msec. This appears to be the device latency only. Is it necessary to compensate for the stream latency manually despite the documentation?
Replies
0
Boosts
0
Views
254
Activity
3w
Is MusicKit playback allowed on Meta Quest, and can a preview play as background music for a profile panorama?
I'm building Welink, a mixed-reality app for Meta Quest where people who opt in see each other's profile cards in person. Users connect Apple Music through MusicKit JS, and their card shows recently played songs with Apple Music links, attribution and tap-to-play 30-second previews (streamed, never saved). A few policy questions: Is MusicKit (MusicKit for Android or MusicKit JS in the headset browser) supported and permitted on Meta Quest's Android-based OS for full playback by Apple Music subscribers? Guideline 5.2.5 says previews can't be used for "entertainment value." Would playing a user-chosen song (preview, or the full song for subscribers) when a viewer steps into that person's 360° panorama be allowed, given that the viewer starts it, can stop it, and full attribution is shown? Is it fine to show a user's recently played songs (metadata and cover art) to people they meet, when the user turned that on and can turn it off at any time? Can previews and cover art be cached on-device for about 24 hours for offline demos? Can the Apple Music panel appear in a public demo video, following the Apple Music Identity Guidelines? Any pointers to the right docs or team would be appreciated. Thanks!
Replies
0
Boosts
1
Views
157
Activity
3w
MusicKit JS authorize() returns AUTHORIZATION_ERROR "Unauthorized" (no Music User Token) — catalog works
Hi all — hoping someone has hit this. Our MusicKit JS (v3) web app calls authorize() and it rejects with AUTHORIZATION_ERROR / "Unauthorized" (no Music User Token is issued), even though the same developer token returns HTTP 200 for catalog requests (/v1/catalog/us/search) — so the token itself is valid. Setup (all verified): MusicKit JS v3 from js-cdn.music.apple.com/musickit/v3/musickit.js; MusicKit.configure() succeeds, storefront resolves to "us". Developer token is ES256, valid, and includes the origin claim for our exact site origin. Our MusicKit key is enabled for Media Services and tied to a Media ID that has MusicKit enabled. Referrer-Policy: strict-origin-when-cross-origin. Repro: sign in with an active Apple Music subscriber and tap Allow -> authorize() rejects. Reproduces for two subscriber Apple IDs, in Chrome and Edge, with third-party cookies allowed. Error object: { name: "AUTHORIZATION_ERROR", message: "Unauthorized", isMKError: true }, thrown inside musickit.js during the authorize() flow. The served MusicKit build is a prerelease (3.2526.0-prerelease.x). We've ruled out the usual suspects on our side (origin claim, referrer policy, token validity, API version, cookies, and portal provisioning). Has anyone resolved this, or is there an additional server-side enablement needed for a team/Media ID to issue web user tokens? Also filed as FB23587284. Thanks!
Replies
4
Boosts
0
Views
1.2k
Activity
3w