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 Volume Control for speaker Package #129

Closed
dwisiswant0 opened this issue Nov 1, 2023 · 1 comment
Closed

Add Volume Control for speaker Package #129

dwisiswant0 opened this issue Nov 1, 2023 · 1 comment

Comments

@dwisiswant0
Copy link

Current Behavior

The speaker package allows for playback of beep.Streamer values through physical speakers. However, it lacks a built-in mechanism for controlling the volume of the audio output.

Desired Behavior

It would be beneficial to add a feature that allows users to control the volume of audio playback using the speaker package. This can be achieved through the addition of volume control options in the API, giving users the ability to fine-tune audio volume as per their requirements. It's worth noting that although Beep provides effects.Volume, it currently operates at the beep.Streamer level and not at the speaker level (for all beep.Streamer).

Proposed Implementation

  1. Introduce a new method or option to the speaker API, such as in the speaker.Init, that allows users to set the desired volume level.
  2. The volume control should accept a value or range, with 0 being mute and 100 (or maximum supported) being the loudest.
  3. Ensures that effects.Volume takes precedence over the volume initialized through the speaker. This ensures that each beep.Streamer retains control over setting its own volume, allowing for more fine-grained adjustments.

Benefits:

  1. Improved user experience by providing volume control for audio playback.
  2. Enables a broader range of apps and use cases, allowing for dynamic and on-the-fly adjustments to speaker volume. This versatility is particularly valuable for applications where real-time volume modifications are essential.

Example Use Case

Here I'm tryna develop Apple Hearing's Background Sounds drop-in replacement.

2023-11-01_13-57-47.mp4

There I have over 30+ sounds, and I'd prefer not to individually adjust the volume for each beep.Streamer.

Thanks!

@MarkKremer
Copy link
Contributor

Would your scenario be solved by chaining a mixer and volume node before the speaker?

         Streamer
             ↓
Streamer → Mixer → Volume → Speaker
             ↑
         Streamer

@MarkKremer MarkKremer closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2023
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

No branches or pull requests

2 participants