Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for volume control in sound playback #321

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KeypawrdDev
Copy link

🚀 Add Support for Volume Control in Sound Playback

Summary

This PR introduces volume control for sound playback. Previously, sounds played at a fixed volume, but now users can adjust the volume dynamically.

Changes Made

  • 🎵 Pass volume parameter through IPC from renderer to main process.
  • 🔧 Updated Electron IPC handlers to accept and forward the volume argument.
  • 🎚️ Updated SoundSelect component to correctly pass volume.
  • 🛠️ Added console logs to verify volume values.
  • 🐛 Fixed issue where volume was undefined in the main process.

How to Test

  1. Select a sound in the settings.
  2. Adjust the volume (if applicable).
  3. Click the play button to test if the sound plays at the correct volume.
  4. Check the console logs to verify the expected values.

Additional Notes

  • ✅ This change ensures that volume settings persist correctly across different parts of the app.
  • ⚠️ No breaking changes expected.

Let me know if any changes are needed before submitting! 🚀

- Introduced volume parameter for sound playback
- Updated IPC handlers to pass volume values correctly between main and renderer processes
- Modified `preload.js` to expose volume in `invokeStartSound` and `invokeEndSound`
- Ensured `onPlayStartSound` and `onPlayEndSound` callbacks include volume
- Added debugging alerts to verify volume propagation
- Improved type definitions for better consistency in IPC communication
@KeypawrdDev
Copy link
Author

Add support for configurable sound volume

  • Introduced volume parameter for sound playback
  • Updated IPC handlers to pass volume values correctly between main and renderer processes
  • Modified preload.js to expose volume in invokeStartSound and invokeEndSound
  • Ensured onPlayStartSound and onPlayEndSound callbacks include volume
  • Added debugging alerts to verify volume propagation
  • Improved type definitions for better consistency in IPC communication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant