Search results for

“Popping Sound”

20,034 results found

Post

Replies

Boosts

Views

Activity

Reply to Mixing ScreenCaptureKit audio with microphone audio
I ran into exactly this problem when building an audio pipeline that mixes system audio (via ScreenCaptureKit) with microphone input for real-time speech processing. The core issue is that mainMixerNode is connected to outputNode by default, which routes everything to speakers. You have two approaches: In manual rendering mode, AVAudioEngine does not play back to hardware — you pull rendered buffers on your own schedule. Enable manual rendering, attach a player node for your SCK audio, connect it to the main mixer, then call renderOffline() to pull mixed audio on demand. The catch: inputNode does not work in offline mode on macOS. The workaround is to capture mic samples separately (via AVCaptureSession or a tap on a separate realtime engine), then schedule those buffers into a second AVAudioPlayerNode. Keep the engine in realtime mode but prevent playback by setting mainMixerNode.outputVolume = 0. Then install a tap on mainMixerNode to capture the mixed audio with
Topic: Media Technologies SubTopic: Audio Tags:
5d
Reply to CoreData + CloudKit -- Many-to-Many Relationship not Syncing
This sounds like a general synchronization issue, and so you can probably start with the technotes mentioned in this post to hopefully figure out the cause of the issue. NSPersistentCloudKitContainer supports many-to-many relationships. Before seeing an evidence that proves it doesn't work (by going through the debugging process the technotes describe), I probably won't change the Core Data model. Best, —— Ziqiao Chen  Worldwide Developer Relations.
5d
Reply to copyfile Sometimes Fails to copy .DS_Store when Copying a Folder But Does Not Report Usable Error
So it appears to be the same failure we are talking about here: https://developer.apple.com/forums/thread/814076 I just updated that thread, but the bug described there (FB21805212) was fixed in macOS 26.4. Also, to be clear, the bug was specifically in smb, NOT copyfile itself. However... It has data. I can read the filenames when I view it as 'plain text’. The Resource fork is less than 300 bytes, but that is enough for it to cause copyfile to fail. The total file size is ~12kb. That doesn't sound like the bug above. The bug above was caused by the SMBClient incorrectly accounting for large xattr size, which then caused the copy to fail. I don't think it would have happened with small xattrs (certainly not 300 bytes). FYI, the Finder (and other copy engines) work because they're using the ..namedfork accessor, when it ends up going through a totally different code path in smb. Interestingly, .DS_Store causing problems with copying is infamous enough to have a mention on Wikipedia: Yes, but I think
Topic: App & System Services SubTopic: Core OS Tags:
5d
Reply to Working Anti Virus - Apple Developer Account terminated
Hi, I read your post and it sounds like an incredibly tough situation. I’ve been through a Pending Termination Notice myself, so I truly understand how stressful this can be. I’d like to share my experience just in case it might be of some help. At this stage, it might be more effective to focus less on defending the anti-virus app’s innovation and more on protecting your developer account and your livelihood. In my own case, focusing on a few specific points in my appeal seemed to make a difference: Clarify your intent: Since the app was flagged as malicious, you might want to clearly explain that you had absolutely no intention of misleading users. While your personal situation (such as losing your source of income) is completely understandable, Apple’s review process is guideline-driven, so I think it might be more effective to keep the tone as professional as possible. Write a concrete preventative measure: I mentioned this in another thread recently, but I believe including a clear preventative
6d
Reply to sysextd: "no policy, cannot allow apps outside /Applications" - NEFilterDataProvider system extension on macOS 26
It sounds like you’re using Developer ID signing for day-to-day development. That’s a mistake on multiple levels. I talk about this in general in The Care and Feeding of Developer ID, but there are extra issues with system extensions, where system policy requires that Developer ID signed sysexen be notarised. So my advice in this case. Use Apple Development code signing for day-to-day development. Use Developer ID for pre-release testing and distribution. There are a couple of key benefits with this approach: It lets you build and debug without enabling development mode, which is a big win IMO. Xcode’s automatic code signing works well with Apple Development signing. Even if you’re not using Xcode, you can create a small test project in Xcode, get it working, and then follow the same path it took. See Debugging a Network Extension Provider for specific advice on how to bring up a provider in Xcode. One thing that Xcode doesn’t handle is the -systemextension suffix )-: To learn more about that, read E
6d
The audio of FairPlay protected content can be captured - Safari on iOS
Hi, Has anyone been able to protect the audio part of FairPlay protected content from being captured as part of screen recording on Safari/iOS (PWA and/or online web app)? We have tried many things but could not prevent the audio from being recorded. Same app and content on Safari/Mac does not allow audio to be recorded. Any tips?
1
0
181
6d
Reply to CKQuerySubscription on public database never triggers APNS push in Production environment
Hi Ziqiao, thanks for looking into this! I've verified using CKFetchSubscriptionsOperation.fetchAllSubscriptionsOperation() on both Development and Production (TestFlight) devices. All 5 subscriptions are present and correctly configured in both environments. The output is identical between both environments. Here are all 5 subscriptions as returned by CKFetchSubscriptionsOperation: fr-sub-v3 (FriendRequest) Predicate: receiverID == [userID] AND status == pending badge=true, sound=default, contentAvail=false locKey=FRIEND_REQUEST_BODY, locArgs=[senderUsername] category=FRIEND_REQUEST, desiredKeys=[senderID, senderUsername] rec-sub-v3 (MediaRecommendation) Predicate: receiverID == [userID] AND status == pending badge=true, sound=default, contentAvail=false locKey=RECOMMENDATION_BODY, locArgs=[senderUsername, mediaTitle] category=RECOMMENDATION, desiredKeys=[mediaTitle, mediaType, senderID, senderUsername] fs-a-sub-v3 (Friendship) Predicate: userAID == [userID] badge=true, sound=defau
6d
Reply to SpeechTranscriber/SpeechAnalyzer being relatively slow compared to FoundationModel and TTS
I've been optimizing a similar STT-to-action pipeline on macOS 26 and found a few additional tricks beyond prepareToAnalyze that helped bring the finalization latency down: Use volatileResults aggressively for UI feedback, but trigger your downstream action (FoundationModel call) on the volatile transcript as soon as it stabilizes — don't wait for the finalized event. In my testing, the volatile transcript matches the final one ~95% of the time for short utterances. You can always correct if the final differs. Audio format matters more than you'd expect. If your input is coming through at 48kHz (common from ScreenCaptureKit or external mics), the internal resample to 16kHz adds measurable overhead. Setting up your AVAudioEngine tap at 16kHz mono from the start shaves ~200ms off the pipeline. The large variance Bersaelor observed with prepareToAnalyze (0.05s to 3s) likely correlates with whether the ANE was already warm. If other CoreML workloads are running concurrently (even system ones like Visual
Topic: Media Technologies SubTopic: Audio Tags:
6d
SpeechTranscriber/SpeechAnalyzer being relatively slow compared to FoundationModel and TTS
So, I've been wondering how fast a an offline STT -> ML Prompt -> TTS roundtrip would be. Interestingly, for many tests, the SpeechTranscriber (STT) takes the bulk of the time, compared to generating a FoundationModel response and creating the Audio using TTS. E.g. InteractionStatistics: - listeningStarted: 21:24:23 4480 2423 - timeTillFirstAboveNoiseFloor: 01.794 - timeTillLastNoiseAboveFloor: 02.383 - timeTillFirstSpeechDetected: 02.399 - timeTillTranscriptFinalized: 04.510 - timeTillFirstMLModelResponse: 04.938 - timeTillMLModelResponse: 05.379 - timeTillTTSStarted: 04.962 - timeTillTTSFinished: 11.016 - speechLength: 06.054 - timeToResponse: 02.578 - transcript: This is a test. - mlModelResponse: Sure! I'm ready to help with your test. What do you need help with? Here, between my audio input ending and the Text-2-Speech starting top play (using AVSpeechUtterance) the total response time was 2.5s. Of that time, it took the SpeechAnalyzer 2.1s to get the transcript finalized, Foundat
3
0
715
6d
Reply to CoreML regression between macOS 26.0.1 and macOS 26.1 Beta causing scrambled tensor outputs
I've been working with CoreML extensively across macOS 26.x betas and can confirm this regression affects audio processing models as well, not just diffusion architectures. After investigating with Metal GPU capture, the pattern strongly suggests a stride alignment issue in the MLMultiArray backing store when the compute unit dispatches to GPU/ANE. Here are the workarounds I've found while waiting for an official fix: Force CPU-only execution as a temporary fix: let config = MLModelConfiguration() config.computeUnits = .cpuOnly let model = try MyModel(configuration: config) This avoids the corrupted GPU/ANE path entirely. Performance takes a hit, but results are correct. If you need GPU performance, pin to CPU+GPU and avoid the ANE: config.computeUnits = .cpuAndGPU // excludes Neural Engine In my testing, the corruption is most severe on the ANE path. CPU+GPU gives roughly 70% of the full .all performance without the scrambled outputs. Runtime validation to degrade gracefully across OS versions: func
Topic: Machine Learning & AI SubTopic: Core ML Tags:
1w
Fatal error on rollback after delete
I encountered an error when trying to rollback context after deleting some model with multiple one-to-many relationships when encountered a problem later in a deleting method and before saving the changes. Something like this: do { // Fetch model modelContext.delete(model) // Do some async work that potentially throws try modelContext.save() } catch { modelContext.rollback() } When relationship is empty - the parent has no children - I can safely delete and rollback with no issues. However, when there is even one child when I call even this code: modelContext.delete(someModel) modelContext.rollback() I'm getting a fatal error: SwiftData/ModelSnapshot.swift:46: Fatal error: Unexpected backing data for snapshot creation: SwiftData._FullFutureBackingData I use ModelContext from within the ModelActor but using mainContext changes nothing. My ModelContainer is quite simple and problem occurs on both in-memory and persistent storage, with or without CloudKit database being enabled. I can isolate the issue in test e
2
0
96
1w
How to enter Picture-in-Picture on background from inline playback in WKWebView
I'm building a Capacitor iOS app with a plain element playing an MP4 file inline. I want Picture-in-Picture to activate automatically when the user goes home — swipe up from the bottom edge of the screen (on an iPhone with Face ID) or press the Home button (on an iPhone with a Home button). Fullscreen → background works perfectly — iOS automatically enters Picture-in-Picture. But I need this to work from inline playback without requiring the user to enter fullscreen first. Setup // AppDelegate.swift let audioSession = AVAudioSession.sharedInstance() try? audioSession.setCategory(.playback, mode: .moviePlayback) try? audioSession.setActive(true) UIBackgroundModes: audio in Info.plist allowsPictureInPictureMediaPlayback is true (Apple default) iOS 26.3.1, WKWebView via Capacitor What I've tried 1. autopictureinpicture attribute WKWebView doesn't honor this attribute from inline playback. It only works when transitioning from fullscreen. 2. requestPictureInPicture() on visibilitychange document.addE
1
0
620
1w
Reply to How to enter Picture-in-Picture on background from inline playback in WKWebView
[quote='819235021, jimmykuo, /thread/819235, /profile/jimmykuo'] Is there any way to programmatically enter PIP from inline playback when a WKWebView app goes to background? Or is this intentionally restricted by WebKit to fullscreen-only transitions? [/quote] Without user interaction, such as a button press, transitioning to PiP automatically would require AVPlayerViewController to be implemented in the inline video. The issue here is playsinline does not hand the video off to AVPlayerViewController. Once the inline video uses AVPlayerViewController, you can implement automatic switching to PiP by enabling canStartPictureInPictureAutomaticallyFromInline. This is mentioned in Adopting Picture in Picture in a Standard Player As for your testing: visibilitychange is not considered user interaction. Only begin PiP playback in response to user interaction and never programmatically. For example, webkitSetPresentationMode will trigger PiP if it is set as the action of a button. In the situations where the video do
Topic: Safari & Web SubTopic: General Tags:
1w
Reply to Mixing ScreenCaptureKit audio with microphone audio
I ran into exactly this problem when building an audio pipeline that mixes system audio (via ScreenCaptureKit) with microphone input for real-time speech processing. The core issue is that mainMixerNode is connected to outputNode by default, which routes everything to speakers. You have two approaches: In manual rendering mode, AVAudioEngine does not play back to hardware — you pull rendered buffers on your own schedule. Enable manual rendering, attach a player node for your SCK audio, connect it to the main mixer, then call renderOffline() to pull mixed audio on demand. The catch: inputNode does not work in offline mode on macOS. The workaround is to capture mic samples separately (via AVCaptureSession or a tap on a separate realtime engine), then schedule those buffers into a second AVAudioPlayerNode. Keep the engine in realtime mode but prevent playback by setting mainMixerNode.outputVolume = 0. Then install a tap on mainMixerNode to capture the mixed audio with
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
5d
Reply to CoreData + CloudKit -- Many-to-Many Relationship not Syncing
This sounds like a general synchronization issue, and so you can probably start with the technotes mentioned in this post to hopefully figure out the cause of the issue. NSPersistentCloudKitContainer supports many-to-many relationships. Before seeing an evidence that proves it doesn't work (by going through the debugging process the technotes describe), I probably won't change the Core Data model. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
5d
Reply to copyfile Sometimes Fails to copy .DS_Store when Copying a Folder But Does Not Report Usable Error
So it appears to be the same failure we are talking about here: https://developer.apple.com/forums/thread/814076 I just updated that thread, but the bug described there (FB21805212) was fixed in macOS 26.4. Also, to be clear, the bug was specifically in smb, NOT copyfile itself. However... It has data. I can read the filenames when I view it as 'plain text’. The Resource fork is less than 300 bytes, but that is enough for it to cause copyfile to fail. The total file size is ~12kb. That doesn't sound like the bug above. The bug above was caused by the SMBClient incorrectly accounting for large xattr size, which then caused the copy to fail. I don't think it would have happened with small xattrs (certainly not 300 bytes). FYI, the Finder (and other copy engines) work because they're using the ..namedfork accessor, when it ends up going through a totally different code path in smb. Interestingly, .DS_Store causing problems with copying is infamous enough to have a mention on Wikipedia: Yes, but I think
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
5d
Reply to Working Anti Virus - Apple Developer Account terminated
Hi, I read your post and it sounds like an incredibly tough situation. I’ve been through a Pending Termination Notice myself, so I truly understand how stressful this can be. I’d like to share my experience just in case it might be of some help. At this stage, it might be more effective to focus less on defending the anti-virus app’s innovation and more on protecting your developer account and your livelihood. In my own case, focusing on a few specific points in my appeal seemed to make a difference: Clarify your intent: Since the app was flagged as malicious, you might want to clearly explain that you had absolutely no intention of misleading users. While your personal situation (such as losing your source of income) is completely understandable, Apple’s review process is guideline-driven, so I think it might be more effective to keep the tone as professional as possible. Write a concrete preventative measure: I mentioned this in another thread recently, but I believe including a clear preventative
Replies
Boosts
Views
Activity
6d
How to reset user preference for crypto token kit access
When an app is trying to access identities put in the keychain by cryptotokenkit extension, the user gets asked a permission pop-up which reads 'Token Access Request would like access a token provided by: with 2 options 'Don't allow' and 'OK' I accidently clicked Don't allow and now can't access identities put in crypto token kit. How can I reset the preference?
Replies
9
Boosts
0
Views
951
Activity
6d
Reply to sysextd: "no policy, cannot allow apps outside /Applications" - NEFilterDataProvider system extension on macOS 26
It sounds like you’re using Developer ID signing for day-to-day development. That’s a mistake on multiple levels. I talk about this in general in The Care and Feeding of Developer ID, but there are extra issues with system extensions, where system policy requires that Developer ID signed sysexen be notarised. So my advice in this case. Use Apple Development code signing for day-to-day development. Use Developer ID for pre-release testing and distribution. There are a couple of key benefits with this approach: It lets you build and debug without enabling development mode, which is a big win IMO. Xcode’s automatic code signing works well with Apple Development signing. Even if you’re not using Xcode, you can create a small test project in Xcode, get it working, and then follow the same path it took. See Debugging a Network Extension Provider for specific advice on how to bring up a provider in Xcode. One thing that Xcode doesn’t handle is the -systemextension suffix )-: To learn more about that, read E
Replies
Boosts
Views
Activity
6d
Reply to The audio of FairPlay protected content can be captured - Safari on iOS
Hi, I would appreciate any feedback - either confirming or contradicting our observation above, that Audio cannot be protected from being captured on Safari/iOS. Thanks.
Topic: Media Technologies SubTopic: Streaming Tags:
Replies
Boosts
Views
Activity
6d
The audio of FairPlay protected content can be captured - Safari on iOS
Hi, Has anyone been able to protect the audio part of FairPlay protected content from being captured as part of screen recording on Safari/iOS (PWA and/or online web app)? We have tried many things but could not prevent the audio from being recorded. Same app and content on Safari/Mac does not allow audio to be recorded. Any tips?
Replies
1
Boosts
0
Views
181
Activity
6d
Reply to CKQuerySubscription on public database never triggers APNS push in Production environment
Hi Ziqiao, thanks for looking into this! I've verified using CKFetchSubscriptionsOperation.fetchAllSubscriptionsOperation() on both Development and Production (TestFlight) devices. All 5 subscriptions are present and correctly configured in both environments. The output is identical between both environments. Here are all 5 subscriptions as returned by CKFetchSubscriptionsOperation: fr-sub-v3 (FriendRequest) Predicate: receiverID == [userID] AND status == pending badge=true, sound=default, contentAvail=false locKey=FRIEND_REQUEST_BODY, locArgs=[senderUsername] category=FRIEND_REQUEST, desiredKeys=[senderID, senderUsername] rec-sub-v3 (MediaRecommendation) Predicate: receiverID == [userID] AND status == pending badge=true, sound=default, contentAvail=false locKey=RECOMMENDATION_BODY, locArgs=[senderUsername, mediaTitle] category=RECOMMENDATION, desiredKeys=[mediaTitle, mediaType, senderID, senderUsername] fs-a-sub-v3 (Friendship) Predicate: userAID == [userID] badge=true, sound=defau
Replies
Boosts
Views
Activity
6d
Reply to SpeechTranscriber/SpeechAnalyzer being relatively slow compared to FoundationModel and TTS
I've been optimizing a similar STT-to-action pipeline on macOS 26 and found a few additional tricks beyond prepareToAnalyze that helped bring the finalization latency down: Use volatileResults aggressively for UI feedback, but trigger your downstream action (FoundationModel call) on the volatile transcript as soon as it stabilizes — don't wait for the finalized event. In my testing, the volatile transcript matches the final one ~95% of the time for short utterances. You can always correct if the final differs. Audio format matters more than you'd expect. If your input is coming through at 48kHz (common from ScreenCaptureKit or external mics), the internal resample to 16kHz adds measurable overhead. Setting up your AVAudioEngine tap at 16kHz mono from the start shaves ~200ms off the pipeline. The large variance Bersaelor observed with prepareToAnalyze (0.05s to 3s) likely correlates with whether the ANE was already warm. If other CoreML workloads are running concurrently (even system ones like Visual
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
6d
SpeechTranscriber/SpeechAnalyzer being relatively slow compared to FoundationModel and TTS
So, I've been wondering how fast a an offline STT -> ML Prompt -> TTS roundtrip would be. Interestingly, for many tests, the SpeechTranscriber (STT) takes the bulk of the time, compared to generating a FoundationModel response and creating the Audio using TTS. E.g. InteractionStatistics: - listeningStarted: 21:24:23 4480 2423 - timeTillFirstAboveNoiseFloor: 01.794 - timeTillLastNoiseAboveFloor: 02.383 - timeTillFirstSpeechDetected: 02.399 - timeTillTranscriptFinalized: 04.510 - timeTillFirstMLModelResponse: 04.938 - timeTillMLModelResponse: 05.379 - timeTillTTSStarted: 04.962 - timeTillTTSFinished: 11.016 - speechLength: 06.054 - timeToResponse: 02.578 - transcript: This is a test. - mlModelResponse: Sure! I'm ready to help with your test. What do you need help with? Here, between my audio input ending and the Text-2-Speech starting top play (using AVSpeechUtterance) the total response time was 2.5s. Of that time, it took the SpeechAnalyzer 2.1s to get the transcript finalized, Foundat
Replies
3
Boosts
0
Views
715
Activity
6d
Reply to CoreML regression between macOS 26.0.1 and macOS 26.1 Beta causing scrambled tensor outputs
I've been working with CoreML extensively across macOS 26.x betas and can confirm this regression affects audio processing models as well, not just diffusion architectures. After investigating with Metal GPU capture, the pattern strongly suggests a stride alignment issue in the MLMultiArray backing store when the compute unit dispatches to GPU/ANE. Here are the workarounds I've found while waiting for an official fix: Force CPU-only execution as a temporary fix: let config = MLModelConfiguration() config.computeUnits = .cpuOnly let model = try MyModel(configuration: config) This avoids the corrupted GPU/ANE path entirely. Performance takes a hit, but results are correct. If you need GPU performance, pin to CPU+GPU and avoid the ANE: config.computeUnits = .cpuAndGPU // excludes Neural Engine In my testing, the corruption is most severe on the ANE path. CPU+GPU gives roughly 70% of the full .all performance without the scrambled outputs. Runtime validation to degrade gracefully across OS versions: func
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
1w
Fatal error on rollback after delete
I encountered an error when trying to rollback context after deleting some model with multiple one-to-many relationships when encountered a problem later in a deleting method and before saving the changes. Something like this: do { // Fetch model modelContext.delete(model) // Do some async work that potentially throws try modelContext.save() } catch { modelContext.rollback() } When relationship is empty - the parent has no children - I can safely delete and rollback with no issues. However, when there is even one child when I call even this code: modelContext.delete(someModel) modelContext.rollback() I'm getting a fatal error: SwiftData/ModelSnapshot.swift:46: Fatal error: Unexpected backing data for snapshot creation: SwiftData._FullFutureBackingData I use ModelContext from within the ModelActor but using mainContext changes nothing. My ModelContainer is quite simple and problem occurs on both in-memory and persistent storage, with or without CloudKit database being enabled. I can isolate the issue in test e
Replies
2
Boosts
0
Views
96
Activity
1w
How to enter Picture-in-Picture on background from inline playback in WKWebView
I'm building a Capacitor iOS app with a plain element playing an MP4 file inline. I want Picture-in-Picture to activate automatically when the user goes home — swipe up from the bottom edge of the screen (on an iPhone with Face ID) or press the Home button (on an iPhone with a Home button). Fullscreen → background works perfectly — iOS automatically enters Picture-in-Picture. But I need this to work from inline playback without requiring the user to enter fullscreen first. Setup // AppDelegate.swift let audioSession = AVAudioSession.sharedInstance() try? audioSession.setCategory(.playback, mode: .moviePlayback) try? audioSession.setActive(true) UIBackgroundModes: audio in Info.plist allowsPictureInPictureMediaPlayback is true (Apple default) iOS 26.3.1, WKWebView via Capacitor What I've tried 1. autopictureinpicture attribute WKWebView doesn't honor this attribute from inline playback. It only works when transitioning from fullscreen. 2. requestPictureInPicture() on visibilitychange document.addE
Replies
1
Boosts
0
Views
620
Activity
1w
Reply to How to enter Picture-in-Picture on background from inline playback in WKWebView
[quote='819235021, jimmykuo, /thread/819235, /profile/jimmykuo'] Is there any way to programmatically enter PIP from inline playback when a WKWebView app goes to background? Or is this intentionally restricted by WebKit to fullscreen-only transitions? [/quote] Without user interaction, such as a button press, transitioning to PiP automatically would require AVPlayerViewController to be implemented in the inline video. The issue here is playsinline does not hand the video off to AVPlayerViewController. Once the inline video uses AVPlayerViewController, you can implement automatic switching to PiP by enabling canStartPictureInPictureAutomaticallyFromInline. This is mentioned in Adopting Picture in Picture in a Standard Player As for your testing: visibilitychange is not considered user interaction. Only begin PiP playback in response to user interaction and never programmatically. For example, webkitSetPresentationMode will trigger PiP if it is set as the action of a button. In the situations where the video do
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w