Until this is fixed, one workaround that's worked for me in a similar situation: bypass AVAudioRecorder's metering entirely and compute levels from the raw PCM buffers using AVAudioEngine.
Install a tap on the input node and calculate RMS manually:
let inputNode = audioEngine.inputNode
let format = inputNode.outputFormat(forBus: 0)
inputNode.installTap(onBus: 0, bufferSize: 1024, format: format) { buffer, _ in
guard let channelData = buffer.floatChannelData?[0] else { return }
let frameLength = Int(buffer.frameLength)
var rms: Float = 0
vDSP_measqv(channelData, 1, &rms, vDSP_Length(frameLength))
let avgPower = 10 * log10f(rms)
// Use avgPower instead of averagePowerLevel
}
This gives you the same dB scale as averagePowerLevel without depending on the broken metering path. vDSP_measqv from Accelerate is efficient enough for real-time use — I've measured under 0.1ms per buffer on A14 and later.
One caveat: make sure you're calling audioEngine.prepare() before start() on 26.4 — I've seen cases where skipping prepare() causes the input node format to report 0 channels, which would also result in silent buffers.