On some Linux setups the game was silent. The device opened, but its data callback ran once and stopped, with no error. The music position never moved. This is cpal 0.17.1's ALSA bug (RustAudio/cpal#1099, "Data callback called only once on ALSA"), fixed in 0.17.3 by setting playback's `avail_min` to one period. benilla's stream starts only at the start threshold, which is exactly that case. cpal goes to 0.17.3. alsa 0.11 and bevy_audio's unbuilt cpal 0.15 cannot share a lock (`links = "alsa"`). A lock-only stand-in for alsa 0.9 settles that, documented in `third_party/alsa-0.9`. The realtime-fallback log line now says what happens on each platform. Following the default device gets its `Deviation:` line: 1.12.1 initialises sound once (`0x7a4330`). Built on macOS, with Linux and Windows linted. Fixes #820 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d93c231d8ebb27934791b726a0575f4c9b709446) # Conflicts: # Cargo.toml # crates/benilla-app/examples/extended_launcher.rs # docs/DEVIATIONS.md Absorbed into the octo fork. Cargo.toml unions both patch entries (our mlua-sys traceback patch and upstream's alsa 0.9 lock-only stand-in). Cargo.lock is regenerated locally rather than taken from upstream, with cargo update -p cpal@0.17.1 --precise 0.17.3: cargo reaches the same resolution (alsa 0.9.1 from the stand-in, alsa 0.11 + alsa-sys 0.4 for the built cpal, windows-* dropped), so it is our own lock, resolved here. examples/extended_launcher.rs is upstream-only and stays absent. cargo check -p benilla-app clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
19 lines
1.0 KiB
Markdown
19 lines
1.0 KiB
Markdown
# A lock-only stand-in for `alsa` 0.9.1
|
|
|
|
Written by benilla, MIT OR Apache-2.0; it contains no upstream code. Wired in through
|
|
`[patch.crates-io]` in the workspace root.
|
|
|
|
Why: `alsa-sys` declares `links = "alsa"`, and a lockfile may hold one version of it. `cpal` 0.17.3,
|
|
our audio device layer off macOS, takes `alsa` 0.11 and so `alsa-sys` 0.4. `bevy_internal` lists
|
|
`bevy_audio` as a weak optional dependency (`bevy_audio?/android_shared_stdcxx`), which puts
|
|
`bevy_audio`, its `cpal` 0.15.3 and so `alsa` 0.9.1 and `alsa-sys` 0.3 into the lock although the
|
|
workspace never enables bevy's audio (`Cargo.toml`, `bevy`). The two `links` collide and the
|
|
resolver refuses. This package satisfies `cpal` 0.15.3's `alsa = "0.9"` with no dependency on
|
|
`alsa-sys`.
|
|
|
|
It is never compiled: `cargo tree --target all` holds no `cpal` 0.15. If bevy's audio were enabled,
|
|
the build would stop at the `compile_error!` in `src/lib.rs`, which says why.
|
|
|
|
Drop it when the lock holds no `bevy_audio` (a bevy that no longer lists it) or when bevy's
|
|
`cpal` takes `alsa` 0.11.
|