Skip to content

Update soundboard extension - #29885

Draft
muhammadrizo-y wants to merge 11 commits into
raycast:mainfrom
muhammadrizo-y:ext/soundboard
Draft

Update soundboard extension#29885
muhammadrizo-y wants to merge 11 commits into
raycast:mainfrom
muhammadrizo-y:ext/soundboard

Conversation

@muhammadrizo-y

@muhammadrizo-y muhammadrizo-y commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add support for Windows platform using Rust
  • Add Stop action for currently playing sounds
  • Add icons for sound entries
  • Bump all dependencies to the latest

Screencast

Cap.2026-08-13.at.00.54.52.mp4

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: soundboard Issues related to the soundboard extension platform: macOS platform: Windows labels Jul 31, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

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 commands
BRANCH="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 dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates the Soundboard extension with:

  • Native Windows playback and stopping through a Rust helper.
  • Playback-state tracking and Stop actions on macOS and Windows.
  • List/grid layouts and configurable sound icons.
  • Updated Raycast, TypeScript, ESLint, and supporting dependencies.

Confidence Score: 4/5

The 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

Filename Overview
extensions/soundboard/rust/src/main.rs Adds Windows MediaPlayer playback and named-event stopping, but the pending-stop preservation can cancel a newly requested playback.
extensions/soundboard/src/utils.ts Adds platform-specific playback orchestration, macOS process registration, liveness checks, and shared playing-state management.
extensions/soundboard/src/index.tsx Adds Stop-aware actions, playback polling, configurable list/grid presentation, and sound icons.
extensions/soundboard/src/soundform.tsx Adds icon selection and persists the selected icon with each sound.
extensions/soundboard/package.json Declares Windows support, adds the layout preference, and modernizes dependencies and scripts.
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

Comment thread extensions/soundboard/src/utils.ts Outdated
Comment thread extensions/soundboard/src/utils.ts
@muhammadrizo-y
muhammadrizo-y marked this pull request as ready for review July 31, 2026 18:44
Comment thread extensions/soundboard/rust/src/main.rs
Comment thread extensions/soundboard/src/utils.ts Outdated
Comment thread extensions/soundboard/src/utils.ts Outdated
Comment thread extensions/soundboard/rust/src/main.rs
Comment thread extensions/soundboard/src/utils.ts Outdated
Comment thread extensions/soundboard/src/utils.ts Outdated
@pernielsentikaer pernielsentikaer self-assigned this Aug 12, 2026

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 — in rust/src/main.rs, when the stop event fires (or playback ends), please Pause, clear the source, and call Close() on the player (a small RAII guard like your StopEventGuard is 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 afplay errors (missing/unreadable file), show a Failure toast the same way the Windows path already does.

Two small notes, neither blocking:

  • build-rust in scripts isn't needed — ray build compiles 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!

@pernielsentikaer
pernielsentikaer marked this pull request as draft August 12, 2026 13:37
Comment thread extensions/soundboard/rust/src/main.rs Outdated
Comment on lines +87 to +91
if unsafe { WaitForSingleObject(stop_event, 0) } != WAIT_OBJECT_0 {
unsafe {
let _ = ResetEvent(stop_event);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: soundboard Issues related to the soundboard extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants