Actual buffer size depends on sample rate (macOS)

Offen
#508 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
rust
Bereich
audio-video-rtc

Rechercherichtung

The report identifies the CoreAudio backend on macOS and gives a reproducible buffer-size relationship, but names no files or tests. Start by locating the CoreAudio stream setup and the callback buffer sizing logic, then inspect how requested sample rates and buffer sizes are passed through. Done means the callback buffer matches the requested size across sample rates; verify with input and output streams using the reported 64-frame request at 48 kHz.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

host - coreaudio platform - macos

This problem is specific to the CoreAudio backend on macOS.

The actual buffer size differs from requested buffer depending on requested sample rate.

Using the built-in sound card on an MBP, the requested buffer size X is only observed as the actual buffer size Y in the callbacks when running at SR 44.1kHz. When requesting other sample rates, the relation seems to be that observed buffer size, Y appears as Y = ceil(X*SR/44.1).

For example, requesting X=64, SR=48000 yields Y=70.

In other words, the observed behaviour is almost as if the requested buffer size is in the native sample rate domain rather than in the domain of the requested sample rate.

The expected result would be that the requested buffer size is also in the domain of the requested sample rate.

In the test, I have both input- and output streams running with the same requested configuration.

Env: MBP 14.3 (2017), macOS 11.0.1

Vorherrschende Sprache
Rust
Sterne
4k
Forks
554
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
4

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus RustAudio/cpal

Alle Issues in RustAudio/cpal

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.