macOS helper audio-probe always reports -90 dBFS: AVAudioPCMBuffer frameLength set after the copy
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
Línea de trabajo
Empieza en AudioProbe.swift, dentro de add(sampleBuffer:), y comprueba el orden de la asignación de frameLength y la llamada a CMSampleBufferCopyPCMDataIntoAudioBufferList. Establece la longitud de trama antes de la copia y luego ejecuta agent-device-macos-helper audio-probe mientras se reproduce sonido; estará listo cuando los buckets indiquen niveles por encima de -90 dBFS.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
agent-device-macos-helper audio-probe reports every bucket at -90 dBFS while sound is playing. Seen on macOS 26/27, agent-device 0.21.15 through 0.21.28 (latest on npm at the time of writing). The ScreenCaptureKit audio session starts and buffers arrive, but no sample is ever counted.
Cause
In AudioProbe.swift, add(sampleBuffer:) calls CMSampleBufferCopyPCMDataIntoAudioBufferList while the new AVAudioPCMBuffer still has frameLength 0, so every mDataByteSize in its mutableAudioBufferList is 0. The call returns OSStatus -12731 on every buffer, the guard returns, and nothing is added. The pcmBuffer.frameLength = frameCount line comes after the copy:
guard frameCount > 0,
let pcmBuffer = AVAudioPCMBuffer(pcmFormat: format, frameCapacity: frameCount)
else {
return
}
let status = CMSampleBufferCopyPCMDataIntoAudioBufferList(
sampleBuffer,
at: 0,
frameCount: Int32(frameCount),
into: pcmBuffer.mutableAudioBufferList
)
guard status == noErr else {
return
}
pcmBuffer.frameLength = frameCount
Fix
Set pcmBuffer.frameLength = frameCount before the copy (or read the sample buffer with CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer).
Evidence
A standalone probe using the same ScreenCaptureKit stream (display filter, 48 kHz stereo) while a system sound played:
- helper's copy order:
status -12731 frames 960 byteSizesBefore [0, 0]on 155 of 155 buffers - reading the sample buffer directly: peak 0.48 (-6.3 dBFS) for the same audio
- the helper at the same moment:
[-90,-90,-90,-90,-90]
Happy to open a PR if wanted.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5k
- Forks
- 334
- Merge medio
- 12 h 2 min
- PR fusionados (30 d)
- 706
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstack/agent-device
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
callstack/agent-device#3792 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
callstack/agent-device#1869 ·
Los mantenedores suelen responder en 1 día
-
refactor(host): explicit host for configuration reads and one entered runtime storePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoready-for-agent refactor
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
callstack/agent-device#3794 ·
Los mantenedores suelen responder en 1 día
-
check:affected: a changed test file must run the test-file size ratchetPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug in-progress ready-for-agent
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
callstack/agent-device#3787 ·
Los mantenedores suelen responder en 1 día
-
Daemon startup: wait for a live daemon instead of a fixed 15 s deadline on slow or overloaded hostsPosiblemente ocupada @thymikee la tomó hace 1 día. Abiertoneeds-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
callstack/agent-device#3782 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstack/agent-device
Issues similares
-
freshness freshness:observed-only
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
thoroc/context-radar#280 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
documentation story
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Billing: computeBundleEconomicsFrom treats a NULL component cost as 0, inflating bundle marginAbiertobug category:billing priority:p3 track:fast
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
LanternOps/breeze#9223 ·
Los mantenedores suelen responder en 1 día