macOS helper audio-probe always reports -90 dBFS: AVAudioPCMBuffer frameLength set after the copy
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu trong AudioProbe.swift, ở add(sampleBuffer:), và kiểm tra thứ tự gán frameLength và gọi CMSampleBufferCopyPCMDataIntoAudioBufferList. Đặt độ dài khung hình trước khi sao chép, sau đó chạy agent-device-macos-helper audio-probe khi âm thanh đang phát; hoàn tất khi các bucket báo mức cao hơn -90 dBFS.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 334
- Merge trung bình
- 12 giờ 2 phút
- Pull request đã merge (30 ngày)
- 706
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/agent-device
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
callstack/agent-device#3792 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
callstack/agent-device#1869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
callstack/agent-device#3801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 49/100
callstack/agent-device#3800 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor(host): explicit host for configuration reads and one entered runtime storeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởin-progress ready-for-agent refactor
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
callstack/agent-device#3794 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstack/agent-device
Issue tương tự
-
bug priority: P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
mattermost/compass-design#106 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openclaw/openclaw#176671 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
nordcraftengine/nordcraft#1400 ·
Maintainer thường phản hồi trong vòng 1 ngày