pkg:clod/com.clodhub/sound-cues 0.11.0 Sounds for events with a mute, driven by a manifest of sound files, for web, Apple and Android. `sound-cues` plays short sounds for what happens in an application. A manifest lists the sound files (cues) and which cues each event plays, in order and with delays, so an event such as "cards revealed" can play a deal sound then, 300 ms later, a flip sound. The application sends events by name and never touches audio; the files and the event names stay with the application (the recipe ships its own manifest and files). Sound is on or off by the device's `sound` preference from the `preferences` component, turning it off stops everything playing or waiting; a host can also forbid sound for now (a shared display). Browsers allow sound only after a tap, so nothing plays until the first one unlocks it. The component knows nothing about poker or any other game. Examples A button press emits `button` and a click plays; revealing cards emits `reveal` and a deal sound is followed 300 ms later by a flip; the player taps the sound toggle, everything stops and later events stay silent; on a shared display the host forbids sound; a recipe with its own sounds and event names supplies its own manifest folder. Package URL: pkg:clod/com.clodhub/sound-cues@0.11.0 Class: Sound cues (pkg:clod/com.clodhub/sound-cues-class@1.1.0): Short sounds played for events, with mute and delay. Any component of this class can fill a recipe slot that asks for it. Category presentation/sound; https://clodhub.com/classes/sound-cues-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fsound-cues-class Provides (1) - sound-cues (com.clodhub/sound-cues 1.0.0): Sounds for events. A manifest names the sound files (cues) and says which cues each event plays and when; sound is on or off by the device's sound preference (the preferences component's sound value). Web: implementation/web/cue-model.ts and cues.ts (Web Audio). Apple: SoundCueModel and SoundCuePlayer (AVFoundation). Android: CueModel, ManifestJson and SoundCuePlayer (SoundPool) in package com.clodhub.sound. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fsound-cues Requires (1) - preferences (com.clodhub/preferences 1.0.0): What a person chose on this device: language, sound, camera and microphone, kept on the device only. TypeScript (web/preferences.ts, tagged typescript) over string storage; Swift final class DevicePreferences over UserDefaults (PreferenceStorage) and Kotlin class com.clodhub.preferences.DevicePreferences over SharedPreferences (PreferenceStorage), with Bool values, tagged swift and kotlin. The native classes expose the six preferences as read-write properties (DevicePreferences.) and call didChange(name) after each change. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Fpreferences Settings (2) `soundManifest`: the folder name that holds `manifest.json` and the sound files (lower-case letters, digits and hyphens; a clod string setting cannot hold a slash or a dot, so it is a name not a path), default `sounds`. `defaultMuted`: whether sound starts muted when the device has no recorded preference, default false; give the preferences component `soundPreferenceDefault(defaultMuted)` as its default for `sound` so both agree. The manifest is `{ "format": 1, "cues": { "tap": "tap.wav" }, "events": { "button": ["tap"], "reveal": [{ "cue": "deal" }, { "cue": "flip", "delayMs": 300 }] } }`; files end in wav, mp3, ogg, m4a, aac or caf and are relative paths with no `..`. - soundManifest: string (slug); optional, default "sounds" - defaultMuted: boolean; optional, default false Depends on components: none How to use in a recipe A recipe uses it through a slot of class Sound cues (pkg:clod/com.clodhub/sound-cues-class 1.1.0), naming pkg:clod/com.clodhub/sound-cues as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (sound-cues) to the slots that use it. It fills what the component needs (preferences) from slots whose components provide it. The recipe sets soundManifest and defaultMuted; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"sound-cues","class":{"name":"pkg:clod/com.clodhub/sound-cues-class","version":"1.1.0","digest":"b867f3b60626cce214c9a9f609080571bd9c96b0a4c1fd9b664def66734cc69c"},"preferred":{"name":"pkg:clod/com.clodhub/sound-cues","version":"0.11.0"}} - in place of another component of the class: clod fetch sound-cues@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=sound-cues@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot sound-cues) For developers: how an application uses it Web: `createCues({ manifest, baseUrl: "./sounds", preferences, allowed })`, then `cues.unlockOn(document)` so the first tap unlocks sound, and `cues.emit("event")` wherever something happens; wire a sound toggle to `cues.setMuted`. `preferences` is the preferences component's store (only `get`, `set` and `subscribe` of `sound` are used); without it mute is kept in memory. Apple: parse the manifest with `SoundCueModel.parseManifest`, make a `SoundCuePlayer(manifest:locate:isMuted:allowed:)` where `locate` finds files in the bundle and `isMuted` reads `SoundCueModel.isMuted(sound:defaultMuted:)`; call `stopAll()` when sound is turned off. Android: `ManifestJson.parse` the manifest, package the files as raw resources named by `CueModel.rawResourceName` (tap.wav becomes `snd_tap`), make a `SoundCuePlayer(manifest, isMuted, allowed)` and call `init(context)`, `emit(event)`, and `stopAll()` when sound is turned off. Which events exist, the sounds themselves, call audio and the other players' voices stay with the recipe. Accounts and services None. Local audio only; no accounts, network (beyond fetching the application's own sound files on the web) or deployment. How it is checked Node tests check manifest validation (every kind of fault), event plans, settings, file and resource names and the mute rule, and run the engine against a fake audio context: nothing plays before unlock, a cue loads once and may overlap, events play their cues at the planned delays, muting stops playing and still-loading sounds and unmuting plays again, `defaultMuted` and a stored preference decide the state (a stored value wins), turning sound off in the preferences stops it, a host can forbid sound, and a missing file is silent; and that the OpenRPC interface's name and file patterns agree with the validator, its settings match the defaults, and every method it lists is an exported web function or player operation. The Apple check compiles and runs `tests/apple/main.swift` for macOS, comparing plans, resource names and the mute rule with the TypeScript output, refusing faulty manifests and exercising the player with no files, then type-checks the Swift for the iOS simulator. The Android check compares the same plans (`tests/android/Expected.kt`); kotlinc was not available where this was written, so it has not been run, and `SoundCuePlayer.kt` and `ManifestJson.kt` need the Android SDK and are compiled by the application's Gradle build. No audio output is heard by any check. - `node --test tests/web.test.ts` (web, required-local; tools: node 26.5) - `python3 tests/native.py apple` (apple, platform; tools: python3 3.12, swiftc 6.4, xcrun 72) - `python3 tests/native.py android` (android, platform; tools: python3 3.12, kotlinc 2.2, java 26.0) Updates Patch updates replace files only. The component keeps no data of its own (the sound preference is kept by the preferences component); removal deletes its files and the application's imports of them. Tags: cues, presentation, sound Targets: client android, ios, macos, tvos, web, windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/sound-cues release v0.11.0; digest sha256:08cb5aa4a880a4fdb5f9d1ec7865f0bb465397abdaa83cd4fc254d0c66ec56a8 Release: features Line 0.11: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/sound-cues/0.11.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/sound-cues/0.11.0 Bundle download: GET https://clodhub.com/api/components/sound-cues/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/sound-cues-class@1.1.0 b867f3b60626cce214c9a9f609080571bd9c96b0a4c1fd9b664def66734cc69c com.clodhub/sound-cues 1.0.0 entry modules: android android/src/main/java, ios apple/Sources, macos apple/Sources, tvos apple/Sources, web web/index.ts, windows web/index.ts shared behaviour suites: shared Platforms: android, ios, macos, tvos, web, windows Toolchains: android >=8.0.0, ios >=17.0.0, java >=17.0.0 <27.0.0, kotlin =2.4.21, macos >=14.0.0, node >=26.5.0 <27.0.0, swift =6.4.2, tvos >=17.0.0 Frameworks: none Styles: scope none; 0 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 0 exact dependencies, 35 files (listed on the details page) Suitable for jobs: sound-cues profile any: cost none; load none; regions any; compliance none Notes: Pure library; no provider limits apply. Data migration: this component keeps no data Maintainers: Level N Ltd; https://github.com/clodhub/sound-cues/issues; updates https://github.com/clodhub/sound-cues/releases (manual) What you download sound-cues-0.11.0.tar, from release v0.11.0 of clodhub/sound-cues: 35 files - Documents and manifests (8): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (8): android/ (3), apple/ (2), web/ (3) - Tests (8): android/ (2), apple/ (1), fixtures/ (2), make-fixtures.ts, native.py, web.test.ts - Interface documents (2): required-preferences.json, sound-cues.json - Class files: the class's interfaces and shared checks (3): sound-cues-class/ (3) - Examples (1): consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 8 of them into the application under components/sound-cues/: android 3, apple 2, web 3 Not included: the components that provide what it requires (com.clodhub/preferences), each a separate download; the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.11.0 features (2026-11-26T11:32:29.264Z) sha256:08cb5aa4a880a4fdb5f9d1ec7865f0bb465397abdaa83cd4fc254d0c66ec56a8 Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/sound-cues/details.txt?version=0.11.0 Page: https://clodhub.com/components/sound-cues; JSON: https://clodhub.com/api/components/sound-cues/0.11.0; connections diagram: https://clodhub.com/api/components/sound-cues/0.11.0/connections.svg Copyright Level N Ltd 2026