FLTK logo

Re: [fltk/fltk] Let beep use system default settings (#243)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Let beep use system default settings (#243) Albrecht Schlosser Jun 25, 2021  
 

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 ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.