From a30d8a25d3684f2d643452d31a24caeecb144c1e Mon Sep 17 00:00:00 2001 From: type-two Date: Sun, 26 Jul 2026 10:30:38 +1000 Subject: [PATCH] GUI: enable macroquad audio feature (cues and music were silently disabled) Co-Authored-By: Claude Fable 5 --- Cargo.lock | 101 ++++++++++++++++++++++++++++++++++++++++++++++- mrpgi/Cargo.toml | 2 +- 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a27a13d..cc88612 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,6 +20,24 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" +[[package]] +name = "audir-sles" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea47348666a8edb7ad80cbee3940eb2bccf70df0e6ce09009abe1a836cb779f5" + +[[package]] +name = "audrey" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58b92a84e89497e3cd25d3672cd5d1c288abaac02c18ff21283f17d118b889b8" +dependencies = [ + "dasp_frame", + "dasp_sample", + "hound", + "lewton", +] + [[package]] name = "autocfg" version = "1.5.1" @@ -87,6 +105,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "dasp_frame" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a3937f5fe2135702897535c8d4a5553f8b116f76c1529088797f2eee7c5cd6" +dependencies = [ + "dasp_sample", +] + +[[package]] +name = "dasp_sample" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" + [[package]] name = "displaydoc" version = "0.2.6" @@ -182,6 +215,12 @@ dependencies = [ "foldhash", ] +[[package]] +name = "hound" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" + [[package]] name = "httpdate" version = "1.0.3" @@ -225,7 +264,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec", + "smallvec 1.15.2", "zerovec", ] @@ -277,7 +316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", - "smallvec", + "smallvec 1.15.2", "utf8_iter", ] @@ -329,6 +368,17 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "lewton" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d542c1a317036c45c2aa1cf10cc9d403ca91eb2d333ef1a4917e5cb10628bd0" +dependencies = [ + "byteorder", + "ogg", + "smallvec 0.6.14", +] + [[package]] name = "libc" version = "0.2.186" @@ -359,6 +409,7 @@ dependencies = [ "macroquad_macro", "miniquad", "quad-rand", + "quad-snd", ] [[package]] @@ -376,6 +427,12 @@ dependencies = [ "libc", ] +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "memchr" version = "2.8.2" @@ -449,6 +506,15 @@ dependencies = [ "malloc_buf", ] +[[package]] +name = "ogg" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e571c3517af9e1729d4c63571a27edd660ade0667973bfc74a67c660c2b651" +dependencies = [ + "byteorder", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -492,12 +558,34 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quad-alsa-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66c2f04a6946293477973d85adc251d502da51c57b08cd9c997f0cfd8dcd4b5" +dependencies = [ + "libc", +] + [[package]] name = "quad-rand" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a651516ddc9168ebd67b24afd085a718be02f8858fe406591b013d101ce2f40" +[[package]] +name = "quad-snd" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba0c4943fc67147fbe9d1eb731fb9e678bfc9d926507eebbbfe0103e154e5b0" +dependencies = [ + "audir-sles", + "audrey", + "libc", + "quad-alsa-sys", + "winapi", +] + [[package]] name = "quote" version = "1.0.45" @@ -611,6 +699,15 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] + [[package]] name = "smallvec" version = "1.15.2" diff --git a/mrpgi/Cargo.toml b/mrpgi/Cargo.toml index bd6c638..b56af8a 100644 --- a/mrpgi/Cargo.toml +++ b/mrpgi/Cargo.toml @@ -6,7 +6,7 @@ description = "Monster Robot Party Game Interpreter — macroquad GUI front-end [dependencies] mrpgi-core = { path = "../mrpgi-core" } -macroquad = "0.4" +macroquad = { version = "0.4", features = ["audio"] } # Browser builds bake a game folder into the binary (no filesystem on the web). [target.'cfg(target_arch = "wasm32")'.dependencies]