|
|
Thanks for the report and the patch. However, the patch is IMHO not correct (see below) and I wonder on what platform you (@lwi) are working. Some thoughts:
-
I can't hear any sound when I execute fl_beep() or XBell() on my Linux laptop (Mint 20, based on Ubuntu 20.04). There is a note in commit bed8043 (from Dec 2005!): "We have to support ALSA on Linux because the current Xorg releases no longer support XBell() or the PC speaker". If this is true since 2005 I'm not surprised that fl_beep() is silent on my system. Hence I wonder on which X system you are working. Can you tell us details? Is this not using the Xorg server? What bell/beep/sound settings do you have, and are you hearing the sound from the system speaker or from your sound card?
-
the FLTK function fl_beep() has no way to specify the sound volume as you may have noticed. The given argument (e.g. FL_BEEP_DEFAULT ) specifies the sound type, not the sound volume. Given the current code, FL_BEEP_DEFAULT and FL_BEEP_ERROR share the same value (100 ) whereas all other enum values use 50 which seems to indicate that the original author(s) tried to distinguish different sound types by sound volume on X11 since the system function XBell() was not able to "play" different sounds (like on the Windows platform).
-
the given patch (PR) is IMHO wrong (kinda incomplete) because it would (only) affect FL_BEEP_DEFAULT and FL_BEEP_ERROR but leave all other enum values using volume level 50 which would be louder than FL_BEEP_ERROR .
-
note that I read and understood the algorithm given in the XBell() man page to determine the sound level and I agree with you that the value 100 uses the highest possible sound volume and ignores the user setting (if any)
See followup for possible solutions...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |