macOS helper audio-probe always reports -90 dBFS: AVAudioPCMBuffer frameLength set after the copy
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
AudioProbe.swift の add(sampleBuffer:) から始め、frameLength の代入と CMSampleBufferCopyPCMDataIntoAudioBufferList の呼び出しの順序を確認してください。コピーの前にフレーム長を設定し、音声を再生しながら agent-device-macos-helper audio-probe を実行します。バケットが -90 dBFS を超えるレベルを報告すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 5k
- フォーク
- 334
- 平均マージ
- 12時間 2分
- マージ済み PR(30日)
- 706
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
callstack/agent-device#3792 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
callstack/agent-device#3801 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 49/100
callstack/agent-device#3800 ·
メンテナーはふだん 1 日以内に返信
-
refactor(host): explicit host for configuration reads and one entered runtime store対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンin-progress ready-for-agent refactor
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
callstack/agent-device#3794 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
bug priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
wayfinder:task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug customer-reported data-plane question Service Attention Storage
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
Azure/azure-rest-api-specs#47397 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokens対応中かも @DavyMassoneto が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
diegosouzapw/OmniRoute#17109 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
paperclipai/paperclip#16785 ·
メンテナーはふだん 1 日以内に返信