Update soundboard extension - #29885
Conversation
|
Thank you for your contribution! 🎉 🔔 @pernielsentikaer @andreaselia @FrankreedX @jarntz @n0kovo you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/soundboard"
FORK_URL="https://github.com/muhammadrizo-y/raycast-extensions.git"
EXTENSION_NAME="soundboard"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryUpdates the Soundboard extension with:
Confidence Score: 4/5The PR is not yet safe to merge because a Play action racing the previous playback's Stop teardown can be silently cancelled. The revised Windows event logic preserves the earlier Stop signal in a path-wide manual-reset event; a new player sharing that event starts successfully but exits as soon as its playback loop observes the inherited signal. Files Needing Attention: extensions/soundboard/rust/src/main.rs Important Files Changed
Prompt To Fix All With AI### Issue 1
extensions/soundboard/rust/src/main.rs:87-91
**Pending Stop Cancels New Playback**
When a new playback of the same file starts after the previous player observes Stop but before it closes its event handle, the new player inherits the signaled manual-reset event and exits on its first loop check, causing the user's Play action to produce no sustained audio.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (11): Last reviewed commit: "preserve pending stop signal on fresh pl..." | Re-trigger Greptile |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi @muhammadrizo-y 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:
- Please add a screencast. The screencast section of the description is still the empty template, and Windows playback is the part none of the reviewers here can verify — we're all on macOS. A short recording of play, stop, and the new grid layout on Windows would let this move.
- Windows Stop should explicitly tear down
MediaPlayer— inrust/src/main.rs, when the stop event fires (or playback ends), pleasePause, clear the source, and callClose()on the player (a small RAII guard like yourStopEventGuardis perfect so every return path cleans up). Relying on Drop/Release alone can leave audio playing after Stop. After the change, play → Stop mid-clip on Windows should go silent immediately. - macOS play failures — when
afplayerrors (missing/unreadable file), show a Failure toast the same way the Windows path already does.
Two small notes, neither blocking:
build-rustinscriptsisn't needed —ray buildcompiles the Rust for you, and no other Rust extension in the repo carries an equivalent script. Worth dropping so the scripts block stays standard.- In
play_windows, playing the same file while it's already playing gets a handle to the existing named event and resets it, which would swallow a stop aimed at the first player. Genuinely an edge case; fine to leave, just flagging that I saw it.
Also worth knowing for later: the stalled_ticks > 25 guard ends playback after ~5s without the position moving. Sensible safety net, but it's the first place I'd look if anyone reports a long sound cutting off early.
Nice-to-have: a small “playing” accessory on List/Grid items while a sound is active, so Stop is obvious without opening the Action Panel.
I'm looking forward to testing this extension again 🔥
Feel free to contact me here or at Slack if you have any questions.
Please convert this PR to a draft while working on the requested changes. Once ready, mark it as ready for review again and we'll take another look. Thanks!
| if unsafe { WaitForSingleObject(stop_event, 0) } != WAIT_OBJECT_0 { | ||
| unsafe { | ||
| let _ = ResetEvent(stop_event); | ||
| } | ||
| } |
There was a problem hiding this comment.
Pending Stop Cancels New Playback
When a new playback of the same file starts after the previous player observes Stop but before it closes its event handle, the new player inherits the signaled manual-reset event and exits on its first loop check, causing the user's Play action to produce no sustained audio.
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/soundboard/rust/src/main.rs
Line: 87-91
Comment:
**Pending Stop Cancels New Playback**
When a new playback of the same file starts after the previous player observes Stop but before it closes its event handle, the new player inherits the signaled manual-reset event and exits on its first loop check, causing the user's Play action to produce no sustained audio.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Description
Screencast
Cap.2026-08-13.at.00.54.52.mp4
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder