Repository navigation
Conversation
loudnorm declares a 192 kHz output rate, and the AAC encoder then writes 96 kHz. Playing that file switches the Asahi speaker PCM to 96 kHz and speakersafetyd panics, locking the amps. wf-recorder is already passed -R 48000; this finalize pass was rewriting it. Fixes omacom#501
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #501.
finalize_recording()normalizes with ffmpegloudnorm, which analyses at 192 kHz and declares that as its output rate. With no-ar, the AAC encoder caps that at 96 kHz, so every recording with audio is saved at 96 kHz even thoughwf-recorderis already passed-R 48000.On Apple Silicon, playing that file switches the speaker PCM to 96 kHz.
speakersafetydthen panics (Left: Negative power, bad ivsense data) and the kernel locks the amps. Reproduced on a J313: the 21:20 recording was AAC at 96000 Hz, and playback loggedPCM rate: 96000..96000immediately before the panic.This pins the finalize pass at 48 kHz. Loudness normalization is unchanged. Same one-line fix as the still-open omacom#11092 / omacom#10970, which this tree cannot wait on: quattro here is the Asahi recorder path, and upstream has not merged it.
Tests
bash test/shell.d/screenrecording-sample-rate-test.sh