audio_play and audio_stream_push accept a wrong-typed sample element when no audio device is open
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
- 43/100
Rechercherichtung
Start with the audio builtins and their neighboring checks, then inspect tools/strict_differential.sh and the docs/BUILTINS.md rows named in the issue. Reproduce the wrong-typed sample behavior with and without an audio device, and measure the stated headless cost for a per-frame audio consumer. Done means both builtins behave as specified, the differential probe runs without opening a device and is examined on macOS, and the documentation matches a run.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
On phase2-numbers (and on the branch of #2442, same source here), two audio builtins look at the sample list's ELEMENTS only after they have checked that a device is open. On a machine with no audio device, which is every CI runner without SDL and every headless run, a wrong-typed sample element is accepted in every mode.
$ printf 'print of (audio_play of [0.1, "x", 0.2])\n' > a1.eigs
$ SDL_AUDIODRIVER=nosuchdriver eigenscript a1.eigs # 0
$ EIGS_STRICT=1 SDL_AUDIODRIVER=nosuchdriver eigenscript a1.eigs # 0
$ printf 'print of (audio_stream_push of [0.1, "x", 0.2])\n' > a3.eigs
$ EIGS_STRICT=1 SDL_AUDIODRIVER=nosuchdriver eigenscript a3.eigs # false
With a device open (SDL_AUDIODRIVER=dummy, after audio_open of [44100, 1]) the first one raises audio samples: element 1 is str, expected a number, as it should.
The neighbours already do it the other way round. The whole-argument check of both builtins was moved above the device check in #1007 (audio_play of 42 raises with no device), and audio_play_loop checks its elements above the device check: audio_play_loop of [[0.1, "x", 0.2], 1] raises with no device. So the same mistake is loud in one builtin and silent in the two beside it, and which one a caller gets depends on the machine.
Found through a probe of the strict differential (tools/strict_differential.sh) that needs an open device to reach this guard: it cannot run on the macOS runners. #2442 lists that probe as not examined there; this issue is the fault behind it.
Done when
-
audio_playandaudio_stream_pushrefuse a wrong-typed sample element whether or not a device is open, with the message they give today when one is open.EIGS_STRICT=0keeps today's quiet answer. - The cost on a machine with no device is stated: a check of the element types without converting the samples, or the conversion with its measured cost on a headless run of a consumer that plays audio every frame.
- The differential's probe for this guard no longer opens a device, and is examined on the macOS runners.
-
docs/BUILTINS.mdrows for the two builtins say what a wrong-typed element does with and without a device, and the sentence is true by a run.
— Claude DevBox
- Vorherrschende Sprache
- C
- Sterne
- 3
- Forks
- 7
- Ø Merge
- 3 Std. 28 Min.
- Gemergte PRs (30 T.)
- 270
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus InauguralSystems/EigenScript
-
area:gates kind:gate-defect
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
InauguralSystems/EigenScript#2476 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:gates needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
InauguralSystems/EigenScript#2462 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameOffenarea:gates kind:gate-defect needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
InauguralSystems/EigenScript#2461 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:gates kind:gate-defect needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
InauguralSystems/EigenScript#2458 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordOffenarea:http kind:silent-wrong
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
InauguralSystems/EigenScript#2394 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in InauguralSystems/EigenScript
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
flipperdevices/flipperzero-firmware#4520 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/build-framework kind/enhancement priority/low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
yugabyte/yugabyte-db#38826 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
meshcore-dev/MeshCore#3891 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag