Post

Replies

Boosts

Views

Activity

Reply to Recordings on iOS 18.0 beta start with stuttering.
I looked more into this. It seems that automatic sample rate conversion on iOS 18 is broken, at least between engine.inputNode and other AVAudioMixerNodes. I've worked around it by manually doing the sample rate conversion using AVAudioConverter, but this means that I no longer set up an audio graph with the inputNode connected to other nodes in the graph. This seems like a major regression in AVAudioEngine.
Aug ’24
Reply to Recordings on iOS 18.0 beta start with stuttering.
I've been able to reproduce the problem with a small example project. I uploaded it to FB14713293, alongside new system diagnostics gathered right after running the example project. It is also available here: https://github.com/TapeIt/ios18-record-stuttering The project contains a simple SwiftUI view with a record and a play button, a TapeDeck class that configures AVAudioSession and handles global recording and playback state, and a Recorder class that does the actual recording. I also stumbled on a second bug: If you set the sampleRate to 48000 in Recorder.swift, another bug occurs: the stuttering is now faster, and happens on the entire recording.
Aug ’24
Reply to Write AAC files in a way that they are readable even in a crash
I can confirm that shouldOptimizeForNetworkUse puts the moov atom at the beginning of the container. I verified this by opening an m4a file with an AVAssetReader and passing its content to an AVAssetWriter using AVAssetReaderInput and AVAssetWriterInput. This works like a charm. However, when writing audio to the AVAssetWriterInput while I record, I need to convert the AVAudioPCMBuffer that I get from my tap on my audio input to a CMSampleBuffer that AVAssetWriterInput.append(sampleBuffer:) expects. How do I do that? There are some answers on Google and StackOverflow on how to do it the other way around, but truth be told they don't seem particularly trustworthy.
Feb ’23
Reply to Backing up and restoring an app group container
That’s certainly my understanding. And likewise for iTunes Finder backups. However, if you’re concerned about this, it’s easy enough for you to test. Good to know. So, to be clear, you’re referring to the Download Container and Replace Container items on the gear menu in the Installed Apps section of Devices and Simulators, right? Yes, that's what I'm referring to. Do you have a recommendation on how to download and app replace group containers?
Nov ’21